From 4793c88fd098947972d1ca9b855870251755ceab Mon Sep 17 00:00:00 2001 From: Alex Eng Date: Wed, 28 Jan 2015 08:51:09 +1000 Subject: [PATCH] Implement plural support for zanata-spa Squashed commit of the following: commit 8eaf6a4f1bec90815ab461d7fa7bfdfa5a5a5d0d Author: Alex Eng Date: Tue Jan 27 13:22:24 2015 +1000 Implement plural support for zanata-spa: https://bugzilla.redhat.com/show_bug.cgi?id=1172437 --- zanata-war/src/main/webapp/app/config.json | 1 - zanata-war/src/main/webapp/app/css/app.css | 2 +- zanata-war/src/main/webapp/app/css/libs.css | 2 +- zanata-war/src/main/webapp/app/index.html | 267 +----------------- zanata-war/src/main/webapp/app/js/app.js | 6 +- zanata-war/src/main/webapp/app/js/libs.js | 20 +- .../src/main/webapp/app/js/templates.js | 21 +- .../src/main/webapp/app/maps/app.js.map | 2 +- .../src/main/webapp/app/maps/libs.js.map | 2 +- .../src/main/webapp/app/translations/de.json | 2 +- .../src/main/webapp/app/translations/fr.json | 2 +- 11 files changed, 30 insertions(+), 297 deletions(-) mode change 100755 => 100644 zanata-war/src/main/webapp/app/maps/app.js.map mode change 100755 => 100644 zanata-war/src/main/webapp/app/maps/libs.js.map diff --git a/zanata-war/src/main/webapp/app/config.json b/zanata-war/src/main/webapp/app/config.json index d8820da5dc..73423ff7cb 100644 --- a/zanata-war/src/main/webapp/app/config.json +++ b/zanata-war/src/main/webapp/app/config.json @@ -1,4 +1,3 @@ { - "appPath": "/app" } diff --git a/zanata-war/src/main/webapp/app/css/app.css b/zanata-war/src/main/webapp/app/css/app.css index 4f3e3d8c14..7943d94902 100644 --- a/zanata-war/src/main/webapp/app/css/app.css +++ b/zanata-war/src/main/webapp/app/css/app.css @@ -1 +1 @@ -.u-cf:before,.u-cf:after{content:" ";display:table}.u-cf:after{clear:both}.u-nbfc{overflow:hidden!important}.u-nbfcAlt{display:table-cell!important;width:10000px!important}.u-floatLeft{float:left!important}.u-floatRight{float:right!important}.u-bgFaint{opacity:.9}.u-bgHigh{background-color:#f6f7f8}.u-bgHigher{background-color:#fefefe}.u-bgHighest{background-color:#fff}.u-bgLow{background-color:#e7e9eb}.u-bgLower{background-color:#e0e2e3}.u-bgLowest{background-color:#d9dadc}.u-bgPop{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.u-bgNeutral{background-color:#eef0f2}.u-bgPrimary{background-color:#4e9fdd}.u-bgSecondary{background-color:#416988}.u-bgDanger{background-color:#f9ddde}.u-bgWarning{background-color:#f9e6dc}.u-bgUnsure{background-color:#fcf9ee}.u-bgSuccess{background-color:#e2eee8}.u-bgHighlight{background-color:#dcecf8}.u-block{display:block!important}.u-hidden{display:none!important}.u-hiddenVisually{position:absolute!important;overflow:hidden!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;clip:rect(1px,1px,1px,1px)!important}.u-inline{display:inline!important}.u-inlineBlock{display:inline-block!important;max-width:100%}.u-table{display:table!important}.u-tableCell{display:table-cell!important}.u-tableRow{display:table-row!important}.u-round{border-radius:1000px!important;overflow:hidden}@media (min-width:0) and (max-width:740px){.u-sm-hidden{display:none!important}}@media (min-width:741px) and (max-width:960px){.u-md-hidden{display:none!important}}@media (max-width:960px){.u-ltemd-hidden{display:none!important}}@media (min-width:741px){.u-gtemd-hidden{display:none!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-hidden{display:none!important}}@media (min-width:961px){.u-gtelg-hidden{display:none!important}}.u-dlUnstyled>dd{margin-left:0}.u-dlInline dt,.u-dlInline dd{display:inline-block;margin-right:.1875rem;margin-left:0}.u-listUnstyled{margin-bottom:0;padding-left:0;list-style:none}.u-listUnstyled>li{margin-left:0;list-style:none}.u-listInline{margin-left:-.1875rem;padding-left:0;list-style:none}.u-listInline>li{display:inline-block;padding-right:.1875rem;padding-left:.1875rem}.u-listHorizontal{font-size:0;list-style:none}.u-listHorizontal>li{font-size:1rem;display:inline-block;vertical-align:top}.u-posAbsolute,.u-posAbsoluteCenter{position:absolute!important}.u-posAbsoluteCenter{bottom:0!important;left:0!important;margin:auto!important;right:0!important;top:0!important}.u-posFixed{position:fixed!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.u-posRelative{position:relative!important}.u-posStatic{position:static!important}.u-posAbsoluteLeft{left:0!important}.u-posAbsoluteLeft,.u-posAbsoluteRight{bottom:0!important;position:absolute!important;top:0!important}.u-posAbsoluteRight{right:0!important}.u-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sizeFitAlt{float:right!important}.u-sizeFitAlt,.u-sizeFill{display:block!important;width:auto!important}.u-sizeFill{overflow:hidden!important}.u-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-size1of12{width:8.333333333333332%!important}.u-size1of10{width:10%!important}.u-size1of8{width:12.5%!important}.u-size1of6,.u-size2of12{width:16.666666666666664%!important}.u-size1of5,.u-size2of10{width:20%!important}.u-size1of4,.u-size2of8,.u-size3of12{width:25%!important}.u-size3of10{width:30%!important}.u-size1of3,.u-size2of6,.u-size4of12{width:33.33333333333333%!important}.u-size3of8{width:37.5%!important}.u-size2of5,.u-size4of10{width:40%!important}.u-size5of12{width:41.66666666666667%!important}.u-size1of2,.u-size2of4,.u-size3of6,.u-size4of8,.u-size5of10,.u-size6of12{width:50%!important}.u-size7of12{width:58.333333333333336%!important}.u-size3of5,.u-size6of10{width:60%!important}.u-size5of8{width:62.5%!important}.u-size2of3,.u-size4of6,.u-size8of12{width:66.66666666666666%!important}.u-size7of10{width:70%!important}.u-size3of4,.u-size6of8,.u-size9of12{width:75%!important}.u-size4of5,.u-size8of10{width:80%!important}.u-size5of6,.u-size10of12{width:83.33333333333334%!important}.u-size7of8{width:87.5%!important}.u-size9of10{width:90%!important}.u-size11of12{width:91.66666666666666%!important}@media (min-width:0) and (max-width:740px){.u-sm-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sm-sizeFitAlt{float:right!important}.u-sm-sizeFitAlt,.u-sm-sizeFill{display:block!important;width:auto!important}.u-sm-sizeFill{overflow:hidden!important}.u-sm-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sm-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-sm-size1of12{width:8.333333333333332%!important}.u-sm-size1of10{width:10%!important}.u-sm-size1of8{width:12.5%!important}.u-sm-size1of6,.u-sm-size2of12{width:16.666666666666664%!important}.u-sm-size1of5,.u-sm-size2of10{width:20%!important}.u-sm-size1of4,.u-sm-size2of8,.u-sm-size3of12{width:25%!important}.u-sm-size3of10{width:30%!important}.u-sm-size1of3,.u-sm-size2of6,.u-sm-size4of12{width:33.33333333333333%!important}.u-sm-size3of8{width:37.5%!important}.u-sm-size2of5,.u-sm-size4of10{width:40%!important}.u-sm-size5of12{width:41.66666666666667%!important}.u-sm-size1of2,.u-sm-size2of4,.u-sm-size3of6,.u-sm-size4of8,.u-sm-size5of10,.u-sm-size6of12{width:50%!important}.u-sm-size7of12{width:58.333333333333336%!important}.u-sm-size3of5,.u-sm-size6of10{width:60%!important}.u-sm-size5of8{width:62.5%!important}.u-sm-size2of3,.u-sm-size4of6,.u-sm-size8of12{width:66.66666666666666%!important}.u-sm-size7of10{width:70%!important}.u-sm-size3of4,.u-sm-size6of8,.u-sm-size9of12{width:75%!important}.u-sm-size4of5,.u-sm-size8of10{width:80%!important}.u-sm-size5of6,.u-sm-size10of12{width:83.33333333333334%!important}.u-sm-size7of8{width:87.5%!important}.u-sm-size9of10{width:90%!important}.u-sm-size11of12{width:91.66666666666666%!important}}@media (min-width:741px) and (max-width:960px){.u-md-sizeFit{display:block!important;float:left!important;width:auto!important}.u-md-sizeFitAlt{float:right!important}.u-md-sizeFitAlt,.u-md-sizeFill{display:block!important;width:auto!important}.u-md-sizeFill{overflow:hidden!important}.u-md-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-md-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-md-size1of12{width:8.333333333333332%!important}.u-md-size1of10{width:10%!important}.u-md-size1of8{width:12.5%!important}.u-md-size1of6,.u-md-size2of12{width:16.666666666666664%!important}.u-md-size1of5,.u-md-size2of10{width:20%!important}.u-md-size1of4,.u-md-size2of8,.u-md-size3of12{width:25%!important}.u-md-size3of10{width:30%!important}.u-md-size1of3,.u-md-size2of6,.u-md-size4of12{width:33.33333333333333%!important}.u-md-size3of8{width:37.5%!important}.u-md-size2of5,.u-md-size4of10{width:40%!important}.u-md-size5of12{width:41.66666666666667%!important}.u-md-size1of2,.u-md-size2of4,.u-md-size3of6,.u-md-size4of8,.u-md-size5of10,.u-md-size6of12{width:50%!important}.u-md-size7of12{width:58.333333333333336%!important}.u-md-size3of5,.u-md-size6of10{width:60%!important}.u-md-size5of8{width:62.5%!important}.u-md-size2of3,.u-md-size4of6,.u-md-size8of12{width:66.66666666666666%!important}.u-md-size7of10{width:70%!important}.u-md-size3of4,.u-md-size6of8,.u-md-size9of12{width:75%!important}.u-md-size4of5,.u-md-size8of10{width:80%!important}.u-md-size5of6,.u-md-size10of12{width:83.33333333333334%!important}.u-md-size7of8{width:87.5%!important}.u-md-size9of10{width:90%!important}.u-md-size11of12{width:91.66666666666666%!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-sizeFit{display:block!important;float:left!important;width:auto!important}.u-lg-sizeFitAlt{float:right!important}.u-lg-sizeFitAlt,.u-lg-sizeFill{display:block!important;width:auto!important}.u-lg-sizeFill{overflow:hidden!important}.u-lg-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-lg-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-lg-size1of12{width:8.333333333333332%!important}.u-lg-size1of10{width:10%!important}.u-lg-size1of8{width:12.5%!important}.u-lg-size1of6,.u-lg-size2of12{width:16.666666666666664%!important}.u-lg-size1of5,.u-lg-size2of10{width:20%!important}.u-lg-size1of4,.u-lg-size2of8,.u-lg-size3of12{width:25%!important}.u-lg-size3of10{width:30%!important}.u-lg-size1of3,.u-lg-size2of6,.u-lg-size4of12{width:33.33333333333333%!important}.u-lg-size3of8{width:37.5%!important}.u-lg-size2of5,.u-lg-size4of10{width:40%!important}.u-lg-size5of12{width:41.66666666666667%!important}.u-lg-size1of2,.u-lg-size2of4,.u-lg-size3of6,.u-lg-size4of8,.u-lg-size5of10,.u-lg-size6of12{width:50%!important}.u-lg-size7of12{width:58.333333333333336%!important}.u-lg-size3of5,.u-lg-size6of10{width:60%!important}.u-lg-size5of8{width:62.5%!important}.u-lg-size2of3,.u-lg-size4of6,.u-lg-size8of12{width:66.66666666666666%!important}.u-lg-size7of10{width:70%!important}.u-lg-size3of4,.u-lg-size6of8,.u-lg-size9of12{width:75%!important}.u-lg-size4of5,.u-lg-size8of10{width:80%!important}.u-lg-size5of6,.u-lg-size10of12{width:83.33333333333334%!important}.u-lg-size7of8{width:87.5%!important}.u-lg-size9of10{width:90%!important}.u-lg-size11of12{width:91.66666666666666%!important}}.u-sizeWidth-1-4{width:.375rem!important}.u-sizeWidth-1-2{width:.75rem!important}.u-sizeWidth-3-4{width:1.125rem!important}.u-sizeWidth-1{width:1.5rem!important}.u-sizeWidth-1_1-2{width:2.25rem!important}.u-sizeWidth-2{width:3rem!important}.u-sizeHeight-1-4{height:.375rem!important}.u-sizeHeight-1-2{height:.75rem!important}.u-sizeHeight-3-4{height:1.125rem!important}.u-sizeHeight-1{height:1.5rem!important}.u-sizeHeight-1_1-2{height:2.25rem!important}.u-sizeHeight-2{height:3rem!important}.u-sizeLineHeight-1-4{line-height:.375rem!important}.u-sizeLineHeight-1-2{line-height:.75rem!important}.u-sizeLineHeight-3-4{line-height:1.125rem!important}.u-sizeLineHeight-1{line-height:1.5rem!important}.u-sizeLineHeight-1_1-2{line-height:2.25rem!important}.u-sizeLineHeight-2{line-height:3rem!important}.u-sM-1-4{margin:.375rem!important}.u-sM-1-2{margin:.75rem!important}.u-sM-3-4{margin:1.125rem!important}.u-sM-1{margin:1.5rem!important}.u-sM-1_1-2{margin:2.25rem!important}.u-sM-2{margin:3rem!important}.u-sMT-1-4{margin-top:.375rem!important}.u-sMT-1-2{margin-top:.75rem!important}.u-sMT-3-4{margin-top:1.125rem!important}.u-sMT-1{margin-top:1.5rem!important}.u-sMT-1_1-2{margin-top:2.25rem!important}.u-sMT-2{margin-top:3rem!important}.u-sMR-1-4{margin-right:.375rem!important}.u-sMR-1-2{margin-right:.75rem!important}.u-sMR-3-4{margin-right:1.125rem!important}.u-sMR-1{margin-right:1.5rem!important}.u-sMR-1_1-2{margin-right:2.25rem!important}.u-sMR-2{margin-right:3rem!important}.u-sMB-1-4{margin-bottom:.375rem!important}.u-sMB-1-2{margin-bottom:.75rem!important}.u-sMB-3-4{margin-bottom:1.125rem!important}.u-sMB-1{margin-bottom:1.5rem!important}.u-sMB-1_1-2{margin-bottom:2.25rem!important}.u-sMB-2{margin-bottom:3rem!important}.u-sML-1-4{margin-left:.375rem!important}.u-sML-1-2{margin-left:.75rem!important}.u-sML-3-4{margin-left:1.125rem!important}.u-sML-1{margin-left:1.5rem!important}.u-sML-1_1-2{margin-left:2.25rem!important}.u-sML-2{margin-left:3rem!important}.u-sMV-1-4{margin-top:.375rem!important;margin-bottom:.375rem!important}.u-sMV-1-2{margin-top:.75rem!important;margin-bottom:.75rem!important}.u-sMV-3-4{margin-top:1.125rem!important;margin-bottom:1.125rem!important}.u-sMV-1{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.u-sMV-1_1-2{margin-top:2.25rem!important;margin-bottom:2.25rem!important}.u-sMV-2{margin-top:3rem!important;margin-bottom:3rem!important}.u-sMH-1-4{margin-left:.375rem!important;margin-right:.375rem!important}.u-sMH-1-2{margin-left:.75rem!important;margin-right:.75rem!important}.u-sMH-3-4{margin-left:1.125rem!important;margin-right:1.125rem!important}.u-sMH-1{margin-left:1.5rem!important;margin-right:1.5rem!important}.u-sMH-1_1-2{margin-left:2.25rem!important;margin-right:2.25rem!important}.u-sMH-2{margin-left:3rem!important;margin-right:3rem!important}.u-sP-1-4{padding:.375rem!important}.u-sP-1-2{padding:.75rem!important}.u-sP-3-4{padding:1.125rem!important}.u-sP-1{padding:1.5rem!important}.u-sP-1_1-2{padding:2.25rem!important}.u-sP-2{padding:3rem!important}.u-sPT-1-4{padding-top:.375rem!important}.u-sPT-1-2{padding-top:.75rem!important}.u-sPT-3-4{padding-top:1.125rem!important}.u-sPT-1{padding-top:1.5rem!important}.u-sPT-1_1-2{padding-top:2.25rem!important}.u-sPT-2{padding-top:3rem!important}.u-sPR-1-4{padding-right:.375rem!important}.u-sPR-1-2{padding-right:.75rem!important}.u-sPR-3-4{padding-right:1.125rem!important}.u-sPR-1{padding-right:1.5rem!important}.u-sPR-1_1-2{padding-right:2.25rem!important}.u-sPR-2{padding-right:3rem!important}.u-sPB-1-4{padding-bottom:.375rem!important}.u-sPB-1-2{padding-bottom:.75rem!important}.u-sPB-3-4{padding-bottom:1.125rem!important}.u-sPB-1{padding-bottom:1.5rem!important}.u-sPB-1_1-2{padding-bottom:2.25rem!important}.u-sPB-2{padding-bottom:3rem!important}.u-sPL-1-4{padding-left:.375rem!important}.u-sPL-1-2{padding-left:.75rem!important}.u-sPL-3-4{padding-left:1.125rem!important}.u-sPL-1{padding-left:1.5rem!important}.u-sPL-1_1-2{padding-left:2.25rem!important}.u-sPL-2{padding-left:3rem!important}.u-sPV-1-4{padding-top:.375rem!important;padding-bottom:.375rem!important}.u-sPV-1-2{padding-top:.75rem!important;padding-bottom:.75rem!important}.u-sPV-3-4{padding-top:1.125rem!important;padding-bottom:1.125rem!important}.u-sPV-1{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.u-sPV-1_1-2{padding-top:2.25rem!important;padding-bottom:2.25rem!important}.u-sPV-2{padding-top:3rem!important;padding-bottom:3rem!important}.u-sPH-1-4{padding-left:.375rem!important;padding-right:.375rem!important}.u-sPH-1-2{padding-left:.75rem!important;padding-right:.75rem!important}.u-sPH-3-4{padding-left:1.125rem!important;padding-right:1.125rem!important}.u-sPH-1{padding-left:1.5rem!important;padding-right:1.5rem!important}.u-sPH-1_1-2{padding-left:2.25rem!important;padding-right:2.25rem!important}.u-sPH-2{padding-left:3rem!important;padding-right:3rem!important}.u-textBreak{word-wrap:break-word!important}.u-textCenter{text-align:center!important}.u-textLeft{text-align:left!important}.u-textRight{text-align:right!important}.u-textInheritColor{color:inherit!important}.u-textKern{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"kern" 1;-moz-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;-moz-font-kerning:normal;font-kerning:normal}.u-textNoWrap,.u-textTruncate{white-space:nowrap!important}.u-textTruncate{max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;word-wrap:normal!important}.u-textUpper{text-transform:uppercase}.u-textLower{text-transform:lowercase}.u-textCapitalize{text-transform:capitalize}.u-textInvert{color:#f2f2f2}.u-textMuted{opacity:.6}.u-textMeta{font-size:.875rem;color:#a0b4c4}.u-textPrimary{color:#4e9fdd}.u-textSecondary{color:#416988}.u-textHighlight{color:#4e9fdd}.u-textSuccess{color:#70a98b}.u-textUnsure{color:#e0c350}.u-textNeutral{color:#bdcbd5}.u-textWarning{color:#e3824e}.u-textDanger{color:#e0575b}.Grid{display:block;font-size:0;margin:0;padding:0;text-align:left}.Grid--alignCenter{text-align:center}.Grid--alignRight{text-align:right}.Grid--alignMiddle>.Grid-cell{vertical-align:middle}.Grid--alignBottom>.Grid-cell{vertical-align:bottom}.Grid--withGutter{margin:0 -10px}.Grid--withGutter>.Grid-cell{padding:0 10px}.Grid-cell{box-sizing:border-box;display:inline-block;font-size:1rem;margin:0;padding:0;text-align:left;vertical-align:top;width:100%}.Grid-cell--center{display:block;margin:0 auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}::-webkit-input-placeholder{color:#aab7c0}:-moz-placeholder,::-moz-placeholder{color:#aab7c0}:-ms-input-placeholder{color:#aab7c0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:none}button{background:0 0;border:0;padding:0;text-align:inherit}button:focus{outline:none}fieldset{border:0;margin:0;padding:0}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea{-webkit-appearance:none;outline:none}@-ms-viewport{width:device-width}@viewport{width:device-width}html{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;box-sizing:border-box;color:#444c54}*,*:before,*:after{box-sizing:inherit}body{min-width:320px;background:#eef0f2}h1,h2,h3,h4,h5,h6{font-size:16px;margin:0;color:#416988}a{color:#4e9fdd;text-decoration:none;cursor:pointer}a:hover,a:focus{color:#468fc7}a:active{color:#3e7fb1}ol,ul{list-style:none;margin:0;padding:0}ul:empty,ol:empty{display:none}img{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}figcaption{color:gray}hr{width:100%;border-bottom:1px solid;border-color:rgba(65,105,136,.12);margin:rhythm(1)0;background:0 0}hr,iframe{border:0}[tabindex="-1"]:focus{outline:none!important}code{font-family:Monaco,Courier,monospace;margin:0;padding:0 .1875rem}code,kbd,pre{font-size:.8125rem;font-weight:400;color:#4d4d4d}pre,samp{font-family:Monaco,Courier,monospace;padding:0 .1875rem}samp{font-size:.8125rem;font-weight:400;color:#4d4d4d}samp,blockquote,dl,dd,p,pre{margin:0}kbd{margin:0 .1875rem;padding:.30000000000000004rem .5625rem;border:1px solid rgba(65,105,136,.07);border-bottom:3px solid rgba(65,105,136,.2);border-radius:.375rem;background-color:#fff;background-clip:padding;text-transform:uppercase;font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif}.ButtonGroup{display:block;font-size:0;margin:0;list-style:none;padding:0}.ButtonGroup-item{display:block;font-size:1rem}.ButtonGroup-item>.Button{display:block;width:100%}.ButtonGroup-item>.Button:hover,.ButtonGroup-item>.Button:focus,.ButtonGroup-item>.Button:active,.ButtonGroup-item>.Button.is-pressed{z-index:1}.ButtonGroup--hz>.ButtonGroup-item{display:inline-block}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-bottom-right-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-top-left-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-right-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-top-left-radius:0}.Button{-webkit-appearance:none;background:0 0;border-color:currentcolor;border-style:solid;border-width:0;box-sizing:border-box;color:transparent;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal}.Button::-moz-focus-inner{border:0;padding:0}.Button:focus{outline:5px auto -webkit-focus-ring-color}.Button:hover,.Button:focus,.Button:active{text-decoration:none}.Button:disabled,.Button.is-disabled{cursor:default;opacity:.6}.Button{-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1)}.Button:focus{outline:none}.Button:disabled,.Button.is-disabled{pointer-events:none}.Button--default{background-color:#e3e9ed}.Button--default:hover,.Button--default:focus{background-color:#ccd2d5}.Button--default:active,.Button--default.is-active{background-color:#c1c6c9}.Button--primary{color:#fff;background-color:#4e9fdd}.Button--primary:hover,.Button--primary:focus{background-color:#468fc7}.Button--primary:active,.Button--primary.is-active{background-color:#4287bc}.Button--secondary{color:#fff;background-color:#416988}.Button--secondary:hover,.Button--secondary:focus{background-color:#3b5f7a}.Button--secondary:active,.Button--secondary.is-active{background-color:#375974}.Button--highlight{color:#fff;background-color:#4e9fdd}.Button--highlight:hover,.Button--highlight:focus{background-color:#468fc7}.Button--highlight:active,.Button--highlight.is-active{background-color:#4287bc}.Button--success{color:#fff;background-color:#70a98b}.Button--success:hover,.Button--success:focus{background-color:#65987d}.Button--success:active,.Button--success.is-active{background-color:#5f9076}.Button--unsure{color:#fff;background-color:#e0c350}.Button--unsure:hover,.Button--unsure:focus{background-color:#cab048}.Button--unsure:active,.Button--unsure.is-active{background-color:#bea644}.Button--neutral{color:#fff;background-color:#a0b4c4}.Button--neutral:hover,.Button--neutral:focus{background-color:#90a2b0}.Button--neutral:active,.Button--neutral.is-active{background-color:#8899a7}.Button--warning{color:#fff;background-color:#e3824e}.Button--warning:hover,.Button--warning:focus{background-color:#cc7546}.Button--warning:active,.Button--warning.is-active{background-color:#c16f42}.Button--danger{color:#fff;background-color:#e0575b}.Button--danger:hover,.Button--danger:focus{background-color:#ca4e52}.Button--danger:active,.Button--danger.is-active{background-color:#be4a4d}.Button--snug{padding:.375rem}.Dropdown{position:relative;z-index:100;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Dropdown.is-active{z-index:800}.Dropdown-toggleIcon{display:inline-block;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);text-align:center}.Dropdown.is-active .Dropdown-toggleIcon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Dropdown-content{position:absolute;z-index:700;top:100%;left:0;visibility:hidden;float:left;min-width:100%;margin:0;padding:0;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:left;opacity:0;background-color:#fff;background-clip:padding-box;box-shadow:0 0 1.5rem rgba(0,0,0,.1)}.Dropdown-content--Bordered{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.Dropdown.is-active>.Dropdown-content{visibility:visible;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1}.Dropdown-title{font-size:.875rem;padding:.1875rem .375rem;background-color:transparent;border-bottom:1px solid rgba(65,105,136,.12);color:#8da5b8}.Dropdown-item{display:block;padding:.1875rem .375rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;color:#4e9fdd}.Dropdown-item:hover{color:#fff;background-color:#4e9fdd}.Dropdown--right .Dropdown-content{left:auto;right:0}.Header{background-color:#4e9fdd;position:fixed;z-index:100;width:100%;top:0;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.1)}.Header-item{height:3rem;display:inline-block;padding-top:.75rem;padding-bottom:.75rem}.Header-avatar{margin-top:.5625rem;margin-bottom:.5625rem;width:1.875rem;height:1.875rem;display:inline-block}.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-weight:600}.h1{font-size:36px}.h2{font-size:28px}.h3{font-size:24px}.h4{font-size:20px}.h5{font-size:18px}.h6{font-size:16px}.Icon{text-align:center;display:inline-block;-webkit-transition:.25s all cubic-bezier(.175,.885,.32,1.275);transition:.25s all cubic-bezier(.175,.885,.32,1.275)}.Icon.is-rotated{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Icon-item{vertical-align:-25%;display:inline-block;width:1.5rem;height:1.5rem;fill:currentColor!important}.Icon--xlg .Icon-item{width:3rem;height:3rem}.Icon--lg .Icon-item{width:2.25rem;height:2.25rem}.Icon--sm .Icon-item{vertical-align:-15%;width:1.125rem;height:1.125rem}.Icon--xsm .Icon-item{vertical-align:-5%;width:.75rem;height:.75rem}.Icon--stroked .Icon-item{fill:none;stroke:currentColor;stroke-width:3}.Link{color:#4e9fdd;text-decoration:none;cursor:pointer}.Link:hover,.Link:focus{color:#468fc7}.Link:active{color:#3e7fb1}.Link--invert{opacity:.8}.Link--invert,.Link--invert:hover,.Link--invert:focus{color:#fff!important}.Link--invert:hover,.Link--invert:focus{opacity:1}.Link--invert:active,.Link--invert.is-active{opacity:.6}.Link--success{color:#70a98b!important}.Link--success:hover,.Link--success:focus{color:#4e7661 !important}.Link--success:active,.Link--success.is-active{color:#2d4438 !important}.Link--unsure{color:#e0c350!important}.Link--unsure:hover,.Link--unsure:focus{color:#9d8938 !important}.Link--unsure:active,.Link--unsure.is-active{color:#5a4e20 !important}.Link--neutral{color:#bdcbd5 !important}.Link--neutral:hover,.Link--neutral:focus{color:#848e95 !important}.Link--neutral:active,.Link--neutral.is-active{color:#4c5155 !important}.Link--warning{color:#e3824e!important}.Link--warning:hover,.Link--warning:focus{color:#9f5b37 !important}.Link--warning:active,.Link--warning.is-active{color:#5b341f !important}.Link--danger{color:#e0575b!important}.Link--danger:hover,.Link--danger:focus{color:#9d3d40 !important}.Link--danger:active,.Link--danger.is-active{color:#5a2324 !important}.LogoLoader{position:relative;display:inline-block;overflow:hidden;width:2.25rem;height:2.25rem;color:#4e9fdd;border-radius:100px;background-color:#fff}.LogoLoader--inverted{color:#fff;background-color:#4e9fdd}.LogoLoader.is-loading{-webkit-animation:rotate .3s infinite linear;animation:rotate .3s infinite linear;-webkit-animation-delay:.05s;animation-delay:.05s}.LogoLoader-logo{-ms-transform:scale(1,1)}.LogoLoader-logo,.LogoLoader-loader{position:absolute;top:0;left:0;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.275);transition:all .25s cubic-bezier(.175,.885,.32,1.275);fill:currentColor}.LogoLoader-logo{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.LogoLoader:hover .LogoLoader-logo{-webkit-animation:pop .3s cubic-bezier(.175,.885,.32,1.275);animation:pop .3s cubic-bezier(.175,.885,.32,1.275);-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-direction:alternate;animation-direction:alternate}.LogoLoader.is-loading .LogoLoader-logo{-webkit-transform:scale(0,0);-ms-transform:scale(0,0);transform:scale(0,0);opacity:0}.LogoLoader-loader{-webkit-transform:scale(2.5,2.5);-ms-transform:scale(2.5,2.5);transform:scale(2.5,2.5);opacity:0}.LogoLoader.is-loading .LogoLoader-loader{-webkit-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1);opacity:1}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}@keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}.Progressbar{position:relative;width:100%;margin:0;background-color:#bdcbd5}.Progressbar,.Progressbar--sm{height:.75rem}.Progressbar--lg{height:1.5rem}.Progressbar-item{position:absolute;left:0;z-index:1;margin:0;padding:0;width:100%;height:100%;list-style:none}.Progressbar-approved{background-color:#4e9fdd;z-index:2}.Progressbar-translated{background-color:#70a98b}.Progressbar-needsWork{background-color:#e0c350}.Progressbar-untranslated{background-color:#bdcbd5}.Modal{position:fixed;z-index:2000;top:0;right:0;bottom:0;left:0;display:block;visibility:hidden;overflow:auto;overflow-y:scroll;width:100%;height:100%;margin:0 auto;padding:4.5rem 1.5rem 1.5rem;-webkit-transition:all .15s linear;transition:all .15s linear;opacity:0;background-color:rgba(238,240,242,.95);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:75rem;perspective:75rem;-webkit-overflow-scrolling:touch}.Modal.is-active{visibility:visible;opacity:1}.Modal-dialog{position:relative;width:90%;top:50%;left:50%;max-height:100%;min-width:300px;max-width:39rem;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.1);transition:all .25s cubic-bezier(.175,.885,.32,1.1);-webkit-transform:translateX(-50%)translateY(100%);-ms-transform:translateX(-50%)translateY(100%);transform:translateX(-50%)translateY(100%);-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0;background-color:#f8f9fa}.Modal.is-active .Modal-dialog{-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%)}.Modal-header{position:fixed;top:-3rem;left:0;right:0;border:1px solid rgba(65,105,136,.12);background-color:#fff;z-index:2}.Modal-title{font-size:1.375rem;font-weight:300;line-height:1.5rem;margin:0;padding:.75rem 2.25rem .75rem 1.5rem}.Modal-close{position:absolute;top:0;right:0;width:3rem;height:3rem;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;text-align:center;border-left:1px solid rgba(65,105,136,.12)}.Modal-close:hover{background-color:rgba(65,105,136,.05)}.Modal-close:active{background-color:rgba(65,105,136,.1)}.Modal-content{position:relative;max-height:100%;overflow:auto;background-clip:padding-box;border:1px solid rgba(65,105,136,.12);border-top-color:transparent;border-bottom-width:2px}.Modal-container.is-modal{overflow:hidden;height:100%}.Toggle,.Toggle-label{cursor:pointer}.Toggle{position:relative;display:inline-block;min-width:2.0625rem;margin:0 .09375rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.Toggle-checkbox{position:absolute;cursor:none;top:0;left:0;width:100%;height:100%;opacity:0}.Toggle-label{font-weight:600;display:block;position:relative;padding:0 .5625rem;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);text-align:center;color:currentColor}.Toggle-fakeCheckbox{opacity:1;position:absolute;top:0;left:0;width:100%;height:100%;content:'';background-color:transparent}.Toggle:hover>.Toggle-fakeCheckbox,.Toggle-checkbox:focus~.Toggle-fakeCheckbox{background-color:currentColor;opacity:.2}.Toggle-checkbox:checked~.Toggle-label,.Toggle.is-active~.Toggle-label{color:#fff}.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle.is-active>.Toggle-fakeCheckbox{background-color:currentColor}.Toggle:hover>.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle-checkbox:checked:focus~.Toggle-fakeCheckbox,.Toggle.is-active:hover>.Toggle-fakeCheckbox{opacity:.8}.TransUnit{position:relative;margin:0;padding:0;cursor:text;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(65,105,136,.12)}.TransUnit.is-first{border-top:1px solid rgba(65,105,136,.12)}.TransUnit:before,.TransUnit:after{display:table;content:' '}.TransUnit:after{clear:both}.TransUnit-container.is-unit-selected .TransUnit{opacity:.3}.TransUnit.is-focused{z-index:5!important;opacity:1!important}.TransUnit-panel{position:relative;padding-left:1.5rem;list-style:none;vertical-align:top}.TransUnit-source{cursor:pointer;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.TransUnit.is-focused .TransUnit-source{cursor:text}.TransUnit-translation{cursor:text;background-color:#fff}.TransUnit-panelHeader,.TransUnit-panelFooter{position:absolute;z-index:2;right:0;left:0;visibility:hidden;height:2.38rem;padding-right:.75rem;padding-left:.75rem;cursor:default;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);opacity:0;border-top:1px solid rgba(65,105,136,.12);border-bottom:1px solid rgba(65,105,136,.12);background-color:#fff;background-clip:padding-box}.TransUnit.is-focused .TransUnit-panelHeader,.TransUnit.is-focused .TransUnit-panelFooter{visibility:visible;opacity:1}.TransUnit-panelHeader{top:-1.125rem;box-shadow:0 -.375rem 1.5rem rgba(0,0,0,.06)}.TransUnit-panelFooter{bottom:-1.125rem;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.06)}.TransUnit-Heading{font-size:1rem;font-weight:400;line-height:2.25rem;display:inline-block;float:left;margin:0;vertical-align:top;text-transform:uppercase}.TransUnit-panelHeaderActions{float:right}.TransUnit-text{font-family:16px;font-size:1rem;line-height:1.5;overflow:hidden;width:100%;min-height:1.5rem;margin:0;padding:2.25rem .75rem;resize:none;-webkit-transition:height .1s cubic-bezier(.075,.82,.165,1);transition:height .1s cubic-bezier(.075,.82,.165,1);white-space:pre-wrap;word-wrap:break-word;-moz-tab-size:4;tab-size:4;color:$color-base-font;border:none;background-color:transparent;box-shadow:none;-webkit-appearance:none}.TransUnit-text:focus{border:none;outline:none;background-color:transparent}.TransUnit-text span{font-weight:400!important;font-style:normal!important}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{position:absolute;z-index:1;top:-1;bottom:-1;left:0;width:1.5rem;border-top:1px solid rgba(65,105,136,.12);border-bottom:1px solid rgba(65,105,136,.12);background-color:#bdcbd5;-webkit-transition:all .4s linear;transition:all .4s linear}.TransUnit-status.is-loading{background-image:-webkit-repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-image:repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-size:100% 1000px;-webkit-animation:loading 7s linear;animation:loading 7s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.TransUnit--highlight .TransUnit-status,.TransUnit--highlight .TransUnit-status:before,.TransUnit--highlight .TransUnit-status:after{background-color:#4e9fdd}.TransUnit--success .TransUnit-status,.TransUnit--success .TransUnit-status:before,.TransUnit--success .TransUnit-status:after{background-color:#70a98b}.TransUnit--unsure .TransUnit-status,.TransUnit--unsure .TransUnit-status:before,.TransUnit--unsure .TransUnit-status:after{background-color:#e0c350}.TransUnit--warning .TransUnit-status,.TransUnit--warning .TransUnit-status:before,.TransUnit--warning .TransUnit-status:after{background-color:#e3824e}.TransUnit--danger .TransUnit-status,.TransUnit--danger .TransUnit-status:before,.TransUnit--danger .TransUnit-status:after{background-color:#e0575b}.TransUnit-metaData{position:relative;right:0;left:0;height:100%;text-align:center}.TransUnit-metaDataItem{line-height:1.125rem}.TransUnit-metaDataButton{font-size:.75rem;line-height:.6000000000000001rem;opacity:.8}.TransUnit-metaDataButton:hover{opacity:1}.TransUnit-metaDataComments,.TransUnit-metaDataErrors{position:absolute;right:0;left:0}.TransUnit-metaDataComments{top:1.125rem}.TransUnit-metaDataErrors{top:2.625rem}.TransUnit-metaDataErrorsIcon{text-shadow:0 0 2px #fff}@media (min-width:0) and (max-width:740px){.TransUnit-translation .TransUnit-panelHeader{box-shadow:0 0 .375rem rgba(0,0,0,.03)}.TransUnit-Heading{padding-left:1.5rem}.TransUnit-status:before,.TransUnit-status:after{z-index:2;visibility:hidden;height:1.5rem;content:''}.TransUnit-status:before{top:-1.125rem;box-shadow:0 -.375rem 1.5rem rgba(0,0,0,.06)}.TransUnit-status:after{top:auto;bottom:-1.125rem;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.06)}.TransUnit.is-focused .TransUnit-status:before,.TransUnit.is-focused .TransUnit-status:after{visibility:visible}}@media (min-width:741px){.TransUnit{display:table;width:100%;table-layout:fixed}.TransUnit-panel{display:table-cell;width:50%;padding-left:0}.TransUnit-source{padding-right:.75rem}.TransUnit-translation{padding-left:.75rem}.TransUnit-panelHeader,.TransUnit-panelFooter{right:0}.TransUnit-translation .TransUnit-panelHeader,.TransUnit-translation .TransUnit-panelFooter{padding-left:1.5rem}.TransUnit-translation .TransUnit-panelHeader:before,.TransUnit-translation .TransUnit-panelFooter:before{position:absolute;top:0;left:-.75rem;width:1.5rem;height:100%;content:'';background-color:#fff;background-clip:padding-box}.TransUnit-source .TransUnit-panelHeader{padding-right:1.5rem}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{left:50%;margin-left:-.75rem}}@-webkit-keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}@keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}.Editor{overflow:hidden}.Editor-header,.Editor-loader,.Editor-content{-webkit-transition:.2s all cubic-bezier(.175,.885,.32,1.275);transition:.2s all cubic-bezier(.175,.885,.32,1.275)}.Editor-header.is-minimised{-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-header.is-minimised .Editor-mainNav{visibility:hidden}.Editor-loader{position:absolute;z-index:500;top:0;left:50%;-webkit-transform:translate(-50%,.375rem);-ms-transform:translate(-50%,.375rem);transform:translate(-50%,.375rem)}.Editor-loader.is-minimised{-webkit-transform:translateX(-50%)scale(.75,.75);-ms-transform:translateX(-50%)scale(.75,.75);transform:translateX(-50%)scale(.75,.75)}.Editor-mainNav{height:3rem}.Editor-content{position:fixed;top:6rem;bottom:0;overflow:auto;overflow-y:scroll;width:100%;-webkit-overlow-scrolling:touch}.Editor-content.is-maximised{bottom:-3rem;-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-translations{min-height:100%;padding:3rem 0;background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea);background:linear-gradient(left,#dde4ea ,#dde4ea);background-position:left center;background-size:1.5rem 100%;background-repeat:no-repeat}.Editor-currentDoc,.Editor-currentLang{max-width:5.25rem}@media (min-width:0) and (max-width:740px){.Editor-currentProject{max-width:5.25rem}}@media (min-width:741px){.Editor-translations{background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea),-webkit-linear-gradient(left,#fff,#fff);background:linear-gradient(to right,#dde4ea ,#dde4ea),linear-gradient(to right,#fff,#fff);background-position:center,right;background-size:1.5rem 100%,50% 100%;background-repeat:no-repeat}}.fade{-webkit-transition:opacity .25s easein;transition:opacity .25s easein;opacity:0}.fade.in{opacity:1}[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none!important} +.u-cf:before,.u-cf:after{content:" ";display:table}.u-cf:after{clear:both}.u-nbfc{overflow:hidden!important}.u-nbfcAlt{display:table-cell!important;width:10000px!important}.u-floatLeft{float:left!important}.u-floatRight{float:right!important}.u-bgFaint{opacity:.9}.u-bgHigh{background-color:#f6f7f8}.u-bgHigher{background-color:#fefefe}.u-bgHighest{background-color:#fff}.u-bgLow{background-color:#e7e9eb}.u-bgLower{background-color:#e0e2e3}.u-bgLowest{background-color:#d9dadc}.u-bgPop{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.u-bgNeutral{background-color:#eef0f2}.u-bgPrimary{background-color:#4e9fdd}.u-bgSecondary{background-color:#416988}.u-bgDanger{background-color:#f9ddde}.u-bgWarning{background-color:#f9e6dc}.u-bgUnsure{background-color:#fcf9ee}.u-bgSuccess{background-color:#e2eee8}.u-bgHighlight{background-color:#dcecf8}.u-block{display:block!important}.u-hidden{display:none!important}.u-hiddenVisually{position:absolute!important;overflow:hidden!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;clip:rect(1px,1px,1px,1px)!important}.u-inline{display:inline!important}.u-inlineBlock{display:inline-block!important;max-width:100%}.u-table{display:table!important}.u-tableCell{display:table-cell!important}.u-tableRow{display:table-row!important}.u-round{border-radius:1000px!important;overflow:hidden}@media (min-width:0) and (max-width:740px){.u-sm-hidden{display:none!important}}@media (min-width:741px) and (max-width:960px){.u-md-hidden{display:none!important}}@media (max-width:960px){.u-ltemd-hidden{display:none!important}}@media (min-width:741px){.u-gtemd-hidden{display:none!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-hidden{display:none!important}}@media (min-width:961px){.u-gtelg-hidden{display:none!important}}.u-dlUnstyled>dd{margin-left:0}.u-dlInline dt,.u-dlInline dd{display:inline-block;margin-right:.1875rem;margin-left:0}.u-listUnstyled{margin-bottom:0;padding-left:0;list-style:none}.u-listUnstyled>li{margin-left:0;list-style:none}.u-listInline{margin-left:-.1875rem;padding-left:0;list-style:none}.u-listInline>li{display:inline-block;padding-right:.1875rem;padding-left:.1875rem}.u-listHorizontal{font-size:0;list-style:none}.u-listHorizontal>li{font-size:1rem;display:inline-block;vertical-align:top}.u-posAbsolute,.u-posAbsoluteCenter{position:absolute!important}.u-posAbsoluteCenter{bottom:0!important;left:0!important;margin:auto!important;right:0!important;top:0!important}.u-posFixed{position:fixed!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.u-posRelative{position:relative!important}.u-posStatic{position:static!important}.u-posAbsoluteLeft{left:0!important}.u-posAbsoluteLeft,.u-posAbsoluteRight{bottom:0!important;position:absolute!important;top:0!important}.u-posAbsoluteRight{right:0!important}.u-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sizeFitAlt{float:right!important}.u-sizeFitAlt,.u-sizeFill{display:block!important;width:auto!important}.u-sizeFill{overflow:hidden!important}.u-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-size1of12{width:8.333333333333332%!important}.u-size1of10{width:10%!important}.u-size1of8{width:12.5%!important}.u-size1of6,.u-size2of12{width:16.666666666666664%!important}.u-size1of5,.u-size2of10{width:20%!important}.u-size1of4,.u-size2of8,.u-size3of12{width:25%!important}.u-size3of10{width:30%!important}.u-size1of3,.u-size2of6,.u-size4of12{width:33.33333333333333%!important}.u-size3of8{width:37.5%!important}.u-size2of5,.u-size4of10{width:40%!important}.u-size5of12{width:41.66666666666667%!important}.u-size1of2,.u-size2of4,.u-size3of6,.u-size4of8,.u-size5of10,.u-size6of12{width:50%!important}.u-size7of12{width:58.333333333333336%!important}.u-size3of5,.u-size6of10{width:60%!important}.u-size5of8{width:62.5%!important}.u-size2of3,.u-size4of6,.u-size8of12{width:66.66666666666666%!important}.u-size7of10{width:70%!important}.u-size3of4,.u-size6of8,.u-size9of12{width:75%!important}.u-size4of5,.u-size8of10{width:80%!important}.u-size5of6,.u-size10of12{width:83.33333333333334%!important}.u-size7of8{width:87.5%!important}.u-size9of10{width:90%!important}.u-size11of12{width:91.66666666666666%!important}@media (min-width:0) and (max-width:740px){.u-sm-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sm-sizeFitAlt{float:right!important}.u-sm-sizeFitAlt,.u-sm-sizeFill{display:block!important;width:auto!important}.u-sm-sizeFill{overflow:hidden!important}.u-sm-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sm-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-sm-size1of12{width:8.333333333333332%!important}.u-sm-size1of10{width:10%!important}.u-sm-size1of8{width:12.5%!important}.u-sm-size1of6,.u-sm-size2of12{width:16.666666666666664%!important}.u-sm-size1of5,.u-sm-size2of10{width:20%!important}.u-sm-size1of4,.u-sm-size2of8,.u-sm-size3of12{width:25%!important}.u-sm-size3of10{width:30%!important}.u-sm-size1of3,.u-sm-size2of6,.u-sm-size4of12{width:33.33333333333333%!important}.u-sm-size3of8{width:37.5%!important}.u-sm-size2of5,.u-sm-size4of10{width:40%!important}.u-sm-size5of12{width:41.66666666666667%!important}.u-sm-size1of2,.u-sm-size2of4,.u-sm-size3of6,.u-sm-size4of8,.u-sm-size5of10,.u-sm-size6of12{width:50%!important}.u-sm-size7of12{width:58.333333333333336%!important}.u-sm-size3of5,.u-sm-size6of10{width:60%!important}.u-sm-size5of8{width:62.5%!important}.u-sm-size2of3,.u-sm-size4of6,.u-sm-size8of12{width:66.66666666666666%!important}.u-sm-size7of10{width:70%!important}.u-sm-size3of4,.u-sm-size6of8,.u-sm-size9of12{width:75%!important}.u-sm-size4of5,.u-sm-size8of10{width:80%!important}.u-sm-size5of6,.u-sm-size10of12{width:83.33333333333334%!important}.u-sm-size7of8{width:87.5%!important}.u-sm-size9of10{width:90%!important}.u-sm-size11of12{width:91.66666666666666%!important}}@media (min-width:741px) and (max-width:960px){.u-md-sizeFit{display:block!important;float:left!important;width:auto!important}.u-md-sizeFitAlt{float:right!important}.u-md-sizeFitAlt,.u-md-sizeFill{display:block!important;width:auto!important}.u-md-sizeFill{overflow:hidden!important}.u-md-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-md-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-md-size1of12{width:8.333333333333332%!important}.u-md-size1of10{width:10%!important}.u-md-size1of8{width:12.5%!important}.u-md-size1of6,.u-md-size2of12{width:16.666666666666664%!important}.u-md-size1of5,.u-md-size2of10{width:20%!important}.u-md-size1of4,.u-md-size2of8,.u-md-size3of12{width:25%!important}.u-md-size3of10{width:30%!important}.u-md-size1of3,.u-md-size2of6,.u-md-size4of12{width:33.33333333333333%!important}.u-md-size3of8{width:37.5%!important}.u-md-size2of5,.u-md-size4of10{width:40%!important}.u-md-size5of12{width:41.66666666666667%!important}.u-md-size1of2,.u-md-size2of4,.u-md-size3of6,.u-md-size4of8,.u-md-size5of10,.u-md-size6of12{width:50%!important}.u-md-size7of12{width:58.333333333333336%!important}.u-md-size3of5,.u-md-size6of10{width:60%!important}.u-md-size5of8{width:62.5%!important}.u-md-size2of3,.u-md-size4of6,.u-md-size8of12{width:66.66666666666666%!important}.u-md-size7of10{width:70%!important}.u-md-size3of4,.u-md-size6of8,.u-md-size9of12{width:75%!important}.u-md-size4of5,.u-md-size8of10{width:80%!important}.u-md-size5of6,.u-md-size10of12{width:83.33333333333334%!important}.u-md-size7of8{width:87.5%!important}.u-md-size9of10{width:90%!important}.u-md-size11of12{width:91.66666666666666%!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-sizeFit{display:block!important;float:left!important;width:auto!important}.u-lg-sizeFitAlt{float:right!important}.u-lg-sizeFitAlt,.u-lg-sizeFill{display:block!important;width:auto!important}.u-lg-sizeFill{overflow:hidden!important}.u-lg-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-lg-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-lg-size1of12{width:8.333333333333332%!important}.u-lg-size1of10{width:10%!important}.u-lg-size1of8{width:12.5%!important}.u-lg-size1of6,.u-lg-size2of12{width:16.666666666666664%!important}.u-lg-size1of5,.u-lg-size2of10{width:20%!important}.u-lg-size1of4,.u-lg-size2of8,.u-lg-size3of12{width:25%!important}.u-lg-size3of10{width:30%!important}.u-lg-size1of3,.u-lg-size2of6,.u-lg-size4of12{width:33.33333333333333%!important}.u-lg-size3of8{width:37.5%!important}.u-lg-size2of5,.u-lg-size4of10{width:40%!important}.u-lg-size5of12{width:41.66666666666667%!important}.u-lg-size1of2,.u-lg-size2of4,.u-lg-size3of6,.u-lg-size4of8,.u-lg-size5of10,.u-lg-size6of12{width:50%!important}.u-lg-size7of12{width:58.333333333333336%!important}.u-lg-size3of5,.u-lg-size6of10{width:60%!important}.u-lg-size5of8{width:62.5%!important}.u-lg-size2of3,.u-lg-size4of6,.u-lg-size8of12{width:66.66666666666666%!important}.u-lg-size7of10{width:70%!important}.u-lg-size3of4,.u-lg-size6of8,.u-lg-size9of12{width:75%!important}.u-lg-size4of5,.u-lg-size8of10{width:80%!important}.u-lg-size5of6,.u-lg-size10of12{width:83.33333333333334%!important}.u-lg-size7of8{width:87.5%!important}.u-lg-size9of10{width:90%!important}.u-lg-size11of12{width:91.66666666666666%!important}}.u-sizeWidth-1-4{width:.375rem!important}.u-sizeWidth-1-2{width:.75rem!important}.u-sizeWidth-3-4{width:1.125rem!important}.u-sizeWidth-1{width:1.5rem!important}.u-sizeWidth-1_1-2{width:2.25rem!important}.u-sizeWidth-2{width:3rem!important}.u-sizeHeight-1-4{height:.375rem!important}.u-sizeHeight-1-2{height:.75rem!important}.u-sizeHeight-3-4{height:1.125rem!important}.u-sizeHeight-1{height:1.5rem!important}.u-sizeHeight-1_1-4{height:1.875rem!important}.u-sizeHeight-1_1-2{height:2.25rem!important}.u-sizeHeight-2{height:3rem!important}.u-sizeLineHeight-1-4{line-height:.375rem!important}.u-sizeLineHeight-1-2{line-height:.75rem!important}.u-sizeLineHeight-3-4{line-height:1.125rem!important}.u-sizeLineHeight-1{line-height:1.5rem!important}.u-sizeLineHeight-1_1-2{line-height:2.25rem!important}.u-sizeLineHeight-2{line-height:3rem!important}.u-sM-1-4{margin:.375rem!important}.u-sM-1-2{margin:.75rem!important}.u-sM-3-4{margin:1.125rem!important}.u-sM-1{margin:1.5rem!important}.u-sM-1_1-2{margin:2.25rem!important}.u-sM-2{margin:3rem!important}.u-sMT-1-4{margin-top:.375rem!important}.u-sMT-1-2{margin-top:.75rem!important}.u-sMT-3-4{margin-top:1.125rem!important}.u-sMT-1{margin-top:1.5rem!important}.u-sMT-1_1-2{margin-top:2.25rem!important}.u-sMT-2{margin-top:3rem!important}.u-sMR-1-4{margin-right:.375rem!important}.u-sMR-1-2{margin-right:.75rem!important}.u-sMR-3-4{margin-right:1.125rem!important}.u-sMR-1{margin-right:1.5rem!important}.u-sMR-1_1-2{margin-right:2.25rem!important}.u-sMR-2{margin-right:3rem!important}.u-sMB-1-4{margin-bottom:.375rem!important}.u-sMB-1-2{margin-bottom:.75rem!important}.u-sMB-3-4{margin-bottom:1.125rem!important}.u-sMB-1{margin-bottom:1.5rem!important}.u-sMB-1_1-2{margin-bottom:2.25rem!important}.u-sMB-2{margin-bottom:3rem!important}.u-sML-1-4{margin-left:.375rem!important}.u-sML-1-2{margin-left:.75rem!important}.u-sML-3-4{margin-left:1.125rem!important}.u-sML-1{margin-left:1.5rem!important}.u-sML-1_1-2{margin-left:2.25rem!important}.u-sML-2{margin-left:3rem!important}.u-sMV-1-4{margin-top:.375rem!important;margin-bottom:.375rem!important}.u-sMV-1-2{margin-top:.75rem!important;margin-bottom:.75rem!important}.u-sMV-3-4{margin-top:1.125rem!important;margin-bottom:1.125rem!important}.u-sMV-1{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.u-sMV-1_1-2{margin-top:2.25rem!important;margin-bottom:2.25rem!important}.u-sMV-2{margin-top:3rem!important;margin-bottom:3rem!important}.u-sMH-1-4{margin-left:.375rem!important;margin-right:.375rem!important}.u-sMH-1-2{margin-left:.75rem!important;margin-right:.75rem!important}.u-sMH-3-4{margin-left:1.125rem!important;margin-right:1.125rem!important}.u-sMH-1{margin-left:1.5rem!important;margin-right:1.5rem!important}.u-sMH-1_1-2{margin-left:2.25rem!important;margin-right:2.25rem!important}.u-sMH-2{margin-left:3rem!important;margin-right:3rem!important}.u-sP-1-4{padding:.375rem!important}.u-sP-1-2{padding:.75rem!important}.u-sP-3-4{padding:1.125rem!important}.u-sP-1{padding:1.5rem!important}.u-sP-1_1-2{padding:2.25rem!important}.u-sP-2{padding:3rem!important}.u-sPT-1-4{padding-top:.375rem!important}.u-sPT-1-2{padding-top:.75rem!important}.u-sPT-3-4{padding-top:1.125rem!important}.u-sPT-1{padding-top:1.5rem!important}.u-sPT-1_1-2{padding-top:2.25rem!important}.u-sPT-2{padding-top:3rem!important}.u-sPR-1-4{padding-right:.375rem!important}.u-sPR-1-2{padding-right:.75rem!important}.u-sPR-3-4{padding-right:1.125rem!important}.u-sPR-1{padding-right:1.5rem!important}.u-sPR-1_1-2{padding-right:2.25rem!important}.u-sPR-2{padding-right:3rem!important}.u-sPB-1-4{padding-bottom:.375rem!important}.u-sPB-1-2{padding-bottom:.75rem!important}.u-sPB-3-4{padding-bottom:1.125rem!important}.u-sPB-1{padding-bottom:1.5rem!important}.u-sPB-1_1-2{padding-bottom:2.25rem!important}.u-sPB-2{padding-bottom:3rem!important}.u-sPL-1-4{padding-left:.375rem!important}.u-sPL-1-2{padding-left:.75rem!important}.u-sPL-3-4{padding-left:1.125rem!important}.u-sPL-1{padding-left:1.5rem!important}.u-sPL-1_1-2{padding-left:2.25rem!important}.u-sPL-2{padding-left:3rem!important}.u-sPV-1-4{padding-top:.375rem!important;padding-bottom:.375rem!important}.u-sPV-1-2{padding-top:.75rem!important;padding-bottom:.75rem!important}.u-sPV-3-4{padding-top:1.125rem!important;padding-bottom:1.125rem!important}.u-sPV-1{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.u-sPV-1_1-2{padding-top:2.25rem!important;padding-bottom:2.25rem!important}.u-sPV-2{padding-top:3rem!important;padding-bottom:3rem!important}.u-sPH-1-4{padding-left:.375rem!important;padding-right:.375rem!important}.u-sPH-1-2{padding-left:.75rem!important;padding-right:.75rem!important}.u-sPH-3-4{padding-left:1.125rem!important;padding-right:1.125rem!important}.u-sPH-1{padding-left:1.5rem!important;padding-right:1.5rem!important}.u-sPH-1_1-2{padding-left:2.25rem!important;padding-right:2.25rem!important}.u-sPH-2{padding-left:3rem!important;padding-right:3rem!important}.u-textBreak{word-wrap:break-word!important}.u-textCenter{text-align:center!important}.u-textLeft{text-align:left!important}.u-textRight{text-align:right!important}.u-textInheritColor{color:inherit!important}.u-textKern{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;font-kerning:normal}.u-textNoWrap,.u-textTruncate{white-space:nowrap!important}.u-textTruncate{max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;word-wrap:normal!important}.u-textUpper{text-transform:uppercase}.u-textLower{text-transform:lowercase}.u-textCapitalize{text-transform:capitalize}.u-textInvert{color:#f2f2f2}.u-textMuted{opacity:.6}.u-textMeta{font-size:.875rem;color:#a0b4c4}.u-textLead{font-size:1.5rem;font-weight:300}.u-textPrimary{color:#4e9fdd}.u-textSecondary{color:#416988}.u-textHighlight{color:#4e9fdd}.u-textSuccess{color:#70a98b}.u-textUnsure{color:#e0c350}.u-textNeutral{color:#bdcbd5}.u-textWarning{color:#e3824e}.u-textDanger{color:#e0575b}.u-textPilcrow:before{content:'\00b6';color:#bdcbd5;padding:0 .1875rem}.u-textTab{position:relative;display:inline-block;width:1.2em;text-align:center}.u-textTab:before{content:'\21E5';color:#bdcbd5}.u-textSpace{position:relative}.u-textSpace:before{position:absolute;content:'.';color:#bdcbd5}.Grid{display:block;font-size:0;margin:0;padding:0;text-align:left}.Grid--alignCenter{text-align:center}.Grid--alignRight{text-align:right}.Grid--alignMiddle>.Grid-cell{vertical-align:middle}.Grid--alignBottom>.Grid-cell{vertical-align:bottom}.Grid--withGutter{margin:0 -10px}.Grid--withGutter>.Grid-cell{padding:0 10px}.Grid-cell{box-sizing:border-box;display:inline-block;font-size:1rem;margin:0;padding:0;text-align:left;vertical-align:top;width:100%}.Grid-cell--center{display:block;margin:0 auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}::-webkit-input-placeholder{color:#aab7c0}:-moz-placeholder,::-moz-placeholder{color:#aab7c0}:-ms-input-placeholder{color:#aab7c0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:none}button{background:0 0;border:0;padding:0;text-align:inherit}button:focus{outline:none}fieldset{border:0;margin:0;padding:0}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea{-webkit-appearance:none;outline:none}@-ms-viewport{width:device-width}@viewport{width:device-width}html{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;box-sizing:border-box;color:#444c54}*,*:before,*:after{box-sizing:inherit}body{min-width:320px;background:#eef0f2}h1,h2,h3,h4,h5,h6{font-size:16px;margin:0;color:#416988}a{color:#4e9fdd;text-decoration:none;cursor:pointer}a:hover,a:focus{color:#468fc7}a:active{color:#3e7fb1}ol,ul{list-style:none;margin:0;padding:0}ul:empty,ol:empty{display:none}img{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}figcaption{color:gray}hr{width:100%;border-bottom:1px solid;border-color:rgba(65,105,136,.12);margin:rhythm(1)0;background:0 0}hr,iframe{border:0}[tabindex="-1"]:focus{outline:none!important}code{font-family:Monaco,Courier,monospace;margin:0;padding:0 .1875rem}code,kbd,pre{font-size:.8125rem;font-weight:400;color:#4d4d4d}pre,samp{font-family:Monaco,Courier,monospace;padding:0 .1875rem}samp{font-size:.8125rem;font-weight:400;color:#4d4d4d}samp,blockquote,dl,dd,p,pre{margin:0}kbd{margin:0 .1875rem;padding:.1875rem .5625rem;border:1px solid rgba(65,105,136,.07);border-bottom:3px solid rgba(65,105,136,.2);border-radius:.375rem;background-color:#fff;background-clip:padding;white-space:nowrap;display:inline-block;text-transform:uppercase;font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif}.ButtonGroup{display:block;font-size:0;margin:0;list-style:none;padding:0}.ButtonGroup-item{display:block;font-size:1rem}.ButtonGroup-item>.Button{display:block;width:100%}.ButtonGroup-item>.Button:hover,.ButtonGroup-item>.Button:focus,.ButtonGroup-item>.Button:active,.ButtonGroup-item>.Button.is-pressed{z-index:1}.ButtonGroup--hz>.ButtonGroup-item{display:inline-block}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-bottom-right-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-top-left-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-right-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-top-left-radius:0}.ButtonGroup--hz>.ButtonGroup-item{vertical-align:middle}.ButtonGroup--round .ButtonGroup-item:first-child .Button{border-top-left-radius:100px;border-bottom-left-radius:100px}.ButtonGroup--round .ButtonGroup-item:last-child .Button{border-top-right-radius:100px;border-bottom-right-radius:100px}.Button{-webkit-appearance:none;background:0 0;border-color:currentcolor;border-style:solid;border-width:0;box-sizing:border-box;color:transparent;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal}.Button::-moz-focus-inner{border:0;padding:0}.Button:focus{outline:5px auto -webkit-focus-ring-color}.Button:hover,.Button:focus,.Button:active{text-decoration:none}.Button:disabled,.Button.is-disabled{cursor:default;opacity:.6}.Button{-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1)}.Button:focus{outline:none}.Button:disabled,.Button.is-disabled{pointer-events:none}.Button--default{background-color:#e3e9ed}.Button--default:hover,.Button--default:focus{background-color:#ccd2d5}.Button--default:active,.Button--default.is-active{background-color:#c1c6c9}.Button--primary{color:#fff;background-color:#4e9fdd}.Button--primary:hover,.Button--primary:focus{background-color:#468fc7}.Button--primary:active,.Button--primary.is-active{background-color:#4287bc}.Button--secondary{color:#fff;background-color:#416988}.Button--secondary:hover,.Button--secondary:focus{background-color:#3b5f7a}.Button--secondary:active,.Button--secondary.is-active{background-color:#375974}.Button--highlight{color:#fff;background-color:#4e9fdd}.Button--highlight:hover,.Button--highlight:focus{background-color:#468fc7}.Button--highlight:active,.Button--highlight.is-active{background-color:#4287bc}.Button--success{color:#fff;background-color:#70a98b}.Button--success:hover,.Button--success:focus{background-color:#65987d}.Button--success:active,.Button--success.is-active{background-color:#5f9076}.Button--unsure{color:#fff;background-color:#e0c350}.Button--unsure:hover,.Button--unsure:focus{background-color:#cab048}.Button--unsure:active,.Button--unsure.is-active{background-color:#bea644}.Button--neutral{color:#fff;background-color:#a0b4c4}.Button--neutral:hover,.Button--neutral:focus{background-color:#90a2b0}.Button--neutral:active,.Button--neutral.is-active{background-color:#8899a7}.Button--warning{color:#fff;background-color:#e3824e}.Button--warning:hover,.Button--warning:focus{background-color:#cc7546}.Button--warning:active,.Button--warning.is-active{background-color:#c16f42}.Button--danger{color:#fff;background-color:#e0575b}.Button--danger:hover,.Button--danger:focus{background-color:#ca4e52}.Button--danger:active,.Button--danger.is-active{background-color:#be4a4d}.Button--snug{padding:.1875rem .375rem}.Button--small{padding:.1875rem .75rem}.Dropdown{position:relative;z-index:100;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Dropdown.is-active{z-index:900}.Dropdown-toggleIcon{display:inline-block;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);text-align:center}.Dropdown.is-active .Dropdown-toggleIcon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Dropdown-content{position:absolute;z-index:800;top:100%;left:0;visibility:hidden;float:left;min-width:100%;margin:0;padding:0;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:left;opacity:0;background-color:#fff;background-clip:padding-box;box-shadow:0 0 1.5rem rgba(0,0,0,.1)}.Dropdown-content--Bordered{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.Dropdown.is-active>.Dropdown-content{visibility:visible;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1}.Dropdown-title{font-size:.875rem;padding:.1875rem .375rem;background-color:transparent;border-bottom:1px solid rgba(65,105,136,.12);color:#8da5b8}.Dropdown-item{display:block;padding:.1875rem .375rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;color:#4e9fdd}.Dropdown-item:hover{color:#fff;background-color:#4e9fdd}.Dropdown--right .Dropdown-content{left:auto;right:0}.Header{background-color:#4e9fdd;position:fixed;z-index:100;width:100%;top:0;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.1)}.Header-item{height:3rem;display:inline-block;padding-top:.75rem;padding-bottom:.75rem}.Header-avatar{margin-top:.5625rem;margin-bottom:.5625rem;width:1.875rem;height:1.875rem;display:inline-block}.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-weight:600}.h1{font-size:36px}.h2{font-size:28px}.h3{font-size:24px}.h4{font-size:20px}.h5{font-size:18px}.h6{font-size:16px}.Icon{text-align:center;display:inline-block;-webkit-transition:.25s all cubic-bezier(.175,.885,.32,1.275);transition:.25s all cubic-bezier(.175,.885,.32,1.275)}.Icon.is-rotated{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Icon-item{vertical-align:-25%;display:inline-block;width:1.5rem;height:1.5rem;fill:currentColor!important}.Icon--xlg .Icon-item{width:3rem;height:3rem}.Icon--lg .Icon-item{width:2.25rem;height:2.25rem}.Icon--sm .Icon-item{vertical-align:-15%;width:1.125rem;height:1.125rem}.Icon--xsm .Icon-item{vertical-align:-5%;width:.75rem;height:.75rem}.Icon--stroked .Icon-item{fill:none;stroke:currentColor;stroke-width:3}.Link{color:#4e9fdd;text-decoration:none;cursor:pointer}.Link:hover,.Link:focus{color:#468fc7}.Link:active{color:#3e7fb1}.Link--invert{opacity:.8}.Link--invert,.Link--invert:hover,.Link--invert:focus{color:#fff!important}.Link--invert:hover,.Link--invert:focus{opacity:1}.Link--invert:active,.Link--invert.is-active{opacity:.6}.Link--success{color:#70a98b!important}.Link--success:hover,.Link--success:focus{color:#4e7661 !important}.Link--success:active,.Link--success.is-active{color:#2d4438 !important}.Link--unsure{color:#e0c350!important}.Link--unsure:hover,.Link--unsure:focus{color:#9d8938 !important}.Link--unsure:active,.Link--unsure.is-active{color:#5a4e20 !important}.Link--neutral{color:#bdcbd5 !important}.Link--neutral:hover,.Link--neutral:focus{color:#848e95 !important}.Link--neutral:active,.Link--neutral.is-active{color:#4c5155 !important}.Link--warning{color:#e3824e!important}.Link--warning:hover,.Link--warning:focus{color:#9f5b37 !important}.Link--warning:active,.Link--warning.is-active{color:#5b341f !important}.Link--danger{color:#e0575b!important}.Link--danger:hover,.Link--danger:focus{color:#9d3d40 !important}.Link--danger:active,.Link--danger.is-active{color:#5a2324 !important}.LogoLoader{position:relative;display:inline-block;overflow:hidden;width:2.25rem;height:2.25rem;color:#4e9fdd;border-radius:100px;background-color:#fff}.LogoLoader--inverted{color:#fff;background-color:#4e9fdd}.LogoLoader.is-loading{-webkit-animation:rotate .3s infinite linear;animation:rotate .3s infinite linear;-webkit-animation-delay:.05s;animation-delay:.05s}.LogoLoader-logo{-ms-transform:scale(1,1)}.LogoLoader-logo,.LogoLoader-loader{position:absolute;top:0;left:0;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.275);transition:all .25s cubic-bezier(.175,.885,.32,1.275);fill:currentColor}.LogoLoader-logo{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.LogoLoader:hover .LogoLoader-logo{-webkit-animation:pop .3s cubic-bezier(.175,.885,.32,1.275);animation:pop .3s cubic-bezier(.175,.885,.32,1.275);-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-direction:alternate;animation-direction:alternate}.LogoLoader.is-loading .LogoLoader-logo{-webkit-transform:scale(0,0);-ms-transform:scale(0,0);transform:scale(0,0);opacity:0}.LogoLoader-loader{-webkit-transform:scale(2.5,2.5);-ms-transform:scale(2.5,2.5);transform:scale(2.5,2.5);opacity:0}.LogoLoader.is-loading .LogoLoader-loader{-webkit-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1);opacity:1}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}@keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}.Progressbar{position:relative;width:100%;margin:0;background-color:#bdcbd5}.Progressbar,.Progressbar--sm{height:.75rem}.Progressbar--lg{height:1.5rem}.Progressbar-item{position:absolute;left:0;z-index:100;margin:0;padding:0;width:100%;height:100%;list-style:none}.Progressbar-approved{background-color:#4e9fdd;z-index:200}.Progressbar-translated{background-color:#70a98b}.Progressbar-needsWork{background-color:#e0c350}.Progressbar-untranslated{background-color:#bdcbd5}.Modal{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;display:block;visibility:hidden;overflow:auto;overflow-y:scroll;width:100%;height:100%;margin:0 auto;padding:4.5rem 1.5rem 1.5rem;-webkit-transition:all .15s linear;transition:all .15s linear;opacity:0;background-color:rgba(238,240,242,.95);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:75rem;perspective:75rem;-webkit-overflow-scrolling:touch}.Modal.is-active{visibility:visible;opacity:1}.Modal-dialog{position:relative;width:90%;top:50%;left:50%;max-height:100%;min-width:300px;max-width:45rem;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.1);transition:all .25s cubic-bezier(.175,.885,.32,1.1);-webkit-transform:translateX(-50%)translateY(100%);-ms-transform:translateX(-50%)translateY(100%);transform:translateX(-50%)translateY(100%);-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0;background-color:#f8f9fa}.Modal.is-active .Modal-dialog{-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%)}.Modal-header{position:fixed;top:-3rem;left:0;right:0;border:1px solid rgba(65,105,136,.12);background-color:#fff;z-index:100}.Modal-title{font-size:1.375rem;font-weight:300;line-height:1.5rem;margin:0;padding:.75rem 2.25rem .75rem 1.5rem}.Modal-close{position:absolute;top:0;right:0;width:3rem;height:3rem;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;text-align:center;border-left:1px solid rgba(65,105,136,.12)}.Modal-close:hover{background-color:rgba(65,105,136,.05)}.Modal-close:active{background-color:rgba(65,105,136,.1)}.Modal-content{position:relative;max-height:100%;overflow:auto;background-clip:padding-box;border:1px solid rgba(65,105,136,.12);border-top-color:transparent;border-bottom-width:2px}.Modal-container.is-modal{overflow:hidden;height:100%}.Toggle,.Toggle-label{cursor:pointer}.Toggle{position:relative;display:inline-block;min-width:2.0625rem;margin:0 .09375rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.Toggle-checkbox{position:absolute;cursor:none;top:0;left:0;width:100%;height:100%;opacity:0}.Toggle-label{font-weight:600;display:block;position:relative;padding:0 .5625rem;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);text-align:center;color:currentColor}.Toggle-fakeCheckbox{opacity:1;position:absolute;top:0;left:0;width:100%;height:100%;content:'';background-color:transparent}.Toggle:hover>.Toggle-fakeCheckbox,.Toggle-checkbox:focus~.Toggle-fakeCheckbox{background-color:currentColor;opacity:.2}.Toggle-checkbox:checked~.Toggle-label,.Toggle.is-active~.Toggle-label{color:#fff}.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle.is-active>.Toggle-fakeCheckbox{background-color:currentColor}.Toggle:hover>.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle-checkbox:checked:focus~.Toggle-fakeCheckbox,.Toggle.is-active:hover>.Toggle-fakeCheckbox{opacity:.8}.TransUnit{position:relative;margin:0;padding:0;cursor:text;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(65,105,136,.12)}.TransUnit:focus{outline:0;box-shadow:none}.TransUnit.is-focused{z-index:100!important;opacity:1!important;background-color:#fff}.TransUnit:before,.TransUnit:after{position:absolute;z-index:-1;left:0;visibility:hidden;width:100%;height:1.5rem;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);opacity:0;background-color:#fff;background-clip:padding-box}.TransUnit:before{box-shadow:0 -.375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:bottom;-ms-transform-origin:bottom;transform-origin:bottom;top:-1.125rem}.TransUnit:after{box-shadow:0 .375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;bottom:-1.125rem}.TransUnit.is-focused:before,.TransUnit.is-focused:after{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1);opacity:1}.TransUnit.is-first{border-top:1px solid rgba(65,105,136,.12)}.TransUnit-container.is-unit-selected .TransUnit{opacity:.8}.TransUnit-panel{padding-top:1.125rem;padding-bottom:1.125rem;padding-left:1.5rem;list-style:none;vertical-align:top}.TransUnit-panel,.TransUnit-item{position:relative}.TransUnit-source{cursor:pointer;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.TransUnit.is-focused .TransUnit-source{cursor:text}.TransUnit-translation{cursor:text;background-color:#fff}.TransUnit-panelHeader,.TransUnit-panelFooter,.TransUnit-itemHeader{position:absolute;z-index:200;right:0;left:0;width:100%;padding-right:1.125rem;padding-left:1.125rem;cursor:default}.TransUnit-panelHeader,.TransUnit-panelFooter{visibility:hidden;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);opacity:0}.TransUnit.is-focused .TransUnit-panelHeader,.TransUnit.is-focused .TransUnit-panelFooter{visibility:visible;opacity:1}.TransUnit-panelHeader{top:-1.125rem}.TransUnit-itemHeader{top:0}.TransUnit-panelFooter{bottom:-1.125rem}.TransUnit-heading{font-size:1rem;font-weight:400;line-height:2.25rem;display:inline-block;float:left;margin:0;vertical-align:top;text-transform:uppercase}.TransUnit-text{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;overflow:hidden;width:100%;min-height:1.5rem;margin:0;padding:1.125rem;resize:none;-webkit-transition:height .1s cubic-bezier(.075,.82,.165,1);transition:height .1s cubic-bezier(.075,.82,.165,1);white-space:pre-wrap;word-wrap:break-word;-moz-tab-size:8;tab-size:8;color:#444c54;border:none;background-color:transparent;box-shadow:none;-webkit-appearance:none}.TransUnit-text:focus{border:none;outline:none;background-color:transparent}.TransUnit-text span{font-weight:400!important;font-style:normal!important}.TransUnit-status,.TransUnit-status:before{position:absolute;z-index:200;left:0;width:1.5rem;background-color:#bdcbd5;-webkit-transition:all .4s linear;transition:all .4s linear}.TransUnit-status{top:-1;bottom:-1}.TransUnit-status.is-loading,.TransUnit-status.is-loading:before{background-image:-webkit-repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-image:repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-size:100% 1000px;-webkit-animation:loading 7s linear;animation:loading 7s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.TransUnit-status:before{top:-1.125rem;height:100%;padding-top:1.125rem;padding-bottom:1.125rem;box-sizing:content-box;z-index:300;visibility:hidden;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(.65);-ms-transform:scaleY(.65);transform:scaleY(.65)}.TransUnit.is-focused .TransUnit-status:before{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.TransUnit--highlight .TransUnit-status,.TransUnit--highlight .TransUnit-status:before{background-color:#4e9fdd}.TransUnit--success .TransUnit-status,.TransUnit--success .TransUnit-status:before{background-color:#70a98b}.TransUnit--unsure .TransUnit-status,.TransUnit--unsure .TransUnit-status:before{background-color:#e0c350}.TransUnit--warning .TransUnit-status,.TransUnit--warning .TransUnit-status:before{background-color:#e3824e}.TransUnit--danger .TransUnit-status,.TransUnit--danger .TransUnit-status:before{background-color:#e0575b}.TransUnit-metaData{position:relative;right:0;left:0;height:100%;text-align:center}.TransUnit-metaDataItem{line-height:1.125rem}.TransUnit-metaDataButton{font-size:.75rem;line-height:.6000000000000001rem;opacity:.8}.TransUnit-metaDataButton:hover{opacity:1}.TransUnit-metaDataComments,.TransUnit-metaDataErrors{position:absolute;right:0;left:0}.TransUnit-metaDataComments{top:1.125rem}.TransUnit-metaDataErrors{top:2.625rem}.TransUnit-metaDataErrorsIcon{text-shadow:0 0 2px #fff}@media (min-width:0) and (max-width:740px){.TransUnit-Heading{padding-left:1.5rem}}@media (min-width:741px){.TransUnit,.TransUnit-item{display:table;width:100%;table-layout:fixed}.TransUnit-panel{display:table-cell;width:50%;padding-left:0}.TransUnit-source{padding-right:.75rem}.TransUnit-translation{padding-left:.75rem}.TransUnit-panelHeader--source,.TransUnit-panelFooter--source{padding-right:1.875rem;right:auto}.TransUnit-panelHeader--translation,.TransUnit-panelFooter--translation{padding-left:1.875rem;left:auto}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{left:50%;margin-left:-.75rem}}@-webkit-keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}@keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}.Editor{overflow:hidden}.Editor-header,.Editor-loader,.Editor-content{-webkit-transition:.2s all cubic-bezier(.175,.885,.32,1.275);transition:.2s all cubic-bezier(.175,.885,.32,1.275)}.Editor-header.is-minimised{-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-header.is-minimised .Editor-mainNav{visibility:hidden}.Editor-loader{position:absolute;z-index:900;top:0;left:50%;-webkit-transform:translate(-50%,.375rem);-ms-transform:translate(-50%,.375rem);transform:translate(-50%,.375rem)}.Editor-loader.is-minimised{-webkit-transform:translateX(-50%)scale(.75,.75);-ms-transform:translateX(-50%)scale(.75,.75);transform:translateX(-50%)scale(.75,.75)}.Editor-mainNav{height:3rem}.Editor-content{position:fixed;top:6rem;bottom:0;overflow:auto;overflow-y:scroll;width:100%;-webkit-overlow-scrolling:touch}.Editor-content.is-maximised{bottom:-3rem;-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-translations{min-height:100%;padding:3rem 0;background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea);background:linear-gradient(left,#dde4ea ,#dde4ea);background-position:left center;background-size:1.5rem 100%;background-repeat:no-repeat}.Editor-currentDoc,.Editor-currentLang{max-width:5.25rem}@media (min-width:0) and (max-width:740px){.Editor-currentProject{max-width:5.25rem}}@media (min-width:741px){.Editor-translations{background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea),-webkit-linear-gradient(left,#fff,#fff);background:linear-gradient(to right,#dde4ea ,#dde4ea),linear-gradient(to right,#fff,#fff);background-position:center,right;background-size:1.5rem 100%,50% 100%;background-repeat:no-repeat}}.fade{-webkit-transition:opacity .25s easein;transition:opacity .25s easein;opacity:0}.fade.in{opacity:1}[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none!important} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/css/libs.css b/zanata-war/src/main/webapp/app/css/libs.css index 4bc4f601de..a89748f5b9 100644 --- a/zanata-war/src/main/webapp/app/css/libs.css +++ b/zanata-war/src/main/webapp/app/css/libs.css @@ -1 +1 @@ -.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:#fff;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5} +.hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:#fff;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/index.html b/zanata-war/src/main/webapp/app/index.html index b9f30d3dea..609eaa7ac8 100755 --- a/zanata-war/src/main/webapp/app/index.html +++ b/zanata-war/src/main/webapp/app/index.html @@ -35,272 +35,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
diff --git a/zanata-war/src/main/webapp/app/js/app.js b/zanata-war/src/main/webapp/app/js/app.js index 442b76e026..6e35efb935 100644 --- a/zanata-war/src/main/webapp/app/js/app.js +++ b/zanata-war/src/main/webapp/app/js/app.js @@ -1,3 +1,3 @@ -!function(){"use strict";angular.module("app",["ngResource","ngAnimate","ui.router","templates","cfp.hotkeys","focusOn","monospaced.elastic","gettext"])}(),function(){"use strict";function t(t,e,n,o){var r=["$q","$rootScope",function(t,e){return{request:function(t){return e.$broadcast("loadingInitiated"),t},requestError:function(e){return console.log("Request error due to ",e),t.reject(e)},response:function(n){return e.$broadcast("loadingComplete"),n||t.when(n)},responseError:function(e){return 401===e.status?console.error("Unauthorized access. Please login"):404===e.status?console.error("Service end point not found- ",e.config.url):console.error("Error in response ",e),t.reject(e)}}}];n.interceptors.push(r),e.otherwise("/"),t.state("editor",{url:"/:projectSlug/:versionSlug/translate",templateUrl:"editor/editor.html",controller:"EditorCtrl as editor",resolve:{url:["UrlService",function(t){return t.init()}]}}).state("editor.selectedContext",{url:"/:docId/:localeId",views:{"editor-content":{templateUrl:"editor/editor-content.html",controller:"EditorContentCtrl as editorContent"},"editor-suggestions":{templateUrl:"editor/editor-suggestions.html",controller:"EditorSuggestionsCtrl as editorSuggestions"},"editor-details":{templateUrl:"editor/editor-details.html",controller:"EditorDetailsCtrl as editorDetails"}}}).state("editor.selectedContext.tu",{url:"/?id&selected?states",reloadOnSearch:!1}),o.template=''}t.$inject=["$stateProvider","$urlRouterProvider","$httpProvider","hotkeysProvider"],angular.module("app").config(t)}(),function(){"use strict";angular.module("app").constant("_",window._).constant("str",window._.string).constant("Mousetrap",window.Mousetrap).constant("PRODUCTION",!0)}(),function(){"use strict";function t(t,e,n,o,r,i,a,c){function s(){return o.getAllLocales()}function u(){return e.getMyInfo().then(function(t){d.myInfo=t,d.myInfo.locale=o.DEFAULT_LOCALE,d.myInfo.gravatarUrl=n.gravatarUrl(d.myInfo.gravatarHash,72)},function(t){r.displayError("Error loading my info: "+t)})}function l(){o.getUILocaleList().then(function(t){for(var e in t.locales){var n={localeId:t.locales[e],name:""};d.uiLocaleList.push(n)}d.myInfo.locale=o.getLocaleByLocaleId(d.uiLocaleList,o.DEFAULT_LOCALE.localeId),d.myInfo.locale||(d.myInfo.locale=o.DEFAULT_LOCALE)},function(t){r.displayInfo("Error loading UI locale. Default to '"+o.DEFAULT_LOCALE.name+"': "+t),d.myInfo.locale=o.DEFAULT_LOCALE})}var d=this;d.PRODUCTION=c,d.settings=e.settings,d.uiLocaleList=[o.DEFAULT_LOCALE],d.loading=!0,t.$on("$stateChangeStart",function(t,e){d.loading=!0,e.resolve}),t.$on("$stateChangeSuccess",function(t,e){d.loading=!1,e.resolve}),n.init().then(s).then(u).then(l),d.onChangeUILocale=function(t){d.myInfo.locale=t;var e=d.myInfo.locale.localeId;a.startsWith(e,o.DEFAULT_LOCALE.localeId,!0)?i.setCurrentLanguage(o.DEFAULT_LOCALE.localeId):i.loadRemote(n.uiTranslationURL(e)).then(function(){i.setCurrentLanguage(e)},function(t){r.displayInfo("Error loading UI locale. Default to '"+o.DEFAULT_LOCALE.name+"': "+t),i.setCurrentLanguage(o.DEFAULT_LOCALE),d.myInfo.locale=o.DEFAULT_LOCALE})},d.dashboardPage=function(){return n.DASHBOARD_PAGE}}t.$inject=["$scope","UserService","UrlService","LocaleService","MessageHandler","gettextCatalog","StringUtil","PRODUCTION"],angular.module("app").controller("AppCtrl",t)}(),function(){"use strict";function t(t,e,n,o,r,i,a){function c(t){u(t),i.emitEvent(i.EVENT.CANCEL_EDIT)}function s(){i.emitEvent(i.EVENT.REFRESH_STATISTIC,{projectSlug:e.context.projectSlug,versionSlug:e.context.versionSlug,docId:e.context.docId,localeId:e.context.localeId}),n.getPhraseCount(e.context,E).then(function(t){e.maxPageIndex=parseInt(t/d),t>d&&(e.maxPageIndex=t%d!==0?e.maxPageIndex+=1:e.maxPageIndex),e.maxPageIndex=e.maxPageIndex-1<0?0:e.maxPageIndex-1,u(e.currentPageIndex)})}function u(t){var o=t*d;n.fetchAllPhrase(e.context,E,o,d).then(l)}function l(t){f.phrases=t}var d=50,f=this,p=r.readValue("states"),E={states:p?p.split(" "):p};return f.phrases=[],e.updateContext(a.projectSlug,a.versionSlug,o.decodeDocId(a.docId),a.localeId),s(),t.$on(i.EVENT.GOTO_FIRST_PAGE,function(){e.currentPageIndex>0&&(e.currentPageIndex=0,c(e.currentPageIndex))}),t.$on(i.EVENT.GOTO_PREV_PAGE,function(){e.currentPageIndex>0&&(e.currentPageIndex-=1,c(e.currentPageIndex))}),t.$on(i.EVENT.GOTO_NEXT_PAGE,function(){e.currentPageIndexc?0:c,i[n]=parseInt(i[n])+o}if(a){var s=parseInt(a[e])-1;a[e]=0>s?0:s,a[n]=parseInt(a[n])+1}}var u=this,l={};return u.findAll=function(t,o){var r=e(n.DOCUMENT_LIST_URL,{},{query:{method:"GET",params:{projectSlug:t,versionSlug:o},isArray:!0}});return r.query().$promise},u.getStatistics=function(o,r,i,s){if(i&&s){var d=c(i,s);if(a.has(l,d))return t.when(l[d]);var f=u.encodeDocId(i),p=e(n.DOC_STATISTIC_URL,{},{query:{method:"GET",params:{projectSlug:o,versionSlug:r,docId:f,localeId:s},isArray:!0}});return p.query().$promise.then(function(t){return l[d]=t,l[d]})}},u.encodeDocId=function(t){return t?t.replace(/\//g,","):t},u.decodeDocId=function(t){return t?t.replace(/\,/g,"/"):t},u.containsDoc=function(t,e){return a.any(t,function(t){return o.equals(t.name,e,!0)})},u.updateStatistic=function(t,e,n,o,r){var u=c(t,e);a.has(l,u)&&(s(l[u],n,o,r),i.emitEvent(i.EVENT.REFRESH_STATISTIC,{projectSlug:"tiny-project",versionSlug:"1",docId:t,localeId:e}))},u}t.$inject=["$q","$resource","UrlService","StringUtil","StatisticUtil","EventService","_"],angular.module("app").factory("DocumentService",t)}(),function(){"use strict";function t(t,e,n,o,r,i,a){var c,s=this,u=t.$new(),l=o.openClass,d=angular.noop,f=e.onToggle?n(e.onToggle):angular.noop;this.init=function(o){s.$element=o,e.isOpen&&(c=n(e.isOpen),d=c.assign,t.$watch(c,function(t){u.isOpen=!!t}))},this.toggle=function(t){return u.isOpen=arguments.length?!!t:!u.isOpen,u.isOpen},this.isOpen=function(){return u.isOpen},u.getToggleElement=function(){return s.toggleElement},u.focusToggleElement=function(){s.toggleElement&&s.toggleElement[0].focus()},u.$watch("isOpen",function(e,n){i[e?"addClass":"removeClass"](s.$element,l),e?(a(function(){u.focusToggleElement()}),r.open(u)):r.close(u),d(t,e),angular.isDefined(e)&&e!==n&&f(t,{open:!!e})}),t.$on("$locationChangeSuccess",function(){u.isOpen=!1}),t.$on("$destroy",function(){u.$destroy()}),t.$on("openDropdown",function(){u.isOpen=!0}),t.$on("closeDropdown",function(){u.isOpen=!1})}t.$inject=["$scope","$attrs","$parse","dropdownConfig","DropdownService","$animate","$timeout"],angular.module("app").controller("DropdownCtrl",t)}(),function(){"use strict";function t(t){var e=null,n=this;n.open=function(n){e||(t.bind("click",o),t.bind("keydown",r)),e&&e!==n&&(e.isOpen=!1),e=n},n.close=function(n){e===n&&(e=null,t.unbind("click",o),t.unbind("keydown",r))};var o=function(t){if(e){var n=e.getToggleElement();t&&n&&n[0].contains(t.target)||e.$apply(function(){e.isOpen=!1})}},r=function(t){27===t.which&&(e.focusToggleElement(),o())}}t.$inject=["$document"],angular.module("app").service("DropdownService",t)}(),function(){"use strict";var t={openClass:"is-active"};angular.module("app").constant("dropdownConfig",t)}(),function(){"use strict";function t(){return{restrict:"EA",controller:"DropdownCtrl",link:function(t,e,n,o){o.init(e)}}}function e(){return{restrict:"A",require:"?^dropdown",scope:{callback:"&onCloseDropdown"},link:function(t,e,n,o){o.onCloseDropdown=t.callback}}}function n(){return{restrict:"EA",require:"?^dropdown",link:function(t,e,n,o){if(o){o.toggleElement=e;var r=function(r){r.preventDefault(),e.hasClass("disabled")||n.disabled||t.$apply(function(){o.toggle()})};e.bind("click",r),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(o.isOpen,function(n){e.attr("aria-expanded",!!n),o.onCloseDropdown&&!n&&t.$applyAsync(o.onCloseDropdown)}),t.$on("$destroy",function(){e.unbind("click",r)})}}}}angular.module("app").directive("dropdown",t).directive("onCloseDropdown",e).directive("dropdownToggle",n)}(),function(){"use strict";function t(t){var e=this;return e.EVENT={LOADING_INITIATED:"loadingInitiated",LOADING_COMPLETE:"loadingStarted",SELECT_TRANS_UNIT:"selectTransUnit",COPY_FROM_SOURCE:"copyFromSource",UNDO_EDIT:"undoEdit",CANCEL_EDIT:"cancelEdit",FOCUS_TRANSLATION:"focusTranslation",SAVE_TRANSLATION:"saveTranslation",SAVE_INITIATED:"saveInitiated",SAVE_COMPLETED:"saveCompleted",TRANSLATION_TEXT_MODIFIED:"translationTextModified",REFRESH_STATISTIC:"refreshStatistic",GOTO_PREV_PAGE:"gotoPreviousPage",GOTO_NEXT_PAGE:"gotoNextPage",GOTO_FIRST_PAGE:"gotoFirstPage",GOTO_LAST_PAGE:"gotoLastPage",GOTO_NEXT_ROW:"gotoNextRow",GOTO_PREVIOUS_ROW:"gotoPreviousRow",GOTO_NEXT_UNTRANSLATED:"gotoNextUntranslated",TOGGLE_SAVE_OPTIONS:"openSaveOptions"},e.broadcastEvent=function(e,n,o){o=o||t,o.$broadcast(e,n)},e.emitEvent=function(e,n,o){o=o||t,o.$emit(e,n)},e}t.$inject=["$rootScope"],angular.module("app").factory("EventService",t)}(),function(){"use strict";function t(t){return{restrict:"E",required:["name"],scope:{name:"@",title:"@",size:"@"},link:function(e,n){var o="",r="";n.addClass("Icon"),e.title&&(r=""+e.title+""),o=''+r+"",n.html(t.trustAsHtml(o))}}}t.$inject=["$sce"],angular.module("app").directive("icon",t)}(),function(){"use strict";function t(t,e,n,o,r){function i(e,n){var r=o(t.LOCALE_LIST_URL,{},{query:{method:"GET",params:{projectSlug:e,versionSlug:n},isArray:!0}});return r.query().$promise}function a(){var e=o(t.ALL_LOCALE_URL,{},{query:{method:"GET",isArray:!0}});return e.query().$promise.then(function(t){d=n.cleanResourceList(t)})}function c(){var e=o(t.uiTranslationListURL,{},{query:{method:"GET"}});return e.query().$promise}function s(t,n){return t?r.find(t,function(t){return e.equals(t.localeId,n,!0)}):void 0}function u(t,n){return r.any(t,function(t){return e.equals(t.localeId,n,!0)})}function l(t){var e=s(d,t);return e?e.name:t}var d=[];return{getSupportedLocales:i,getUILocaleList:c,getLocaleByLocaleId:s,getAllLocales:a,containsLocale:u,getName:l,DEFAULT_LOCALE:{localeId:"en-US",name:"English"}}}t.$inject=["UrlService","StringUtil","FilterUtil","$resource","_"],angular.module("app").factory("LocaleService",t)}(),function(){"use strict";function t(){return{restrict:"EA",scope:{loading:"=",inverted:"="},link:function(t){t.classes="",t.$on("loadingInitiated",function(){t.classes+=" is-loading"}),t.$on("loadingComplete",function(){t.classes=t.classes.replace("is-loading","")}),t.$watch("inverted",function(e){e?t.classes+=" LogoLoader--inverted":t.classes=t.classes.replace("LogoLoader--inverted","")})},templateUrl:"components/logo-loader/logo-loader.html"}}angular.module("app").directive("logoLoader",t)}(),function(){"use strict";function t(){return{displayError:function(t){console.error(t)},displayWarning:function(t){console.warn(t)},displayInfo:function(t){console.info(t)}}}angular.module("app").factory("MessageHandler",t)}(),function(){"use strict";function t(){}angular.module("app").factory("NotificationService",t)}(),function(){"use strict";function t(t,e,n,o,r,i){function a(t,e,n,o){return t+"-"+e+"-"+n+"-"+o}var c=this,s={},u={};return c.getStates=function(c,u,l,d){var f=a(c,u,l,d);if(i.has(s,f))return t.when(s[f]);var p=r.encodeDocId(l),E={query:{method:"GET",params:{projectSlug:c,versionSlug:u,docId:p,localeId:d},isArray:!0}},g=e(o.TRANSLATION_STATUS_URL,{},E);return g.query().$promise.then(function(t){return t=n.cleanResourceList(t),s[f]=t,s[f]})},c.getTransUnits=function(r,a){function c(t){t=n.cleanResourceMap(t);for(var e in t)u[e][a]=t[e][a],l[e]=u[e];return l}function s(t){t=n.cleanResourceMap(t);for(var e in t)u[e]=t[e],l[e]=u[e];return l}var l={},d=[],f=[];if(r.forEach(function(t){i.has(u,t)?u[t][a]?l[t]=u[t]:f.push(t):d.push(t)}),i.isEmpty(d)&&i.isEmpty(f))return t.when(l);var p,E;return i.isEmpty(d)||(p=e(o.TEXT_FLOWS_URL,{},{query:{method:"GET",params:{localeId:a,ids:d.join(",")}}})),i.isEmpty(f)||(E=e(o.TRANSLATION_URL,{},{query:{method:"GET",params:{localeId:a,ids:f.join(",")}}})),p&&E?p.query().$promise.then(s).then(E.query().$promise.then(c)):p?p.query().$promise.then(s):E?E.query().$promise.then(c):void 0},c.onTransUnitUpdated=function(t,e,n,o,r,c,l){var d=a(t.projectSlug,t.versionSlug,t.docId,n),f=i.find(s[d],function(t){return t.id===e});f&&(f.state=r);var p=u[e][n];p||(p={}),p.revision=parseInt(o),p.state=r,p.content=c,p.contents=l},c}t.$inject=["$q","$resource","FilterUtil","UrlService","DocumentService","_"],angular.module("app").factory("PhraseCache",t)}(),function(){"use strict";function t(t,e,n,o,r){function i(t,e){return o.find(e,function(e){return e.id===t})}function a(e,n){return n&&(e=t.filterResources(e,["state"],n)),o.map(e,function(t){return t.id})}var c={};return c.phrases=[],c.getPhraseCount=function(t,n){return e.getStates(t.projectSlug,t.versionSlug,t.docId,t.localeId).then(function(t){var e=a(t,n.states);return e.length})},c.fetchAllPhrase=function(t,r,i,s){function u(t){var n=a(t,r.states);return isNaN(i)||(n=isNaN(s)?n.slice(i):n.slice(i,i+s)),e.getTransUnits(n,f).then(l).then(d)}function l(t){return o.map(t,function(t,e){var o=t.source,r=t[f];return{id:parseInt(e),source:o.content,sources:o.contents,translation:r?r.content:"",translations:r?r.contents:[],newTranslation:r?r.content:"",newTranslations:r?r.contents:[],plural:o.plural,status:n.getStatusInfo(r?r.state:"untranslated"),revision:r?parseInt(r.revision):0,wordCount:parseInt(o.wordCount)}})}function d(n){return e.getStates(t.projectSlug,t.versionSlug,t.docId,f).then(function(t){return c.phrases=o.sortBy(n,function(e){var r=o.findIndex(t,function(t){return t.id===e.id});return r>=0?r:n.length}),c.phrases})}var f=t.localeId;return e.getStates(t.projectSlug,t.versionSlug,t.docId,f).then(u)},c.onTransUnitUpdated=function(t,o,r,a,s,u,l){e.onTransUnitUpdated(t,o,r,a,s,u,l);var d=i(o,c.phrases);d&&(d.translation=u,d.revision=a,d.status=n.getStatusInfo(s))},c.onTransUnitUpdateFailed=function(t){var e=i(t,c.phrases);e&&(e.newTranslation=e.translation)},c.findNextId=function(t){return e.getStates(r.projectSlug,r.versionSlug,r.docId,r.localeId).then(function(e){var n,r;return n=o.findIndex(e,function(e){return e.id===t}),r=n+1=0?n-1:0,e[r].id})},c.findNextStatus=function(t,i){return e.getStates(r.projectSlug,r.versionSlug,r.docId,r.localeId).then(function(e){var r,a,c=n.getStatusInfo(i);r=o.findIndex(e,function(e){return e.id===t});for(var s=r+1;s')}}}angular.module("app").directive("toggleCheckbox",t)}(),function(){"use strict";function t(t){function e(t){return t=angular.uppercase(t),t&&"NEW"!==t?"NEEDREVIEW"===t&&(t="NEEDSWORK"):t="UNTRANSLATED",t}function n(t){return t=angular.lowercase(t),t&&"untranslated"!==t?"needswork"===t?"NeedReview":t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():"New"}var o=this,r={UNTRANSLATED:{ID:"untranslated",NAME:"Untranslated",CSSCLASS:"neutral"},NEEDSWORK:{ID:"needswork",NAME:"Needs Work",CSSCLASS:"unsure"},TRANSLATED:{ID:"translated",NAME:"Translated",CSSCLASS:"success"},APPROVED:{ID:"approved",NAME:"Approved",CSSCLASS:"highlight"}};return o.getAll=function(){return r},o.getAllAsArray=function(){return t.values(r)},o.getStatusInfo=function(t){return r[e(t)]},o.getId=function(t){return r[e(t)].ID},o.getServerId=function(t){return n(t)},o.getName=function(t){return r[e(t)].NAME},o.getCSSClass=function(t){return r[e(t)].CSSCLASS},o}t.$inject=["_"],angular.module("app").factory("TransStatusService",t)}(),function(){"use strict";function t(t,e,n,o,r,i,a,c,s){function u(){l.selected||t.$apply(function(){i.emitEvent(i.EVENT.SELECT_TRANS_UNIT,{id:t.phrase.id,updateURL:!0,focus:!0},t)})}var l=this;return l.selected=!1,l.isTranslationModified=r.isTranslationModified,l.focusTranslation=function(){c("phrase-"+t.phrase.id)},l.translationTextModified=function(t){i.emitEvent(i.EVENT.TRANSLATION_TEXT_MODIFIED,t)},l.getPhrase=function(){return t.phrase},l.init=function(){r.addController(t.phrase.id,l),n.id&&parseInt(n.id)===t.phrase.id&&i.emitEvent(i.EVENT.SELECT_TRANS_UNIT,{id:n.id,updateURL:!1,focus:n.selected},null)},l.copySource=function(e,n){e.stopPropagation(),i.emitEvent(i.EVENT.COPY_FROM_SOURCE,n,t)},l.undoEdit=function(e,n){e.stopPropagation(),i.emitEvent(i.EVENT.UNDO_EDIT,n,t)},l.cancelEdit=function(e,n){e.stopPropagation(),i.emitEvent(i.EVENT.CANCEL_EDIT,n,t)},l.saveAs=function(e,o,r){i.emitEvent(i.EVENT.SAVE_TRANSLATION,{phrase:o,status:r,locale:n.localeId,docId:n.docId},t)},l.getLocaleName=function(t){return a.getName(t)},l.toggleSaveAsOptions=function(e){i.broadcastEvent(e?"openDropdown":"closeDropdown",{},t)},l.cancelSaveAsMode=function(){s.cancelSaveAsModeIfOn()},t.$on("$destroy",function(){e.unbind("click",u),e.unbind("focus",u)}),l.updateSaveButton=function(e){l.saveButtonStatus=r.getSaveButtonStatus(t.phrase),l.saveButtonOptions=r.getSaveButtonOptions(l.saveButtonStatus),l.saveButtonText=l.saveButtonStatus.NAME,l.saveButtonDisabled=!r.isTranslationModified(e),l.loadingClass="",l.savingStatus=""},l.phraseSaving=function(t){l.loadingClass="is-loading",l.saveButtonStatus=l.savingStatus=t.status,l.saveButtonOptions=r.getSaveButtonOptions(l.saveButtonStatus),l.saveButtonText="Saving…",l.saveButtonDisabled=!0},l.saveButtonOptionsAvailable=function(){return!o.isEmpty(l.saveButtonOptions)},l.selectTransUnit=function(e){i.emitEvent(i.EVENT.SELECT_TRANS_UNIT,{id:e.id,updateURL:!0,focus:!0},t)},l}t.$inject=["$scope","$element","$stateParams","_","TransUnitService","EventService","LocaleService","focus","EditorShortcuts"],angular.module("app").controller("TransUnitCtrl",t)}(),function(){"use strict";function t(t,e,n,o,r,i,a,c,s,u,l,d){function f(t,e){t.newTranslation=e,a.emitEvent(a.EVENT.TRANSLATION_TEXT_MODIFIED,t),a.emitEvent(a.EVENT.FOCUS_TRANSLATION,t)}function p(t,e){var n=N[e.id];n.updateSaveButton(e)}function E(t,e){var n=N[e.phrase.id];n.phraseSaving(e),a.emitEvent(a.EVENT.FOCUS_TRANSLATION,e.phrase)}function g(t,e){t.selected=e||!1}function S(t,e){var n=N[e.id];n.focusTranslation()}function T(t){var e=[];return"untranslated"===t.ID?[]:(e=r("filter")(c.getAllAsArray(),{ID:"!untranslated"}),s&&(e=r("filter")(e,{ID:"!approved"})),r("filter")(e,{ID:"!"+t.ID}))}function v(t){var e=N[t.currentId].getPhrase();O.isTranslationModified(e)&&a.emitEvent(a.EVENT.SAVE_TRANSLATION,{phrase:e,status:c.getStatusInfo("TRANSLATED"),locale:t.localeId,docId:t.docId}),a.emitEvent(a.EVENT.CANCEL_EDIT,e)}function I(t,e){u.findNextId(e.currentId).then(function(t){t!==e.currentId?a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:t,updateURL:!0,focus:!0},null):v(e)})}function h(t,e){u.findPreviousId(e.currentId).then(function(t){t!==e.currentId?a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:t,updateURL:!0,focus:!0},null):v(e)})}function m(t,e){u.findNextStatus(e.currentId,"untranslated").then(function(t){t!==e.currentId?a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:t,updateURL:!0,focus:!0},null):v(e)})}var A,O=this,N={};return O.addController=function(t,e){N[t]=e},O.isTranslationModified=function(t){return t.newTranslation!==t.translation},O.getSaveButtonStatus=function(t){return""===t.newTranslation?c.getStatusInfo("untranslated"):t.translation!==t.newTranslation?c.getStatusInfo("translated"):t.status},O.getSaveButtonOptions=function(t){return T(t)},e.$on(a.EVENT.TOGGLE_SAVE_OPTIONS,function(t,e){var n=N[e.id]; -n&&n.toggleSaveAsOptions(e.open)}),e.$on(a.EVENT.SELECT_TRANS_UNIT,function(e,r){var s=N[r.id],u=N[A],d=r.updateURL;s?(l.selectedTUCtrl=s,A&&A!==r.id&&(O.isTranslationModified(u.getPhrase())&&a.emitEvent(a.EVENT.SAVE_TRANSLATION,{phrase:u.getPhrase(),status:c.getStatusInfo("TRANSLATED"),locale:o.localeId,docId:o.docId}),g(u,!1)),p(e,s.getPhrase()),A=r.id,g(s,!0),a.emitEvent(a.EVENT.FOCUS_TRANSLATION,r),d&&("editor.selectedContext.tu"!==n.current.name?n.go("editor.selectedContext.tu",{id:r.id,selected:r.focus.toString()}):(t.search("id",r.id),t.search("selected",r.focus.toString())))):i.displayWarning("Trans-unit not found:"+r.id)}),e.$on(a.EVENT.COPY_FROM_SOURCE,function(t,e){f(e,e.source)}),e.$on(a.EVENT.UNDO_EDIT,function(t,e){O.isTranslationModified(e)&&f(e,e.translation)}),e.$on(a.EVENT.CANCEL_EDIT,function(n,o){A&&(g(N[A],!1),A=!1,l.selectedTUCtrl=null),t.search("selected",null),o||t.search("id",null),d(function(){return e.$broadcast("blurOn","phrase-"+o.id)})}),e.$on(a.EVENT.TRANSLATION_TEXT_MODIFIED,p),e.$on(a.EVENT.FOCUS_TRANSLATION,S),e.$on(a.EVENT.SAVE_INITIATED,E),e.$on(a.EVENT.GOTO_NEXT_ROW,I),e.$on(a.EVENT.GOTO_PREVIOUS_ROW,h),e.$on(a.EVENT.GOTO_NEXT_UNTRANSLATED,m),e.$on(a.EVENT.SAVE_COMPLETED,p),O}t.$inject=["$location","$rootScope","$state","$stateParams","$filter","MessageHandler","EventService","TransStatusService","PRODUCTION","PhraseService","EditorShortcuts","$timeout"],angular.module("app").factory("TransUnitService",t)}(),function(){"use strict";function t(){return{restrict:"E",required:["phrase","editorContext"],scope:{phrase:"=",firstPhrase:"=",editorContext:"="},controller:"TransUnitCtrl as transUnitCtrl",templateUrl:"components/transUnit/trans-unit.html",link:function(t,e,n,o){o.init()}}}angular.module("app").directive("transUnit",t)}(),function(){"use strict";function t(t,e){function n(n){var o=t(e.USER_INFO_URL,{},{query:{method:"GET",params:{username:n}}});return o.query().$promise}function o(){var n=t(e.MY_INFO_URL,{},{query:{method:"GET"}});return n.query().$promise}return{settings:{editor:{hideMainNav:!1}},getUserInfo:n,getMyInfo:o}}t.$inject=["$resource","UrlService"],angular.module("app").factory("UserService",t)}(),function(){"use strict";function t(t,e){function n(t,n,o){return t&&n&&o?e.filter(t,function(t){return i(t,n,o)}):t}function o(t){var e={},n=Object.keys(t).filter(function(t){return-1===t.indexOf("$")});return n.forEach(function(n){e[n]=t[n]}),e}function r(t){var e=[],n=Object.keys(t).filter(function(t){return-1===t.indexOf("$")});return n.forEach(function(n){e.push(t[n])}),e}function i(n,o,r){return n&&o&&r?e.any(o,function(o){return e.any(r,function(e){return t.equals(n[o],e,!0)})}):!1}return{filterResources:n,cleanResourceList:r,cleanResourceMap:o}}t.$inject=["StringUtil","_"],angular.module("app").factory("FilterUtil",t)}(),function(){"use strict";function t(){return{getWordStatistic:function(t){return"WORD"===t[0].unit?t[0]:t[1]},getMsgStatistic:function(t){return"MESSAGE"===t[0].unit?t[0]:t[1]}}}angular.module("app").factory("StatisticUtil",t)}(),function(){"use strict";function t(){function t(t,e,n){return n&&t&&e&&(t=t.toUpperCase(),e=e.toUpperCase()),0===t.lastIndexOf(e,0)}function e(t,e,n){return n&&t&&e&&(t=t.toUpperCase(),e=e.toUpperCase()),-1!==t.indexOf(e,t.length-e.length)}function n(t,e,n){return n&&t&&e&&(t=t.toUpperCase(),e=e.toUpperCase()),t===e}return{startsWith:t,endsWith:e,equals:n}}angular.module("app").factory("StringUtil",t)}(),function(){"use strict";function t(t,e,n,o,r){function i(){return l+Array.prototype.join.call(arguments,"")}function a(t){return function(e){return t(e)}}location.origin||(location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var c=this,s="http://www.gravatar.com/avatar",u="config.json",l="",d={},f=location.origin+location.pathname+"translations";return c.serverContextPath="",c.init=function(){return l?n.when(l):e.get(u).then(function(t){var e=t.data;if(e.baseUrl)l=e.baseUrl;else{var n=e.appPath.replace(/^\//g,""),o=location.href.indexOf(n);c.serverContextPath=location.origin+location.pathname,o>=0&&(c.serverContextPath=location.href.substring(0,o)),c.serverContextPath=c.serverContextPath.replace(/\/?$/,"/"),l=c.serverContextPath+"rest"}d=r.mapValues({project:"/project/:projectSlug",docs:"/project/:projectSlug/version/:versionSlug/docs",locales:"/project/:projectSlug/version/:versionSlug/locales",status:"/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId",textFlows:"/source+trans/:localeId",docStats:"/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId",myInfo:"/user",userInfo:"/user/:username",translation:"/trans/:localeId",allLocales:"/locales"},a(i)),c.PROJECT_URL=d.project,c.LOCALE_LIST_URL=d.locales,c.DOCUMENT_LIST_URL=d.docs,c.TRANSLATION_STATUS_URL=d.status,c.TEXT_FLOWS_URL=d.textFlows,c.DOC_STATISTIC_URL=d.docStats,c.MY_INFO_URL=d.myInfo,c.USER_INFO_URL=d.userInfo,c.TRANSLATION_URL=d.translation,c.ALL_LOCALE_URL=d.allLocales,c.PROJECT_PAGE=function(t,e){return c.serverContextPath+"iteration/view/"+t+"/"+e},c.DASHBOARD_PAGE=c.serverContextPath+"dashboard"})},c.readValue=function(e){return t.search()[e]},c.gravatarUrl=function(t,e){return s+"/"+t+"?d=mm&r=g&s="+e},c.uiTranslationURL=function(t){return f+"/"+t+".json"},c.uiTranslationListURL=f+"/locales",c}t.$inject=["$location","$http","$q","$stateParams","_"],angular.module("app").factory("UrlService",t)}(); -//# sourceMappingURL=../maps/app.js.map +!function(){"use strict";angular.module("app",["ngResource","ngAnimate","ui.router","templates","cfp.hotkeys","focusOn","monospaced.elastic","gettext"])}(),function(){"use strict";function t(t,e,n,r){var o=function(t,e){return{request:function(t){return e.$broadcast("loadingStart"),t},requestError:function(n){return e.$broadcast("loadingStop"),console.error("Request error due to ",n),t.reject(n)},response:function(n){return e.$broadcast("loadingStop"),n||t.when(n)},responseError:function(n){return e.$broadcast("loadingStop"),401===n.status?console.error("Unauthorized access. Please login"):404===n.status?console.error("Service end point not found- ",n.config.url):console.error("Error in response ",n),t.reject(n)}}};o.$inject=["$q","$rootScope"],n.interceptors.push(o),e.otherwise("/"),t.state("editor",{url:"/:projectSlug/:versionSlug/translate",templateUrl:"editor/editor.html",controller:"EditorCtrl as editor",resolve:{url:["UrlService",function(t){return t.init()}]}}).state("editor.selectedContext",{url:"/:docId/:localeId",views:{"editor-content":{templateUrl:"editor/editor-content.html",controller:"EditorContentCtrl as editorContent"},"editor-suggestions":{templateUrl:"editor/editor-suggestions.html",controller:"EditorSuggestionsCtrl as editorSuggestions"},"editor-details":{templateUrl:"editor/editor-details.html",controller:"EditorDetailsCtrl as editorDetails"}}}).state("editor.selectedContext.tu",{url:"/?id&selected?states",reloadOnSearch:!1}),r.includeCheatSheet=!1}t.$inject=["$stateProvider","$urlRouterProvider","$httpProvider","hotkeysProvider"],angular.module("app").config(t)}(),function(){"use strict";angular.module("app").constant("_",window._).constant("str",window._.string).constant("Mousetrap",window.Mousetrap).constant("PRODUCTION",!0)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s){function c(){return r.getAllLocales()}function u(){return e.getMyInfo().then(function(t){d.myInfo=t,d.myInfo.locale=r.DEFAULT_LOCALE,d.myInfo.gravatarUrl=n.gravatarUrl(d.myInfo.gravatarHash,72)},function(t){o.displayError("Error loading my info: "+t)})}function l(){r.getUILocaleList().then(function(t){for(var e in t.locales){var n={localeId:t.locales[e],name:""};d.uiLocaleList.push(n)}d.myInfo.locale=r.getLocaleByLocaleId(d.uiLocaleList,r.DEFAULT_LOCALE.localeId),d.myInfo.locale||(d.myInfo.locale=r.DEFAULT_LOCALE)},function(t){o.displayInfo("Error loading UI locale. Default to '"+r.DEFAULT_LOCALE.name+"': "+t),d.myInfo.locale=r.DEFAULT_LOCALE})}var d=this;d.PRODUCTION=s,d.settings=e.settings,d.uiLocaleList=[r.DEFAULT_LOCALE],n.init().then(c).then(u).then(l),d.onChangeUILocale=function(t){d.myInfo.locale=t;var e=d.myInfo.locale.localeId;i.startsWith(e,r.DEFAULT_LOCALE.localeId,!0)?a.setCurrentLanguage(r.DEFAULT_LOCALE.localeId):a.loadRemote(n.uiTranslationURL(e)).then(function(){a.setCurrentLanguage(e)},function(t){o.displayInfo("Error loading UI locale. Default to '"+r.DEFAULT_LOCALE.name+"': "+t),a.setCurrentLanguage(r.DEFAULT_LOCALE),d.myInfo.locale=r.DEFAULT_LOCALE})},d.dashboardPage=function(){return n.DASHBOARD_PAGE}}t.$inject=["$scope","UserService","UrlService","LocaleService","MessageHandler","gettextCatalog","StringUtil","PRODUCTION"],angular.module("app").controller("AppCtrl",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s,c,u,l){function d(){I=o.readValue("status"),u.isUndefined(I)||(I=I.split(","),I=u.transform(I,function(t,e){return e=l.getServerId(e),t.push(e)})),h={status:I}}function f(t,e){var n,r,o,c,l=A.phrases;r=u.findIndex(l,function(t){return t.id===e.currentId}),o=Math.min(r+1,l.length-1),c=l[o].id,c!==e.currentId?a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:c,updateURL:!0,focus:!0},null):(n=l[r],a.emitEvent(a.EVENT.SAVE_TRANSLATION,{phrase:n,status:s.getSaveButtonStatus(n),locale:i.localeId,docId:i.docId}))}function p(t,e){var n,r,o,c,l=A.phrases;r=u.findIndex(l,function(t){return t.id===e.currentId}),o=Math.max(r-1,0),c=l[o].id,c!==e.currentId?a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:c,updateURL:!0,focus:!0},null):(n=l[r],a.emitEvent(a.EVENT.SAVE_TRANSLATION,{phrase:n,status:s.getSaveButtonStatus(n),locale:i.localeId,docId:i.docId}))}function E(t,e){var n,r,o=A.phrases,i=l.getStatusInfo(I);n=u.findIndex(o,function(t){return t.id===e.currentId});for(var s=n+1;sm&&(e.maxPageIndex=t%m!==0?e.maxPageIndex+=1:e.maxPageIndex),e.maxPageIndex=e.maxPageIndex-1<0?0:e.maxPageIndex-1,S(e.currentPageIndex)})}function S(t){var r=t*m;n.fetchAllPhrase(e.context,h,r,m).then(v)}function v(t){A.phrases=t}var I,h,m=50,A=this;return d(),A.phrases=[],e.updateContext(i.projectSlug,i.versionSlug,r.decodeDocId(i.docId),i.localeId),T(),t.$on(a.EVENT.FILTER_TRANS_UNIT,function(t,e){if(e.status.all===!0)c.search("status",null);else{var n=[];u.forEach(e.status,function(t,e){t&&n.push(e)}),c.search("status",n.join(","))}d(),T()}),t.$on(a.EVENT.GOTO_FIRST_PAGE,function(){e.currentPageIndex>0&&(e.currentPageIndex=0,g(e.currentPageIndex))}),t.$on(a.EVENT.GOTO_PREV_PAGE,function(){e.currentPageIndex>0&&(e.currentPageIndex-=1,g(e.currentPageIndex))}),t.$on(a.EVENT.GOTO_NEXT_PAGE,function(){e.currentPageIndex-1?!1:"INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable}function v(t){h(O.filter.status)?I(t):(O.filter.status.all=!1,t&&f.emitEvent(f.EVENT.FILTER_TRANS_UNIT,O.filter))}function I(t){O.filter.status.all=!0,O.filter.status.approved=!1,O.filter.status.translated=!1,O.filter.status.needsWork=!1,O.filter.status.untranslated=!1,t&&f.emitEvent(f.EVENT.FILTER_TRANS_UNIT,O.filter)}function h(t){return t.approved===t.translated&&t.translated===t.needsWork&&t.needsWork===t.untranslated}function m(){A()&&u.go("editor.selectedContext",{docId:O.context.docId,localeId:O.context.localeId})}function A(){return O.context.docId&&O.context.localeId}function N(t,e,r,o){n.getStatistics(t,e,r,o).then(function(t){O.wordStatistic=i.getWordStatistic(t),O.messageStatistic=i.getMsgStatistic(t)},function(t){l.displayError("Error loading statistic: "+t)})}var O=this;O.pageNumber=1,O.showCheatsheet=!1,O.shortcuts=E.mapValues(E.values(p.SHORTCUTS),function(t){var e=E.flatten(t.keyCombos,"combo");return{combos:E.map(e,function(t){return p.symbolizeKey(t)}),description:t.keyCombos[0].description}}),O.filter={status:{all:!0,approved:!1,translated:!1,needsWork:!1,untranslated:!1}},T(),g.bind("?",function(e){var n=e.srcElement;O.showCheatsheet||S(n)||(O.toggleKeyboardShortcutsModal(),t.$digest())},"keyup"),O.context=a.initContext(c.projectSlug,c.versionSlug,n.decodeDocId(c.docId),r.DEFAULT_LOCALE,r.DEFAULT_LOCALE.localeId,"READ_WRITE"),O.toggleKeyboardShortcutsModal=function(){O.showCheatsheet=!O.showCheatsheet},O.versionPage=function(){return s.PROJECT_PAGE(O.context.projectSlug,O.context.versionSlug)},O.encodeDocId=function(t){return n.encodeDocId(t)},o.getProjectInfo(c.projectSlug).then(function(t){O.projectInfo=t},function(t){l.displayError("Error getting project information:"+t)}),r.getSupportedLocales(O.context.projectSlug,O.context.versionSlug).then(function(t){if(O.locales=t,!O.locales||O.locales.length<=0)l.displayError("No supported locales in "+O.context.projectSlug+" : "+O.context.versionSlug);else{var e=u.params.localeId,n=O.context;e?(n.localeId=e,r.containsLocale(O.locales,e)||(n.localeId=O.locales[0].localeId)):(n.localeId=O.locales[0].localeId,m())}},function(t){l.displayError("Error getting locale list: "+t)}),n.findAll(O.context.projectSlug,O.context.versionSlug).then(function(t){if(O.documents=t,!O.documents||O.documents.length<=0)l.displayError("No documents in "+O.context.projectSlug+" : "+O.context.versionSlug);else{var e=u.params.docId,r=O.context;e?(r.docId=n.decodeDocId(e),n.containsDoc(O.documents,r.docId)||(r.docId=O.documents[0].name)):(r.docId=O.documents[0].name,m())}},function(t){l.displayError("Error getting document list: "+t)}),d.$on(f.EVENT.SELECT_TRANS_UNIT,function(t,e){O.unitSelected=e.id,O.focused=e.focus}),d.$on(f.EVENT.CANCEL_EDIT,function(){O.unitSelected=!1,O.focused=!1}),d.$on(f.EVENT.REFRESH_STATISTIC,function(t,e){N(e.projectSlug,e.versionSlug,e.docId,e.localeId),O.context.docId=e.docId,O.context.localeId=e.localeId}),O.pageNumber=function(){return 0===a.maxPageIndex?a.currentPageIndex+1:a.currentPageIndex+1+" of "+(a.maxPageIndex+1)},O.getLocaleName=function(t){return r.getName(t)},O.firstPage=function(){f.emitEvent(f.EVENT.GOTO_FIRST_PAGE)},O.lastPage=function(){f.emitEvent(f.EVENT.GOTO_LAST_PAGE)},O.nextPage=function(){f.emitEvent(f.EVENT.GOTO_NEXT_PAGE)},O.previousPage=function(){f.emitEvent(f.EVENT.GOTO_PREV_PAGE)},O.resetFilter=function(){I(!0)},O.updateFilter=function(){v(!0)},this.settings=e.settings.editor,p.enableEditorKeys()}t.$inject=["$scope","UserService","DocumentService","LocaleService","ProjectService","EditorService","StatisticUtil","UrlService","$stateParams","$state","MessageHandler","$rootScope","EventService","EditorShortcuts","_","Mousetrap"],angular.module("app").controller("EditorCtrl",t)}(),function(){"use strict";function t(){var t=this;return t}angular.module("app").controller("EditorDetailsCtrl",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s,c,u){function l(t,e){return i.hasTranslationChanged(t)||t.status!==e}function d(t){var i=n.cloneDeep(p.context),l=E[t],d=e(r.TRANSLATION_URL,{},{update:{method:"PUT",params:{localeId:l.locale}}}),f={id:l.phrase.id,revision:l.phrase.revision||0,content:l.phrase.newTranslations[0],contents:l.phrase.newTranslations,status:u.getServerId(l.status.ID),plural:l.phrase.plural};d.update(f).$promise.then(function(t){var e=l.phrase.status.ID;a.onTransUnitUpdated(i,f.id,l.locale,t.revision,t.status,l.phrase),s.updateStatistic(i.projectSlug,i.versionSlug,l.docId,l.locale,e,u.getId(t.status),l.phrase.wordCount),o.emitEvent(o.EVENT.SAVE_COMPLETED,l.phrase)},function(t){c.displayWarning("Update translation failed for "+f.id+" -"+t),a.onTransUnitUpdateFailed(f.id),o.emitEvent(o.EVENT.SAVE_COMPLETED,l.phrase)}),delete E[t]}function f(t,e){return n.isEmpty(n.compact(t.newTranslations))?u.getStatusInfo("UNTRANSLATED"):e}var p=this,E={};return p.context={},p.currentPageIndex=0,p.maxPageIndex=0,p.initContext=function(t,e,n,r,o,a){return p.context={projectSlug:t,versionSlug:e,docId:n,srcLocale:r,localeId:o,mode:a},p.context},p.updateContext=function(t,e,n,r){p.context.projectSlug!==t&&(p.context.projectSlug=t),p.context.versionSlug!==e&&(p.context.versionSlug=e),p.context.docId!==n&&(p.context.docId=n),p.context.localeId!==r&&(p.context.localeId=r)},t.$on(o.EVENT.SAVE_TRANSLATION,function(t,e){var r=e.phrase,a=e.status;if(l(r,a)){if(n.has(E,r.id)){var i=E[r.id];i.phrase=r,i.status=a}else a=f(r,a),E[r.id]={phrase:r,status:a,locale:e.locale,docId:e.docId};o.emitEvent(o.EVENT.SAVE_INITIATED,e),d(r.id)}}),p}t.$inject=["$rootScope","$resource","_","UrlService","EventService","PhraseService","PhraseUtil","DocumentService","MessageHandler","TransStatusService"],angular.module("app").factory("EditorService",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s,c){function u(e){h.selectedTUCtrl&&(e.preventDefault(),t.emitEvent(t.EVENT.COPY_FROM_SOURCE,{phrase:h.selectedTUCtrl.getPhrase()}))}function l(e){h.selectedTUCtrl&&(e.preventDefault(),e.stopPropagation(),t.emitEvent(t.EVENT.GOTO_NEXT_ROW,v()))}function d(e){h.selectedTUCtrl&&(e.preventDefault(),e.stopPropagation(),t.emitEvent(t.EVENT.GOTO_PREVIOUS_ROW,v()))}function f(e){if(e.preventDefault(),e.stopPropagation(),m)h.cancelSaveAsModeIfOn(),h.selectedTUCtrl&&h.selectedTUCtrl.focusTranslation();else if(h.selectedTUCtrl){var n=h.selectedTUCtrl.getPhrase();o.hasTranslationChanged(n)?t.emitEvent(t.EVENT.UNDO_EDIT,n):t.emitEvent(t.EVENT.CANCEL_EDIT,n)}}function p(n){if(h.selectedTUCtrl){n.preventDefault();var r=h.selectedTUCtrl.getPhrase();t.emitEvent(t.EVENT.SAVE_TRANSLATION,{phrase:r,status:o.getSaveButtonStatus(r),locale:e.localeId,docId:e.docId})}}function E(e){e.preventDefault(),h.cancelSaveAsModeIfOn();var n=h.selectedTUCtrl.getPhrase();n&&(t.emitEvent(t.EVENT.TOGGLE_SAVE_OPTIONS,{id:n.id,open:!0}),I(n,"n","needsWork"),I(n,"t","translated"),I(n,"a","approved"))}function g(t,e,n,r,o){return this.defaultKey=t,this.keyCombos=[T(t,n,o,e)],r&&(this.otherKeys=r instanceof Array?r:[r],this.keyCombos.push(T(this.otherKeys,"",o,e))),this}function T(t,e,n,r){var o={allowIn:["TEXTAREA"],callback:r};return o.combo=t,e&&(o.description=e),n&&(o.action=n),o}function S(t){r.get(t.defaultKey)||n.forEach(t.keyCombos,function(t){r.add(t)})}function v(){return{currentId:h.selectedTUCtrl.getPhrase().id}}function I(t,e,n){var o=a.getStatusInfo(n);return r.add({combo:e,description:s.sprintf("Save as %s",n),allowIn:["INPUT","TEXTAREA"],action:"keydown",callback:function(e){h.saveTranslationCallBack(e,t,o)}})}var h=this,m=!1;return h.selectedTUCtrl=null,h.SHORTCUTS={COPY_SOURCE:new g("alt+c",u,"Copy source as translation","alt+g"),CANCEL_EDIT:new g("esc",f,"Cancel edit"),SAVE_AS_CURRENT_BUTTON_OPTION:new g("mod+s",p,"Save"),SAVE_AS_MODE:new g("mod+shift+s",E,"Save as…"),SAVE_AS_NEEDSWORK:{keyCombos:[{combo:"mod+shift+s n",description:"Save as needs work"}]},SAVE_AS_TRANSLATED:{keyCombos:[{combo:"mod+shift+s t",description:"Save as translated"}]},SAVE_AS_APPROVED:{keyCombos:[{combo:"mod+shift+s a",description:"Save as approved"}]},GOTO_NEXT_ROW_FAST:new g("mod+enter",l,"Save (if changed) and go to next string",["alt+k","alt+down"]),GOTO_PREVIOUS_ROW:new g("mod+shift+enter",d,"Save (if changed) and go to previous string",["alt+j","alt+up"])},h.enableEditorKeys=function(){r.get(h.SHORTCUTS.COPY_SOURCE.defaultKey)||n.forOwn(h.SHORTCUTS,function(t){t instanceof g&&S(t)})},h.disableEditorKeys=function(){n.forOwn(h.SHORTCUTS,function(t){n.forEach(t.keyCombos,function(t){h.deleteKeys(t.combo,t.action)})})},h.saveTranslationCallBack=function(n,r,o){m=!0,n.preventDefault(),n.stopPropagation(),t.emitEvent(t.EVENT.SAVE_TRANSLATION,{phrase:r,status:o,locale:e.localeId,docId:e.docId}),h.cancelSaveAsModeIfOn()},h.cancelSaveAsModeIfOn=function(){m&&h.selectedTUCtrl&&(m=!1,h.deleteKeys(["n","t","a"]),t.emitEvent(t.EVENT.TOGGLE_SAVE_OPTIONS,{id:h.selectedTUCtrl.getPhrase().id,open:!1}))},h.deleteKeys=function(t,e){var o=t instanceof Array?t:[t];e=e||"keydown",n.forEach(o,function(t){r.del(t),i.unbind(t,e)})},h.symbolizeKey=function(t){var e={command:"⌘",shift:"⇧",left:"←",right:"→",up:"↑",down:"↓","return":"↩",backspace:"⌫"};t=t.split("+");for(var n=0;n=0?"command":"ctrl"),t[n]=e[t[n]]||t[n];return t.join(" + ")},h}t.$inject=["EventService","$stateParams","_","hotkeys","PhraseUtil","TransStatusService","Mousetrap","str","$window"],angular.module("app").factory("EditorShortcuts",t)}(),function(){"use strict";function t(){var t=this;return t}angular.module("app").controller("EditorSuggestionsCtrl",t)}(),function(){"use strict";function t(){return{restrict:"A",link:function(t,e,n){return t.$on("blurOn",function(t,r){return r===n.blurOn?e[0].blur():void 0})}}}angular.module("app").directive("blurOn",t)}(),function(){"use strict";function t(t){return{restrict:"A",scope:{callback:"&clickElsewhere"},link:function(e,n){var r=function(t){n[0].contains(t.target)||e.$apply(e.callback(t))};t.on("click",r),e.$on("$destroy",function(){t.off("click",r)})}}}t.$inject=["$document"],angular.module("app").directive("clickElsewhere",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s){function c(t,e){return t+"-"+e}function u(t,e,n,r){var a=o.getWordStatistic(t),i=o.getMsgStatistic(t);if(a){r=parseInt(r);var s=parseInt(a[e])-r;a[e]=0>s?0:s,a[n]=parseInt(a[n])+r}if(i){var c=parseInt(i[e])-1;i[e]=0>c?0:c,i[n]=parseInt(i[n])+1}}var l=this,d={};return l.findAll=function(t,r){var o=e(n.DOCUMENT_LIST_URL,{},{query:{method:"GET",params:{projectSlug:t,versionSlug:r},isArray:!0}});return o.query().$promise},l.getStatistics=function(r,o,a,u){if(a&&u){var f=c(a,u);if(i.has(d,f))return t.when(d[f]);var p=l.encodeDocId(a),E=e(n.DOC_STATISTIC_URL,{},{query:{method:"GET",params:{projectSlug:r,versionSlug:o,docId:p,localeId:u},isArray:!0}});return E.query().$promise.then(function(t){return i.forEach(t,function(t){t[s.getId("needswork")]=t.needReview||0}),d[f]=t,d[f]})}},l.encodeDocId=function(t){return t?t.replace(/\//g,","):t},l.decodeDocId=function(t){return t?t.replace(/\,/g,"/"):t},l.containsDoc=function(t,e){return i.any(t,function(t){return r.equals(t.name,e,!0)})},l.updateStatistic=function(t,e,n,r,o,s,l){var f=c(n,r);i.has(d,f)&&(u(d[f],o,s,l),a.emitEvent(a.EVENT.REFRESH_STATISTIC,{projectSlug:t,versionSlug:e,docId:n,localeId:r}))},l}t.$inject=["$q","$resource","UrlService","StringUtil","StatisticUtil","EventService","_","TransStatusService"],angular.module("app").factory("DocumentService",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i){var s,c=this,u=t.$new(),l=r.openClass,d=angular.noop,f=e.onToggle?n(e.onToggle):angular.noop;this.init=function(r){c.$element=r,e.isOpen&&(s=n(e.isOpen),d=s.assign,t.$watch(s,function(t){u.isOpen=!!t}))},this.toggle=function(t){return u.isOpen=arguments.length?!!t:!u.isOpen,u.isOpen},this.isOpen=function(){return u.isOpen},u.getToggleElement=function(){return c.toggleElement},u.focusToggleElement=function(){c.toggleElement&&c.toggleElement[0].focus()},u.$watch("isOpen",function(e,n){a[e?"addClass":"removeClass"](c.$element,l),e?(i(function(){u.focusToggleElement()}),o.open(u)):o.close(u),d(t,e),angular.isDefined(e)&&e!==n&&f(t,{open:!!e})}),t.$on("$locationChangeSuccess",function(){u.isOpen=!1}),t.$on("$destroy",function(){u.$destroy()}),t.$on("openDropdown",function(){u.isOpen=!0}),t.$on("closeDropdown",function(){u.isOpen=!1})}t.$inject=["$scope","$attrs","$parse","dropdownConfig","DropdownService","$animate","$timeout"],angular.module("app").controller("DropdownCtrl",t)}(),function(){"use strict";function t(t){var e=null,n=this;n.open=function(n){e||(t.bind("click",r),t.bind("keydown",o)),e&&e!==n&&(e.isOpen=!1),e=n},n.close=function(n){e===n&&(e=null,t.unbind("click",r),t.unbind("keydown",o))};var r=function(t){if(e){var n=e.getToggleElement();t&&n&&n[0].contains(t.target)||e.$apply(function(){e.isOpen=!1})}},o=function(t){27===t.which&&(e.focusToggleElement(),r())}}t.$inject=["$document"],angular.module("app").service("DropdownService",t)}(),function(){"use strict";var t={openClass:"is-active"};angular.module("app").constant("dropdownConfig",t)}(),function(){"use strict";function t(){return{restrict:"EA",controller:"DropdownCtrl",link:function(t,e,n,r){r.init(e)}}}function e(){return{restrict:"A",require:"?^dropdown",scope:{callback:"&onCloseDropdown"},link:function(t,e,n,r){r.onCloseDropdown=t.callback}}}function n(){return{restrict:"EA",require:"?^dropdown",link:function(t,e,n,r){if(r){r.toggleElement=e;var o=function(o){o.preventDefault(),o.stopPropagation(),e.hasClass("disabled")||n.disabled||t.$apply(function(){r.toggle()})};e.bind("click",o),e.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(r.isOpen,function(n){e.attr("aria-expanded",!!n),r.onCloseDropdown&&!n&&t.$applyAsync(r.onCloseDropdown)}),t.$on("$destroy",function(){e.unbind("click",o)})}}}}angular.module("app").directive("dropdown",t).directive("onCloseDropdown",e).directive("dropdownToggle",n)}(),function(){"use strict";function t(t){var e=this;return e.EVENT={LOADING_START:"loadingStart",LOADING_STOP:"loadingStop",SELECT_TRANS_UNIT:"selectTransUnit",COPY_FROM_SOURCE:"copyFromSource",UNDO_EDIT:"undoEdit",CANCEL_EDIT:"cancelEdit",FOCUS_TRANSLATION:"focusTranslation",SAVE_TRANSLATION:"saveTranslation",SAVE_INITIATED:"saveInitiated",SAVE_COMPLETED:"saveCompleted",TRANSLATION_TEXT_MODIFIED:"translationTextModified",REFRESH_STATISTIC:"refreshStatistic",GOTO_PREV_PAGE:"gotoPreviousPage",GOTO_NEXT_PAGE:"gotoNextPage",GOTO_FIRST_PAGE:"gotoFirstPage",GOTO_LAST_PAGE:"gotoLastPage",GOTO_NEXT_ROW:"gotoNextRow",GOTO_PREVIOUS_ROW:"gotoPreviousRow",GOTO_NEXT_UNTRANSLATED:"gotoNextUntranslated",TOGGLE_SAVE_OPTIONS:"openSaveOptions",FILTER_TRANS_UNIT:"filterTransUnit"},e.broadcastEvent=function(e,n,r){r=r||t,r.$broadcast(e,n)},e.emitEvent=function(e,n,r){r=r||t,r.$emit(e,n)},e}t.$inject=["$rootScope"],angular.module("app").factory("EventService",t)}(),function(){"use strict";function t(t){return{restrict:"E",required:["name"],scope:{name:"@",title:"@",size:"@"},link:function(e,n){var r="",o="";n.addClass("Icon"),e.title&&(o=""+e.title+""),r=''+o+"",n.html(t.trustAsHtml(r))}}}t.$inject=["$sce"],angular.module("app").directive("icon",t)}(),function(){"use strict";function t(t,e,n,r,o){function a(e,n){var o=r(t.LOCALE_LIST_URL,{},{query:{method:"GET",params:{projectSlug:e,versionSlug:n},isArray:!0}});return o.query().$promise}function i(){var e=r(t.ALL_LOCALE_URL,{},{query:{method:"GET",isArray:!0}});return e.query().$promise.then(function(t){d=n.cleanResourceList(t)})}function s(){var e=r(t.uiTranslationListURL,{},{query:{method:"GET"}});return e.query().$promise}function c(t,n){return t?o.find(t,function(t){return e.equals(t.localeId,n,!0)}):void 0}function u(t,n){return o.any(t,function(t){return e.equals(t.localeId,n,!0)})}function l(t){var e=c(d,t);return e?e.name:t}var d=[];return{getSupportedLocales:a,getUILocaleList:s,getLocaleByLocaleId:c,getAllLocales:i,containsLocale:u,getName:l,DEFAULT_LOCALE:{localeId:"en-US",name:"English"}}}t.$inject=["UrlService","StringUtil","FilterUtil","$resource","_"],angular.module("app").factory("LocaleService",t)}(),function(){"use strict";function t(t){return{restrict:"EA",scope:{loading:"=",inverted:"="},link:function(e){e.classes="",e.$on(t.EVENT.LOADING_START,function(){e.classes+=" is-loading"}),e.$on(t.EVENT.LOADING_STOP,function(){e.classes=e.classes.replace("is-loading","")}),e.$watch("inverted",function(t){t?e.classes+=" LogoLoader--inverted":e.classes=e.classes.replace("LogoLoader--inverted","")})},templateUrl:"components/logo-loader/logo-loader.html"}}t.$inject=["EventService"],angular.module("app").directive("logoLoader",t)}(),function(){"use strict";function t(){return{displayError:function(t){console.error(t)},displayWarning:function(t){console.warn(t)},displayInfo:function(t){console.info(t)}}}angular.module("app").factory("MessageHandler",t)}(),function(){"use strict";function t(){}angular.module("app").factory("NotificationService",t)}(),function(){"use strict";function t(t,e,n,r,o,a){function i(t,e,n,r){return t+"-"+e+"-"+n+"-"+r}var s=this,c={},u={};return s.getStates=function(s,u,l,d){var f=i(s,u,l,d);if(a.has(c,f))return t.when(c[f]);var p=o.encodeDocId(l),E={query:{method:"GET",params:{projectSlug:s,versionSlug:u,docId:p,localeId:d},isArray:!0}},g=e(r.TRANSLATION_STATUS_URL,{},E);return g.query().$promise.then(function(t){return t=n.cleanResourceList(t),c[f]=t,c[f]})},s.getTransUnits=function(o,i){function s(t){t=n.cleanResourceMap(t);for(var e in t)u[e][i]=t[e][i],l[e]=u[e];return l}function c(t){t=n.cleanResourceMap(t);for(var e in t)u[e]=t[e],l[e]=u[e];return l}var l={},d=[],f=[];if(o.forEach(function(t){a.has(u,t)?u[t][i]?l[t]=u[t]:f.push(t):d.push(t)}),a.isEmpty(d)&&a.isEmpty(f))return t.when(l);var p,E;return a.isEmpty(d)||(p=e(r.TEXT_FLOWS_URL,{},{query:{method:"GET",params:{localeId:i,ids:d.join(",")}}})),a.isEmpty(f)||(E=e(r.TRANSLATION_URL,{},{query:{method:"GET",params:{localeId:i,ids:f.join(",")}}})),p&&E?p.query().$promise.then(c).then(E.query().$promise.then(s)):p?p.query().$promise.then(c):E?E.query().$promise.then(s):void 0},s.onTransUnitUpdated=function(t,e,n,r,o,s){var l=i(t.projectSlug,t.versionSlug,t.docId,n),d=a.find(c[l],function(t){return t.id===e});d&&(d.state=o);var f=u[e][n];f||(f={}),f.revision=parseInt(r),f.state=o,f.contents=s.newTranslations.slice()},s}t.$inject=["$q","$resource","FilterUtil","UrlService","DocumentService","_"],angular.module("app").factory("PhraseCache",t)}(),function(){"use strict";function t(t,e,n,r,o){function a(t,e){return r.find(e,function(e){return e.id===t})}function i(e,n){return n&&(e=t.filterResources(e,["status"],n)),r.map(e,function(t){return t.id})}var s={};return s.phrases=[],s.getPhraseCount=function(t,n){return e.getStates(t.projectSlug,t.versionSlug,t.docId,t.localeId).then(function(t){var e=i(t,n.status);return e.length})},s.fetchAllPhrase=function(t,o,a,c){function u(t){var n=i(t,o.status);return isNaN(a)||(n=isNaN(c)?n.slice(a):n.slice(a,a+c)),e.getTransUnits(n,p).then(l).then(f)}function l(t){return r.map(t,function(t,e){var r=t.source,o=t[p];return{id:parseInt(e),sources:r.plural?r.contents:[r.content],translations:d(r,o),newTranslations:d(r,o),plural:r.plural,status:n.getStatusInfo(o?o.state:"untranslated"),revision:o?parseInt(o.revision):0,wordCount:parseInt(r.wordCount)}})}function d(t,e){return t.plural?e&&e.contents?e.contents.slice():[]:e?[e.content]:[]}function f(n){return e.getStates(t.projectSlug,t.versionSlug,t.docId,p).then(function(t){return s.phrases=r.sortBy(n,function(e){var o=r.findIndex(t,function(t){return t.id===e.id});return o>=0?o:n.length}),s.phrases})}var p=t.localeId;return e.getStates(t.projectSlug,t.versionSlug,t.docId,p).then(u)},s.onTransUnitUpdated=function(t,r,o,i,c,u){e.onTransUnitUpdated(t,r,o,i,c,u);var l=a(r,s.phrases);l&&(l.translations=u.newTranslations.slice(),l.revision=i,l.status=n.getStatusInfo(c))},s.onTransUnitUpdateFailed=function(t){var e=a(t,s.phrases);e&&(e.newTranslations=e.translations.slice())},s.findNextId=function(t){return e.getStates(o.projectSlug,o.versionSlug,o.docId,o.localeId).then(function(e){var n,o;return n=r.findIndex(e,function(e){return e.id===t}),o=n+1=0?n-1:0,e[o].id})},s.findNextStatus=function(t,a){return e.getStates(o.projectSlug,o.versionSlug,o.docId,o.localeId).then(function(e){var o,i,s=n.getStatusInfo(a);o=r.findIndex(e,function(e){return e.id===t});for(var c=o+1;c '},newline:{regex:/\n/g,template:'\n'},tab:{regex:/\t/g,template:' '}};return{restrict:"A",required:["ngBind"],scope:{ngBind:"="},link:function(n,r){n.$watch("ngBind",function(n){n=t(n,e.space),n=t(n,e.newline),n=t(n,e.tab),r.html(n)})}}}angular.module("app").directive("renderWhitespaceCharacters",t)}(),function(){"use strict";function t(){var t=this;t.init=function(){var e=t.container[0],n=t.child[0],r=n.offsetWidth-e.offsetWidth;t.width=r/2}}angular.module("app").controller("ScrollbarWidthCtrl",t)}(),function(){"use strict";function t(){return{restrict:"A",controller:"ScrollbarWidthCtrl as scrollbarWidthCtrl",link:function(t,e,n,r){r.init(e)}}}function e(){return{restrict:"A",require:"?^scrollbarWidth",link:function(t,e,n,r){r&&e.css(n.scrollbarWidthElement,r.width)}}}function n(){return{restrict:"A",require:"?^scrollbarWidth",link:function(t,e,n,r){r&&(r.container=e)}}}function r(){return{restrict:"A",require:"?^scrollbarWidth",link:function(t,e,n,r){r&&(r.child=e)}}}angular.module("app").directive("scrollbarWidth",t).directive("scrollbarWidthElement",e).directive("scrollbarWidthContainer",n).directive("scrollbarWidthChild",r)}(),function(){"use strict";function t(){return{restrict:"A",link:function(t,e){e.after('')}}}angular.module("app").directive("toggleCheckbox",t)}(),function(){"use strict";function t(t){function e(t){return t=angular.uppercase(t),t&&"NEW"!==t?"NEEDREVIEW"===t&&(t="NEEDSWORK"):t="UNTRANSLATED",t}function n(t){return t=angular.lowercase(t),t&&"untranslated"!==t?"needswork"===t?"NeedReview":t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():"New"}var r=this,o={UNTRANSLATED:{ID:"untranslated",NAME:"Untranslated",CSSCLASS:"neutral"},NEEDSWORK:{ID:"needswork",NAME:"Needs Work",CSSCLASS:"unsure"},TRANSLATED:{ID:"translated",NAME:"Translated",CSSCLASS:"success"},APPROVED:{ID:"approved",NAME:"Approved",CSSCLASS:"highlight"}};return r.getAll=function(){return o},r.getAllAsArray=function(){return t.values(o)},r.getStatusInfo=function(t){return o[e(t)]},r.getId=function(t){return o[e(t)].ID},r.getServerId=function(t){return n(t)},r.getName=function(t){return o[e(t)].NAME},r.getCSSClass=function(t){return o[e(t)].CSSCLASS},r}t.$inject=["_"],angular.module("app").factory("TransStatusService",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s,c,u){function l(){d.selected||t.$apply(function(){a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:t.phrase.id,updateURL:!0,focus:!0},t)})}var d=this;return d.selected=!1,d.focused=!1,d.focusedTranslationIndex=0,d.hasTranslationChanged=u.hasTranslationChanged,d.focusTranslation=function(){d.selected&&s("phrase-"+t.phrase.id+"-"+d.focusedTranslationIndex)},d.onTextAreaFocus=function(e,n){d.focused=!0,r.isUndefined(n)||(d.focusedTranslationIndex=n),d.selected||a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:e.id,updateURL:!0,focus:!0},t)},d.translationTextModified=function(t){a.emitEvent(a.EVENT.TRANSLATION_TEXT_MODIFIED,t)},d.getPhrase=function(){return t.phrase},d.init=function(){o.addController(t.phrase.id,d),n.id&&parseInt(n.id)===t.phrase.id&&a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:n.id,updateURL:!1,focus:n.selected})},d.copySource=function(e,n,r){e.stopPropagation(),a.emitEvent(a.EVENT.COPY_FROM_SOURCE,{phrase:n,sourceIndex:r},t)},d.undoEdit=function(e,n){e.stopPropagation(),a.emitEvent(a.EVENT.UNDO_EDIT,n,t)},d.cancelEdit=function(e,n){e.stopPropagation(),a.emitEvent(a.EVENT.CANCEL_EDIT,n,t) +},d.saveAs=function(t,e,n){c.saveTranslationCallBack(t,e,n)},d.getLocaleName=function(t){return i.getName(t)},d.toggleSaveAsOptions=function(e){a.broadcastEvent(e?"openDropdown":"closeDropdown",{},t),e&&s(t.phrase.id+"-saveAsOption-0")},d.cancelSaveAsMode=function(){c.cancelSaveAsModeIfOn()},t.$on("$destroy",function(){e.unbind("click",l),e.unbind("focus",l)}),d.updateSaveButton=function(e){d.saveButtonStatus=u.getSaveButtonStatus(t.phrase),d.saveButtonOptions=o.getSaveButtonOptions(d.saveButtonStatus,t.phrase),d.saveButtonText=d.saveButtonStatus.NAME,d.saveButtonDisabled=!u.hasTranslationChanged(e),d.loadingClass="",d.savingStatus=""},d.phraseSaving=function(t){d.loadingClass="is-loading",d.saveButtonStatus=d.savingStatus=t.status,d.saveButtonOptions=o.getSaveButtonOptions(d.saveButtonStatus,t.phrase),d.saveButtonText="Saving…",d.saveButtonDisabled=!0},d.saveButtonOptionsAvailable=function(){return!r.isEmpty(d.saveButtonOptions)},d.selectTransUnit=function(e){d.selected||a.emitEvent(a.EVENT.SELECT_TRANS_UNIT,{id:e.id,updateURL:!0,focus:!0},t)},d}t.$inject=["$scope","$element","$stateParams","_","TransUnitService","EventService","LocaleService","focus","EditorShortcuts","PhraseUtil"],angular.module("app").controller("TransUnitCtrl",t)}(),function(){"use strict";function t(t,e,n,r,o,a,i,s,c,u,l,d,f){function p(t,e){var n=0;if(t.plural){var r=A[t.id];n=r.focusedTranslationIndex}t.newTranslations[n]=e,s.emitEvent(s.EVENT.TRANSLATION_TEXT_MODIFIED,t),s.emitEvent(s.EVENT.FOCUS_TRANSLATION,t)}function E(t,e){t.newTranslations=e.slice(),s.emitEvent(s.EVENT.TRANSLATION_TEXT_MODIFIED,t),s.emitEvent(s.EVENT.FOCUS_TRANSLATION,t)}function g(t,e){var n=A[e.id];n.updateSaveButton(e)}function T(t,e){var n=A[e.phrase.id];n.phraseSaving(e),s.emitEvent(s.EVENT.FOCUS_TRANSLATION,e.phrase)}function S(t,e){t.selected!==e&&(t.selected=e||!1)}function v(t,e){var n=A[e.id];n.focusTranslation()}function I(t,e){var n=[];return"untranslated"===t.ID?n:(n=a("filter")(c.getAllAsArray(),{ID:"!untranslated"}),e.plural&&(d.hasNoTranslation(e)?n=a("filter")(n,{ID:"!needswork"}):d.hasEmptyTranslation(e)&&(n=a("filter")(n,{ID:"!translated"}))),u&&(n=a("filter")(n,{ID:"!approved"})),a("filter")(n,{ID:"!"+t.ID}))}var h,m=this,A={};return m.addController=function(t,e){A[t]=e},m.getSaveButtonOptions=function(t,e){return I(t,e)},n.$on(s.EVENT.TOGGLE_SAVE_OPTIONS,function(t,e){var n=A[e.id];n&&n.toggleSaveAsOptions(e.open)}),n.$on(s.EVENT.SELECT_TRANS_UNIT,function(t,n){var a=A[n.id],u=A[h],f=n.updateURL;a?(l.selectedTUCtrl=a,h&&h!==n.id&&(S(u,!1),d.hasTranslationChanged(u.getPhrase())&&s.emitEvent(s.EVENT.SAVE_TRANSLATION,{phrase:u.getPhrase(),status:c.getStatusInfo("TRANSLATED"),locale:o.localeId,docId:o.docId})),g(t,a.getPhrase()),h=n.id,S(a,!0),s.emitEvent(s.EVENT.FOCUS_TRANSLATION,n),f&&("editor.selectedContext.tu"!==r.current.name?r.go("editor.selectedContext.tu",{id:n.id,selected:n.focus.toString()}):(e.search("id",n.id),e.search("selected",n.focus.toString())))):i.displayWarning("Trans-unit not found:"+n.id)}),n.$on(s.EVENT.COPY_FROM_SOURCE,function(e,n){var r=0;if(n.phrase.plural&&(r=n.sourceIndex,t.isUndefined(r))){var o=A[n.phrase.id];r=o.focusedTranslationIndex,n.phrase.sources.length=0&&(s.serverContextPath=location.href.substring(0,r)),s.serverContextPath=s.serverContextPath.replace(/\/?$/,"/"),l=s.serverContextPath+"rest"}d=o.mapValues({project:"/project/:projectSlug",docs:"/project/:projectSlug/version/:versionSlug/docs",locales:"/project/:projectSlug/version/:versionSlug/locales",status:"/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId",textFlows:"/source+trans/:localeId",docStats:"/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId",myInfo:"/user",userInfo:"/user/:username",translation:"/trans/:localeId",allLocales:"/locales"},i(a)),s.PROJECT_URL=d.project,s.LOCALE_LIST_URL=d.locales,s.DOCUMENT_LIST_URL=d.docs,s.TRANSLATION_STATUS_URL=d.status,s.TEXT_FLOWS_URL=d.textFlows,s.DOC_STATISTIC_URL=d.docStats,s.MY_INFO_URL=d.myInfo,s.USER_INFO_URL=d.userInfo,s.TRANSLATION_URL=d.translation,s.ALL_LOCALE_URL=d.allLocales,s.PROJECT_PAGE=function(t,e){return s.serverContextPath+"iteration/view/"+t+"/"+e},s.DASHBOARD_PAGE=s.serverContextPath+"dashboard"})},s.readValue=function(e){return t.search()[e]},s.gravatarUrl=function(t,e){return c+"/"+t+"?d=mm&r=g&s="+e},s.uiTranslationURL=function(t){return f+"/"+t+".json"},s.uiTranslationListURL=f+"/locales",s}t.$inject=["$location","$http","$q","$stateParams","_"],angular.module("app").factory("UrlService",t)}(); +//# sourceMappingURL=../maps/app.js.map \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/js/libs.js b/zanata-war/src/main/webapp/app/js/libs.js index fbbe8e0358..611008333d 100644 --- a/zanata-war/src/main/webapp/app/js/libs.js +++ b/zanata-war/src/main/webapp/app/js/libs.js @@ -1,12 +1,12 @@ -!function(e,t,n){"use strict";function r(e,t){return t=t||Error,function(){var n,r,i=arguments[0],o="["+(e?e+":":"")+i+"] ",a=arguments[1],s=arguments,l=function(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e};for(n=o+a.replace(/\{\d+\}/g,function(e){var t,n=+e.slice(1,-1);return n+20&&t-1 in e}function o(e,t,n){var r,a;if(e)if(x(e))for(r in e)"prototype"==r||"length"==r||"name"==r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(Zr(e)||i(e)){var s="object"!=typeof e;for(r=0,a=e.length;a>r;r++)(s||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==o)e.forEach(t,n,e);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);return e}function a(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=a(e),i=0;in;n++){var i=arguments[n];if(i)for(var o=Object.keys(i),a=0,s=o.length;s>a;a++){var l=o[a];e[l]=i[l]}}return u(e,t),e}function d(e){return parseInt(e,10)}function f(e,t){return p(new(p(function(){},{prototype:e})),t)}function h(){}function m(e){return e}function g(e){return function(){return e}}function b(e){return"undefined"==typeof e}function v(e){return"undefined"!=typeof e}function y(e){return null!==e&&"object"==typeof e}function $(e){return"string"==typeof e}function S(e){return"number"==typeof e}function C(e){return"[object Date]"===zr.call(e)}function x(e){return"function"==typeof e}function w(e){return"[object RegExp]"===zr.call(e)}function D(e){return e&&e.window===e}function N(e){return e&&e.$evalAsync&&e.$watch}function T(e){return"[object File]"===zr.call(e)}function E(e){return"[object Blob]"===zr.call(e)}function M(e){return"boolean"==typeof e}function A(e){return e&&x(e.then)}function P(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function k(e){var t,n={},r=e.split(",");for(t=0;t=0&&e.splice(n,1),t}function R(e,t,n,r){if(D(e)||N(e))throw Hr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(t){if(e===t)throw Hr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],y(e)){var i=n.indexOf(e);if(-1!==i)return r[i];n.push(e),r.push(t)}var a;if(Zr(e)){t.length=0;for(var s=0;sn;n++)t[n]=e[n]}else if(y(e)){t=t||{};for(var i in e)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(t[i]=e[i])}return t||e}function F(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var r,i,o,a=typeof e,s=typeof t;if(a==s&&"object"==a){if(!Zr(e)){if(C(e))return C(t)?F(e.getTime(),t.getTime()):!1;if(w(e)&&w(t))return e.toString()==t.toString();if(N(e)||N(t)||D(e)||D(t)||Zr(t))return!1;o={};for(i in e)if("$"!==i.charAt(0)&&!x(e[i])){if(!F(e[i],t[i]))return!1;o[i]=!0}for(i in t)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&t[i]!==n&&!x(t[i]))return!1;return!0}if(!Zr(t))return!1;if((r=e.length)==t.length){for(i=0;r>i;i++)if(!F(e[i],t[i]))return!1;return!0}}return!1}function B(e,t,n){return e.concat(jr.call(t,n))}function O(e,t){return jr.call(e,t||0)}function G(e,t){var n=arguments.length>2?O(arguments,2):[];return!x(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(jr.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function V(e,r){var i=r;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?i=n:D(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":N(r)&&(i="$SCOPE"),i}function U(e,t){return"undefined"==typeof e?n:JSON.stringify(e,V,t?" ":null)}function j(e){return $(e)?JSON.parse(e):e}function q(e){e=Gr(e).clone();try{e.empty()}catch(t){}var n=3,r=Gr("
").append(e).html();try{return e[0].nodeType===n?Ir(r):r.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Ir(t)})}catch(t){return Ir(r)}}function z(e){try{return decodeURIComponent(e)}catch(t){}}function H(e){var t,n,r={};return o((e||"").split("&"),function(e){if(e&&(t=e.replace(/\+/g,"%20").split("="),n=z(t[0]),v(n))){var i=v(t[1])?z(t[1]):!0;Rr.call(r,n)?Zr(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function W(e){var t=[];return o(e,function(e,n){Zr(e)?o(e,function(e){t.push(K(n,!0)+(e===!0?"":"="+K(e,!0)))}):t.push(K(n,!0)+(e===!0?"":"="+K(e,!0)))}),t.length?t.join("&"):""}function Q(e){return K(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function K(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function Z(e,t){var n,r,i=Yr.length;for(e=Gr(e),r=0;i>r;++r)if(n=Yr[r]+t,$(n=e.attr(n)))return n;return null}function X(e,t){var n,r,i={};o(Yr,function(t){var i=t+"app";!n&&e.hasAttribute&&e.hasAttribute(i)&&(n=e,r=e.getAttribute(i))}),o(Yr,function(t){var i,o=t+"app";!n&&(i=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==Z(n,"strict-di"),t(n,r?[r]:[],i))}function J(n,r,i){y(i)||(i={});var a={strictDi:!1};i=p(a,i);var s=function(){if(n=Gr(n),n.injector()){var e=n[0]===t?"document":q(n);throw Hr("btstrpd","App Already Bootstrapped with this Element '{0}'",e.replace(//,">"))}r=r||[],r.unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Ot(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},l=/^NG_ENABLE_DEBUG_INFO!/,c=/^NG_DEFER_BOOTSTRAP!/;return e&&l.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(l,"")),e&&!c.test(e.name)?s():(e.name=e.name.replace(c,""),void(Wr.resumeBootstrap=function(e){o(e,function(e){r.push(e)}),s()}))}function Y(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function et(e){return Wr.element(e).injector().get("$$testability")}function tt(e,t){return t=t||"_",e.replace(ei,function(e,n){return(n?t:"")+e.toLowerCase()})}function nt(){var t;ti||(Vr=e.jQuery,Vr&&Vr.fn.on?(Gr=Vr,p(Vr.fn,{scope:gi.scope,isolateScope:gi.isolateScope,controller:gi.controller,injector:gi.injector,inheritedData:gi.inheritedData}),t=Vr.cleanData,Vr.cleanData=function(e){var n;if(Kr)Kr=!1;else for(var r,i=0;null!=(r=e[i]);i++)n=Vr._data(r,"events"),n&&n.$destroy&&Vr(r).triggerHandler("$destroy");t(e)}):Gr=bt,Wr.element=Gr,ti=!0)}function rt(e,t,n){if(!e)throw Hr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function it(e,t,n){return n&&Zr(e)&&(e=e[e.length-1]),rt(x(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ot(e,t){if("hasOwnProperty"===e)throw Hr("badname","hasOwnProperty is not a valid {0} name",t)}function at(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;a>s;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&x(e)?G(o,e):e}function st(e){var t=e[0],n=e[e.length-1],r=[t];do{if(t=t.nextSibling,!t)break;r.push(t)}while(t!==n);return Gr(r)}function lt(){return Object.create(null)}function ct(e){function t(e,t,n){return e[t]||(e[t]=n())}var n=r("$injector"),i=r("ng"),o=t(e,"angular",Object);return o.$$minErr=o.$$minErr||r,t(o,"module",function(){var e={};return function(r,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(r,"module"),o&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function e(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var t=[],i=[],s=[],l=e("$injector","invoke","push",i),c={_invokeQueue:t,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),animation:e("$animateProvider","register"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:l,run:function(e){return s.push(e),this}};return a&&l(a),c})}})}function ut(t){p(t,{bootstrap:J,copy:R,extend:p,equals:F,element:Gr,forEach:o,injector:Ot,noop:h,bind:G,toJson:U,fromJson:j,identity:m,isUndefined:b,isDefined:v,isString:$,isFunction:x,isObject:y,isNumber:S,isElement:P,isArray:Zr,version:ni,isDate:C,lowercase:Ir,uppercase:_r,callbacks:{counter:0},getTestability:et,$$minErr:r,$$csp:Jr,reloadWithDebugInfo:Y,$$hasClass:wt}),Ur=ct(e);try{Ur("ngLocale")}catch(n){Ur("ngLocale",[]).provider("$locale",cn)}Ur("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Fn}),e.provider("$compile",Ht).directive({a:Yi,input:yo,textarea:yo,form:io,script:la,select:pa,style:fa,option:da,ngBind:Bo,ngBindHtml:Go,ngBindTemplate:Oo,ngClass:Vo,ngClassEven:jo,ngClassOdd:Uo,ngCloak:qo,ngController:zo,ngForm:oo,ngHide:na,ngIf:Qo,ngInclude:Ko,ngInit:Xo,ngNonBindable:Jo,ngPluralize:Yo,ngRepeat:ea,ngShow:ta,ngStyle:ra,ngSwitch:ia,ngSwitchWhen:oa,ngSwitchDefault:aa,ngOptions:ua,ngTransclude:sa,ngModel:Eo,ngList:Io,ngChange:Mo,pattern:Po,ngPattern:Po,required:Ao,ngRequired:Ao,minlength:Lo,ngMinlength:Lo,maxlength:ko,ngMaxlength:ko,ngValue:_o,ngModelOptions:Fo}).directive({ngInclude:Zo}).directive(eo).directive(Ho),e.provider({$anchorScroll:Gt,$animate:Ni,$browser:jt,$cacheFactory:qt,$controller:Kt,$document:Zt,$exceptionHandler:Xt,$filter:Zn,$interpolate:sn,$interval:ln,$http:nn,$httpBackend:on,$location:Cn,$log:xn,$parse:Pn,$rootScope:_n,$q:kn,$$q:Ln,$sce:Un,$sceDelegate:Vn,$sniffer:jn,$templateCache:zt,$templateRequest:qn,$$testability:zn,$timeout:Hn,$window:Kn,$$rAF:Rn,$$asyncCallback:Vt})}])}function pt(){return++ii}function dt(e){return e.replace(si,function(e,t,n,r){return r?n.toUpperCase():n}).replace(li,"Moz$1")}function ft(e){return!di.test(e)}function ht(e){var t=e.nodeType;return 1===t||!t||9===t}function mt(e,t){var n,r,i,a,s=t.createDocumentFragment(),l=[];if(ft(e))l.push(t.createTextNode(e));else{for(n=n||s.appendChild(t.createElement("div")),r=(fi.exec(e)||["",""])[1].toLowerCase(),i=mi[r]||mi._default,n.innerHTML=i[1]+e.replace(hi,"<$1>")+i[2],a=i[0];a--;)n=n.lastChild;l=B(l,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(l,function(e){s.appendChild(e)}),s}function gt(e,n){n=n||t;var r;return(r=pi.exec(e))?[n.createElement(r[1])]:(r=mt(e,n))?r.childNodes:[]}function bt(e){if(e instanceof bt)return e;var t;if($(e)&&(e=Xr(e),t=!0),!(this instanceof bt)){if(t&&"<"!=e.charAt(0))throw ui("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new bt(e)}t?Tt(this,gt(e)):Tt(this,e)}function vt(e){return e.cloneNode(!0)}function yt(e,t){if(t||St(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;i>r;r++)St(n[r])}function $t(e,t,n,r){if(v(r))throw ui("offargs","jqLite#off() does not support the `selector` argument");var i=Ct(e),a=i&&i.events,s=i&&i.handle;if(s)if(t)o(t.split(" "),function(t){b(n)?(ai(e,t,a[t]),delete a[t]):I(a[t]||[],n)});else for(t in a)"$destroy"!==t&&ai(e,t,a[t]),delete a[t]}function St(e,t){var r=e.ng339,i=r&&ri[r];if(i){if(t)return void delete i.data[t];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),$t(e)),delete ri[r],e.ng339=n}}function Ct(e,t){var r=e.ng339,i=r&&ri[r];return t&&!i&&(e.ng339=r=pt(),i=ri[r]={events:{},data:{},handle:n}),i}function xt(e,t,n){if(ht(e)){var r=v(n),i=!r&&t&&!y(t),o=!t,a=Ct(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];p(s,t)}}}function wt(e,t){return e.getAttribute?(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1:!1}function Dt(e,t){t&&e.setAttribute&&o(t.split(" "),function(t){e.setAttribute("class",Xr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Xr(t)+" "," ")))})}function Nt(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(t.split(" "),function(e){e=Xr(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Xr(n))}}function Tt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;n>r;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Et(e,t){return Mt(e,"$"+(t||"ngController")+"Controller")}function Mt(e,t,r){9==e.nodeType&&(e=e.documentElement);for(var i=Zr(t)?t:[t];e;){for(var o=0,a=i.length;a>o;o++)if((r=Gr.data(e,i[o]))!==n)return r;e=e.parentNode||11===e.nodeType&&e.host}}function At(e){for(yt(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Pt(e,t){t||yt(e);var n=e.parentNode;n&&n.removeChild(e)}function kt(e,t){var n=bi[t.toLowerCase()];return n&&vi[L(e)]&&n}function Lt(e,t){var n=e.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&yi[t]}function It(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(b(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=_(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(e,n)}};return n.elem=e,n}function Rt(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||c)():r+":"+e}function _t(e,t){if(t){var n=0;this.nextUid=function(){return++n}}o(e,this.put,this)}function Ft(e){var t=e.toString().replace(xi,""),n=t.match($i);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Bt(e,t,n){var r,i,a,s;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw $(n)&&n||(n=e.name||Ft(e)),wi("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=e.toString().replace(xi,""),a=i.match($i),o(a[1].split(Si),function(e){e.replace(Ci,function(e,t,n){r.push(n)})})}e.$inject=r}}else Zr(e)?(s=e.length-1,it(e[s],"fn"),r=e.slice(0,s)):it(e,"fn",!0);return r}function Ot(e,t){function r(e){return function(t,n){return y(t)?void o(t,l(e)):e(t,n)}}function i(e,t){if(ot(e,"service"),(x(t)||Zr(t))&&(t=w.instantiate(t)),!t.$get)throw wi("pget","Provider '{0}' must define $get factory method.",e);return C[e+b]=t}function a(e,t){return i(e,{$get:t})}function s(e,t){return a(e,["$injector",function(e){return e.instantiate(t)}])}function c(e,t){return a(e,g(t))}function u(e,t){ot(e,"constant"),C[e]=t,D[e]=t}function p(e,t){var n=w.get(e+b),r=n.$get;n.$get=function(){var e=N.invoke(r,n);return N.invoke(t,null,{$delegate:e})}}function d(e){var t,n=[];return o(e,function(e){function r(e){var t,n;for(t=0,n=e.length;n>t;t++){var r=e[t],i=w.get(r[0]);i[r[1]].apply(i,r[2])}}if(!S.get(e)){S.put(e,!0);try{$(e)?(t=Ur(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):x(e)?n.push(w.invoke(e)):Zr(e)?n.push(w.invoke(e)):it(e,"module")}catch(i){throw Zr(e)&&(e=e[e.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),wi("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function f(e,n){function r(t){if(e.hasOwnProperty(t)){if(e[t]===m)throw wi("cdep","Circular dependency found: {0}",t+" <- "+v.join(" <- "));return e[t]}try{return v.unshift(t),e[t]=m,e[t]=n(t)}catch(r){throw e[t]===m&&delete e[t],r}finally{v.shift()}}function i(e,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,l,c=[],u=Bt(e,t,o);for(s=0,a=u.length;a>s;s++){if(l=u[s],"string"!=typeof l)throw wi("itkn","Incorrect injection token! Expected service name as string, got {0}",l);c.push(i&&i.hasOwnProperty(l)?i[l]:r(l))}return Zr(e)&&(e=e[a]),e.apply(n,c)}function o(e,t,n){var r,o,a=function(){};return a.prototype=(Zr(e)?e[e.length-1]:e).prototype,r=new a,o=i(e,r,t,n),y(o)||x(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Bt,has:function(t){return C.hasOwnProperty(t+b)||e.hasOwnProperty(t)}}}t=t===!0;var m={},b="Provider",v=[],S=new _t([],!0),C={$provide:{provider:r(i),factory:r(a),service:r(s),value:r(c),constant:r(u),decorator:p}},w=C.$injector=f(C,function(){throw wi("unpr","Unknown provider: {0}",v.join(" <- "))}),D={},N=D.$injector=f(D,function(e){var t=w.get(e+b);return N.invoke(t.$get,t,n,e)});return o(d(e),function(e){N.invoke(e||h)}),N}function Gt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return o(e,function(e){t||"a"!==L(e)||(t=e)}),t}function a(){var e,r=n.hash();r?(e=s.getElementById(r))?e.scrollIntoView():(e=i(s.getElementsByName(r)))?e.scrollIntoView():"top"===r&&t.scrollTo(0,0):t.scrollTo(0,0)}var s=t.document;return e&&r.$watch(function(){return n.hash()},function(){r.$evalAsync(a)}),a}]}function Vt(){this.$get=["$$rAF","$timeout",function(e,t){return e.supported?function(t){return e(t)}:function(e){return t(e,0,!1)}}]}function Ut(e,t,r,i){function a(e){try{e.apply(null,O(arguments,1))}finally{if(v--,0===v)for(;y.length;)try{y.pop()()}catch(t){r.error(t)}}}function s(e,t){!function n(){o(C,function(e){e()}),S=t(n,e)}()}function l(){D=null,x!=c.url()&&(x=c.url(),o(N,function(e){e(c.url())}))}var c=this,u=t[0],p=e.location,d=e.history,f=e.setTimeout,m=e.clearTimeout,g={};c.isMock=!1;var v=0,y=[];c.$$completeOutstandingRequest=a,c.$$incOutstandingRequestCount=function(){v++},c.notifyWhenNoOutstandingRequests=function(e){o(C,function(e){e()}),0===v?e():y.push(e)};var S,C=[];c.addPollFn=function(e){return b(S)&&s(100,f),C.push(e),e};var x=p.href,w=t.find("base"),D=null;c.url=function(t,n){if(p!==e.location&&(p=e.location),d!==e.history&&(d=e.history),t){if(x==t)return;return x=t,i.history?n?d.replaceState(null,"",t):(d.pushState(null,"",t),w.attr("href",w.attr("href"))):(D=t,n?p.replace(t):p.href=t),c}return D||p.href.replace(/%27/g,"'")};var N=[],T=!1;c.onUrlChange=function(t){return T||(i.history&&Gr(e).on("popstate",l),i.hashchange?Gr(e).on("hashchange",l):c.addPollFn(l),T=!0),N.push(t),t},c.$$checkUrlChange=l,c.baseHref=function(){var e=w.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var E={},M="",A=c.baseHref();c.cookies=function(e,t){var i,o,a,s,l;if(!e){if(u.cookie!==M)for(M=u.cookie,o=M.split("; "),E={},s=0;s0&&(e=decodeURIComponent(a.substring(0,l)),E[e]===n&&(E[e]=decodeURIComponent(a.substring(l+1))));return E}t===n?u.cookie=encodeURIComponent(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":$(t)&&(i=(u.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path="+A).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},c.defer=function(e,t){var n;return v++,n=f(function(){delete g[n],a(e)},t||0),g[n]=!0,n},c.defer.cancel=function(e){return g[e]?(delete g[e],m(e),a(h),!0):!1}}function jt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new Ut(e,r,t,n)}]}function qt(){this.$get=function(){function e(e,n){function i(e){e!=d&&(f?f==e&&(f=e.n):f=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=p({},n,{id:e}),l={},c=n&&n.capacity||Number.MAX_VALUE,u={},d=null,f=null;return t[e]={put:function(e,t){if(cc&&this.remove(f.key),t},get:function(e){if(c").parent()[0])});var a=k(e,t,e,n,r,i);A.$$addScopeClass(e);var s,l=null,c=e;return function(t,n,r,i,o){rt(t,"scope"),l||(l=P(o)),"html"!==l&&e[0]!==s&&(c=Gr(X(l,Gr("
").append(e).html()))),s=e[0];var u=n?gi.clone.call(c):c;if(r)for(var p in r)u.data("$"+p+"Controller",r[p].instance);return A.$$addScopeInfo(u,t),n&&n(u,t),a&&a(t,u,u,i),u}}function P(e){var t=e&&e[0];return t&&"foreignobject"!==L(t)&&t.toString().match(/SVG/)?"svg":"html"}function k(e,t,r,i,o,a){function s(e,r,i,o){var a,s,l,c,u,p,d,f,g;if(h){var b=r.length;for(g=new Array(b),u=0;uu;)l=g[m[u++]],a=m[u++],s=m[u++],a?(a.scope?(c=e.$new(),A.$$addScopeInfo(Gr(l),c)):c=e,f=a.transcludeOnThisElement?R(e,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&t?R(e,t):null,a(s,c,l,i,f)):s&&s(e,l.childNodes,n,o)}for(var l,c,u,p,d,f,h,m=[],g=0;gv;v++){var S=!1,C=!1;if(p=b[v],!Or||Or>=8||p.specified){d=p.name,m=Xr(p.value),h=Wt(d),(g=ct.test(h))&&(d=tt(h.substr(6),"-"));var x=h.replace(/(Start|End)$/,"");z(x)&&h===x+"Start"&&(S=d,C=d.substr(0,d.length-5)+"end",d=d.substr(0,d.length-6)),f=Wt(d.toLowerCase()),l[f]=d,(g||!n.hasOwnProperty(f))&&(n[f]=m,kt(e,f)&&(n[f]=!0)),Y(e,t,m,f,g),j(t,f,"A",r,i,S,C)}}if(a=e.className,$(a)&&""!==a)for(;o=u.exec(a);)f=Wt(o[2]),j(t,f,"C",r,i)&&(n[f]=Xr(o[3])),a=a.substr(o.index+o[0].length);break;case 3:Z(t,e.nodeValue);break;case 8:try{o=c.exec(e.nodeValue),o&&(f=Wt(o[1]),j(t,f,"M",r,i)&&(n[f]=Xr(o[2])))}catch(w){}}return t.sort(Q),t}function B(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Ti("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);1==e.nodeType&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Gr(r)}function G(e,t,n){return function(r,i,o,a,s){return i=B(i[0],t,n),e(r,i,o,a,s)}}function V(e,a,s,l,c,u,p,d,f){function h(e,t,n,r){e&&(n&&(e=G(e,n,r)),e.require=w.require,e.directiveName=D,(L===w||w.$$isolateScope)&&(e=nt(e,{isolateScope:!0})),p.push(e)),t&&(n&&(t=G(t,n,r)),t.require=w.require,t.directiveName=D,(L===w||w.$$isolateScope)&&(t=nt(t,{isolateScope:!0})),d.push(t))}function m(e,t,n,r){var i,a="data",s=!1;if($(t)){for(;"^"==(i=t.charAt(0))||"?"==i;)t=t.substr(1),"^"==i&&(a="inheritedData"),s=s||"?"==i;if(i=null,r&&"data"===a&&(i=r[t])&&(i=i.instance),i=i||n[a]("$"+t+"Controller"),!i&&!s)throw Ti("ctreq","Controller '{0}', required by directive '{1}', can't be found!",t,e);return i}return Zr(t)&&(i=[],o(t,function(t){i.push(m(e,t,n,r))})),i}function b(e,t,i,l,c){function u(e,t,r){var i;return N(e)||(r=t,t=e,e=n),z&&(i=S),r||(r=z?w.parent():w),c(e,t,i,r)}var f,h,b,y,$,S,x,w,D;if(a===i?(D=s,w=s.$$element):(w=Gr(i),D=new ot(w,s)),L&&($=t.$new(!0)),x=c&&u,k&&(C={},S={},o(k,function(e){var n,r={$scope:e===L||e.$$isolateScope?$:t,$element:w,$attrs:D,$transclude:x};y=e.controller,"@"==y&&(y=D[e.name]),n=v(y,r,!0,e.controllerAs),S[e.name]=n,z||w.data("$"+e.name+"Controller",n.instance),C[e.name]=n})),L){A.$$addScopeInfo(w,$,!0,!(I&&(I===L||I===L.$$originalDirective))),A.$$addScopeClass(w,!0);var T=C&&C[L.name],E=$;T&&T.identifier&&L.bindToController===!0&&(E=T.instance),o($.$$isolateBindings=L.$$isolateBindings,function(e,n){var i,o,a,s,l=e.attrName,c=e.optional,u=e.mode;switch(u){case"@":D.$observe(l,function(e){E[n]=e}),D.$$observers[l].$$scope=t,D[l]&&(E[n]=r(D[l])(t));break;case"=":if(c&&!D[l])return;o=g(D[l]),s=o.literal?F:function(e,t){return e===t||e!==e&&t!==t},a=o.assign||function(){throw i=E[n]=o(t),Ti("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",D[l],L.name)},i=E[n]=o(t);var p=function(e){return s(e,E[n])||(s(e,i)?a(t,e=E[n]):E[n]=e),i=e};p.$stateful=!0;var d=t.$watch(g(D[l],p),null,o.literal);$.$on("$destroy",d);break;case"&":o=g(D[l]),E[n]=function(e){return o(t,e)}}})}for(C&&(o(C,function(e){e()}),C=null),f=0,h=p.length;h>f;f++)b=p[f],it(b,b.isolateScope?$:t,w,D,b.require&&m(b.directiveName,b.require,w,S),x);var M=t;for(L&&(L.template||null===L.templateUrl)&&(M=$),e&&e(M,i.childNodes,n,c),f=d.length-1;f>=0;f--)b=d[f],it(b,b.isolateScope?$:t,w,D,b.require&&m(b.directiveName,b.require,w,S),x)}f=f||{};for(var S,C,w,D,T,E,M,P=-Number.MAX_VALUE,k=f.controllerDirectives,L=f.newIsolateScopeDirective,I=f.templateDirective,R=f.nonTlbTranscludeDirective,V=!1,j=!1,z=f.hasElementTranscludeDirective,Q=s.$$element=Gr(a),Z=u,J=l,Y=0,tt=e.length;tt>Y;Y++){w=e[Y];var rt=w.$$start,at=w.$$end;if(rt&&(Q=B(a,rt,at)),T=n,P>w.priority)break;if((M=w.scope)&&(w.templateUrl||(y(M)?(K("new/isolated scope",L||S,w,Q),L=w):K("new/isolated scope",L,w,Q)),S=S||w),D=w.name,!w.templateUrl&&w.controller&&(M=w.controller,k=k||{},K("'"+D+"' controller",k[D],w,Q),k[D]=w),(M=w.transclude)&&(V=!0,w.$$tlb||(K("transclusion",R,w,Q),R=w),"element"==M?(z=!0,P=w.priority,T=Q,Q=s.$$element=Gr(t.createComment(" "+D+": "+s[D]+" ")),a=Q[0],et(c,O(T),a),J=A(T,l,P,Z&&Z.name,{nonTlbTranscludeDirective:R})):(T=Gr(vt(a)).contents(),Q.empty(),J=A(T,l))),w.template)if(j=!0,K("template",I,w,Q),I=w,M=x(w.template)?w.template(Q,s):w.template,M=lt(M),w.replace){if(Z=w,T=ft(M)?[]:Gr(X(w.templateNamespace,Xr(M))),a=T[0],1!=T.length||1!==a.nodeType)throw Ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",D,"");et(c,Q,a);var st={$attr:{}},ct=_(a,[],st),ut=e.splice(Y+1,e.length-(Y+1));L&&U(ct),e=e.concat(ct).concat(ut),H(s,st),tt=e.length}else Q.html(M);if(w.templateUrl)j=!0,K("template",I,w,Q),I=w,w.replace&&(Z=w),b=W(e.splice(Y,e.length-Y),Q,s,c,V&&J,p,d,{controllerDirectives:k,newIsolateScopeDirective:L,templateDirective:I,nonTlbTranscludeDirective:R}),tt=e.length;else if(w.compile)try{E=w.compile(Q,s,J),x(E)?h(null,E,rt,at):E&&h(E.pre,E.post,rt,at)}catch(pt){i(pt,q(Q))}w.terminal&&(b.terminal=!0,P=Math.max(P,w.priority))}return b.scope=S&&S.scope===!0,b.transcludeOnThisElement=V,b.elementTranscludeOnThisElement=z,b.templateOnThisElement=j,b.transclude=J,f.hasElementTranscludeDirective=z,b}function U(e){for(var t=0,n=e.length;n>t;t++)e[t]=f(e[t],{$$isolateScope:!0})}function j(t,r,o,l,c,u,p){if(r===c)return null;var d=null;if(a.hasOwnProperty(r))for(var h,m=e.get(r+s),g=0,b=m.length;b>g;g++)try{h=m[g],(l===n||l>h.priority)&&-1!=h.restrict.indexOf(o)&&(u&&(h=f(h,{$$start:u,$$end:p})),t.push(h),d=h)}catch(v){i(v)}return d}function z(t){if(a.hasOwnProperty(t))for(var n,r=e.get(t+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function H(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;o(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),o(t,function(t,o){"class"==o?(M(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):"style"==o?(i.attr("style",i.attr("style")+";"+t),e.style=(e.style?e.style+";":"")+t):"$"==o.charAt(0)||e.hasOwnProperty(o)||(e[o]=t,r[o]=n[o])})}function W(e,t,n,r,i,a,s,c){var u,d,f=[],h=t[0],m=e.shift(),g=p({},m,{templateUrl:null,transclude:null,replace:null,$$originalDirective:m}),b=x(m.templateUrl)?m.templateUrl(t,n):m.templateUrl,v=m.templateNamespace;return t.empty(),l(D.getTrustedResourceUrl(b)).then(function(l){var p,$,S,C;if(l=lt(l),m.replace){if(S=ft(l)?[]:Gr(X(v,Xr(l))),p=S[0],1!=S.length||1!==p.nodeType)throw Ti("tplrt","Template for directive '{0}' must have exactly one root element. {1}",m.name,b);$={$attr:{}},et(r,t,p);var x=_(p,[],$);y(m.scope)&&U(x),e=x.concat(e),H(n,$)}else p=h,t.html(l);for(e.unshift(g),u=V(e,p,n,i,t,m,a,s,c),o(r,function(e,n){e==p&&(r[n]=t[0])}),d=k(t[0].childNodes,i);f.length;){var w=f.shift(),D=f.shift(),N=f.shift(),T=f.shift(),E=t[0];if(D!==h){var A=D.className;c.hasElementTranscludeDirective&&m.replace||(E=vt(p)),et(N,Gr(D),E),M(Gr(E),A)}C=u.transcludeOnThisElement?R(w,u.transclude,T):T,u(d,w,E,r,C)}f=null}),function(e,t,n,r,i){var o=i;f?(f.push(t),f.push(n),f.push(r),f.push(o)):(u.transcludeOnThisElement&&(o=R(t,u.transclude,i)),u(d,t,n,r,o))}}function Q(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name"+n+"",r.childNodes[0].childNodes;default:return n}}function J(e,t){if("srcdoc"==t)return D.HTML;var n=L(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?D.RESOURCE_URL:void 0}function Y(e,t,n,i,o){var a=r(n,!0);if(a){if("multiple"===i&&"select"===L(e))throw Ti("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",q(e));t.push({priority:100,compile:function(){return{pre:function(t,n,s){var l=s.$$observers||(s.$$observers={});if(b.test(i))throw Ti("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");a=r(s[i],!0,J(e,i),d[i]||o),a&&(s[i]=a(t),(l[i]||(l[i]=[])).$$inter=!0,(s.$$observers&&s.$$observers[i].$$scope||t).$watch(a,function(e,t){"class"===i&&e!=t?s.$updateClass(e,t):s.$set(i,e)}))}}}})}}function et(e,n,r){var i,o,a=n[0],s=n.length,l=a.parentNode;if(e)for(i=0,o=e.length;o>i;i++)if(e[i]==a){e[i++]=r;for(var c=i,u=c+s-1,p=e.length;p>c;c++,u++)p>u?e[c]=e[u]:delete e[c];e.length-=s-1,e.context===a&&(e.context=r);break}l&&l.replaceChild(r,a);var d=t.createDocumentFragment();d.appendChild(a),Gr(r).data(Gr(a).data()),Vr?(Kr=!0,Vr.cleanData([a])):delete Gr.cache[a[Gr.expando]];for(var f=1,h=n.length;h>f;f++){var m=n[f];Gr(m).remove(),d.appendChild(m),delete n[f]}n[0]=r,n.length=1}function nt(e,t){return p(function(){return e.apply(null,arguments)},e,t)}function it(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,q(n))}}var ot=function(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e};ot.prototype={$normalize:Wt,$addClass:function(e){e&&e.length>0&&T.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&T.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=Qt(e,t);n&&n.length&&T.addClass(this.$$element,n);var r=Qt(t,e);r&&r.length&&T.removeClass(this.$$element,r)},$set:function(e,t,r,a){var s,l=this.$$element[0],c=kt(l,e),u=Lt(l,e),p=e;c?(this.$$element.prop(e,t),a=c):u&&(this[u]=t,p=u),this[e]=t,a?this.$attr[e]=a:(a=this.$attr[e],a||(this.$attr[e]=a=tt(e,"-"))),s=L(this.$$element),("a"===s&&"href"===e||"img"===s&&"src"===e)&&(this[e]=t=E(t,"src"===e)),r!==!1&&(null===t||t===n?this.$$element.removeAttr(a):this.$$element.attr(a,t));var d=this.$$observers;d&&o(d[p],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),C.$evalAsync(function(){i.$$inter||t(n[e])}),function(){I(i,t)}}};var at=r.startSymbol(),st=r.endSymbol(),lt="{{"==at||"}}"==st?m:function(e){return e.replace(/\{\{/g,at).replace(/}}/g,st)},ct=/^ngAttr[A-Z]/;return A.$$addBindingInfo=S?function(e,t){var n=e.data("$binding")||[];Zr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:h,A.$$addBindingClass=S?function(e){M(e,"ng-binding")}:h,A.$$addScopeInfo=S?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:h,A.$$addScopeClass=S?function(e,t){M(e,t?"ng-isolate-scope":"ng-scope")}:h,A}]}function Wt(e){return dt(e.replace(Ei,""))}function Qt(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o0?" ":"")+a}return n}function Kt(){var e={},t=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(t,n){ot(t,"controller"),y(t)?p(e,t):e[t]=n},this.allowGlobals=function(){t=!0},this.$get=["$injector","$window",function(o,a){function s(e,t,n,i){if(!e||!y(e.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,t);e.$scope[t]=n}return function(r,l,c,u){var d,f,h,m;if(c=c===!0,u&&$(u)&&(m=u),$(r)&&(f=r.match(i),h=f[1],m=m||f[3],r=e.hasOwnProperty(h)?e[h]:at(l.$scope,h,!0)||(t?at(a,h,!0):n),it(r,h,!0)),c){var g=function(){};return g.prototype=(Zr(r)?r[r.length-1]:r).prototype,d=new g,m&&s(l,m,d,h||r.name),p(function(){return o.invoke(r,d,l,h),d},{instance:d,identifier:m})}return d=o.instantiate(r,l,h),m&&s(l,m,d,h||r.name),d}}]}function Zt(){this.$get=["$window",function(e){return Gr(e.document)}]}function Xt(){this.$get=["$log",function(e){return function(){e.error.apply(e,arguments)}}]}function Jt(e){var t,n,r,i={};return e?(o(e.split("\n"),function(e){r=e.indexOf(":"),t=Ir(Xr(e.substr(0,r))),n=Xr(e.substr(r+1)),t&&(i[t]=i[t]?i[t]+", "+n:n)}),i):i}function Yt(e){var t=y(e)?e:n;return function(n){return t||(t=Jt(e)),n?t[Ir(n)]||null:t}}function en(e,t,n){return x(n)?n(e,t):(o(n,function(n){e=n(e,t)}),e)}function tn(e){return e>=200&&300>e}function nn(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,r=/^\)\]\}',?\n/,i={"Content-Type":"application/json;charset=utf-8"},a=this.defaults={transformResponse:[function(n){return $(n)&&(n=n.replace(r,""),e.test(n)&&t.test(n)&&(n=j(n))),n}],transformRequest:[function(e){return!y(e)||T(e)||E(e)?e:U(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:_(i),put:_(i),patch:_(i)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},l=!1;this.useApplyAsync=function(e){return v(e)?(l=!!e,this):l};var c=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,r,i,u,d){function f(e){function t(e){var t=p({},e,{data:en(e.data,e.headers,i.transformResponse)});return tn(e.status)?t:u.reject(t)}function r(e){function t(e){var t;o(e,function(n,r){x(n)&&(t=n(),null!=t?e[r]=t:delete e[r])})}var n,r,i,s=a.headers,l=p({},e.headers);s=p({},s.common,s[Ir(e.method)]);e:for(n in s){r=Ir(n);for(i in l)if(Ir(i)===r)continue e;l[n]=s[n]}return t(l),l}var i={method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse},s=r(e);p(i,e),i.headers=s,i.method=_r(i.method);var l=function(e){s=e.headers;var n=en(e.data,Yt(s),e.transformRequest);return b(n)&&o(s,function(e,t){"content-type"===Ir(t)&&delete s[t]}),b(e.withCredentials)&&!b(a.withCredentials)&&(e.withCredentials=a.withCredentials),g(e,n,s).then(t,t)},c=[l,n],d=u.when(i);for(o(D,function(e){(e.request||e.requestError)&&c.unshift(e.request,e.requestError),(e.response||e.responseError)&&c.push(e.response,e.responseError)});c.length;){var f=c.shift(),h=c.shift();d=d.then(f,h)}return d.success=function(e){return d.then(function(t){e(t.data,t.status,t.headers,i)}),d},d.error=function(e){return d.then(null,function(t){e(t.data,t.status,t.headers,i)}),d},d}function h(){o(arguments,function(e){f[e]=function(t,n){return f(p(n||{},{method:e,url:t}))}})}function m(){o(arguments,function(e){f[e]=function(t,n,r){return f(p(r||{},{method:e,url:t,data:n}))}})}function g(r,o,s){function c(e,t,n,r){function o(){p(t,e,n,r)}h&&(tn(e)?h.put(C,[e,t,Jt(n),r]):h.remove(C)),l?i.$applyAsync(o):(o(),i.$$phase||i.$apply())}function p(e,t,n,i){t=Math.max(t,0),(tn(t)?g.resolve:g.reject)({data:e,status:t,headers:Yt(n),config:r,statusText:i})}function d(){var e=f.pendingRequests.indexOf(r);-1!==e&&f.pendingRequests.splice(e,1)}var h,m,g=u.defer(),$=g.promise,C=S(r.url,r.params);if(f.pendingRequests.push(r),$.then(d,d),!r.cache&&!a.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||(h=y(r.cache)?r.cache:y(a.cache)?a.cache:w),h)if(m=h.get(C),v(m)){if(A(m))return m.then(d,d),m;Zr(m)?p(m[1],m[0],_(m[2]),m[3]):p(m,200,{},"OK")}else h.put(C,$);if(b(m)){var x=Qn(r.url)?t.cookies()[r.xsrfCookieName||a.xsrfCookieName]:n;x&&(s[r.xsrfHeaderName||a.xsrfHeaderName]=x),e(r.method,C,o,c,s,r.timeout,r.withCredentials,r.responseType)}return $}function S(e,t){if(!t)return e;var n=[];return s(t,function(e,t){null===e||b(e)||(Zr(e)||(e=[e]),o(e,function(e){y(e)&&(e=C(e)?e.toISOString():U(e)),n.push(K(t)+"="+K(e))}))}),n.length>0&&(e+=(-1==e.indexOf("?")?"?":"&")+n.join("&")),e}var w=r("$http"),D=[];return o(c,function(e){D.unshift($(e)?d.get(e):d.invoke(e))}),f.pendingRequests=[],h("get","delete","head","jsonp"),m("post","put","patch"),f.defaults=a,f}]}function rn(t){if(8>=Or&&(!t.match(/^(get|post|head|put|delete|options)$/i)||!e.XMLHttpRequest))return new e.ActiveXObject("Microsoft.XMLHTTP");if(e.XMLHttpRequest)return new e.XMLHttpRequest;throw r("$httpBackend")("noxhr","This browser does not support XMLHttpRequest.")}function on(){this.$get=["$browser","$window","$document",function(e,t,n){return an(e,rn,e.defer,t.angular.callbacks,n[0])}]}function an(e,t,n,r,i){function a(e,t,n){var o=i.createElement("script"),a=null;return o.type="text/javascript",o.src=e,o.async=!0,a=function(e){ai(o,"load",a),ai(o,"error",a),i.body.removeChild(o),o=null;var s=-1,l="unknown";e&&("load"!==e.type||r[t].called||(e={type:"error"}),l=e.type,s="error"===e.type?404:200),n&&n(s,l)},oi(o,"load",a),oi(o,"error",a),i.body.appendChild(o),a}var s=-1;return function(i,l,c,u,p,d,f,m){function g(){y=s,S&&S(),C&&C.abort()}function b(t,r,i,o,a){w&&n.cancel(w),S=C=null,0===r&&(r=i?200:"file"==Wn(l).protocol?404:0),r=1223===r?204:r,a=a||"",t(r,i,o,a),e.$$completeOutstandingRequest(h)}var y;if(e.$$incOutstandingRequestCount(),l=l||e.url(),"jsonp"==Ir(i)){var $="_"+(r.counter++).toString(36);r[$]=function(e){r[$].data=e,r[$].called=!0};var S=a(l.replace("JSON_CALLBACK","angular.callbacks."+$),$,function(e,t){b(u,e,r[$].data,"",t),r[$]=h})}else{var C=t(i);if(C.open(i,l,!0),o(p,function(e,t){v(e)&&C.setRequestHeader(t,e)}),C.onreadystatechange=function(){if(C&&4==C.readyState){var e=null,t=null,n="";y!==s&&(e=C.getAllResponseHeaders(),t="response"in C?C.response:C.responseText),y===s&&10>Or||(n=C.statusText),b(u,y||C.status,t,e,n)}},f&&(C.withCredentials=!0),m)try{C.responseType=m}catch(x){if("json"!==m)throw x}C.send(c||null)}if(d>0)var w=n(g,d);else A(d)&&d.then(g)}}function sn(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(o,a,d,f){function h(n){return n.replace(c,e).replace(u,t)}function m(e){try{return M(E(e))}catch(t){var n=Mi("interr","Can't interpolate: {0}\n{1}",o,t.toString());r(n)}}f=!!f;for(var g,v,y,$=0,S=[],C=[],w=o.length,D=[],N=[];w>$;){if(-1==(g=o.indexOf(e,$))||-1==(v=o.indexOf(t,g+s))){$!==w&&D.push(h(o.substring($)));break}$!==g&&D.push(h(o.substring($,g))),y=o.substring(g+s,v),S.push(y),C.push(n(y,m)),$=v+l,N.push(D.length),D.push("")}if(d&&D.length>1)throw Mi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||S.length){var T=function(e){for(var t=0,n=S.length;n>t;t++){if(f&&b(e[t]))return;D[N[t]]=e[t]}return D.join("")},E=function(e){return d?i.getTrusted(d,e):i.valueOf(e)},M=function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=U(e)}return e};return p(function(e){var t=0,n=S.length,i=new Array(n);try{for(;n>t;t++)i[t]=C[t](e);return T(i)}catch(a){var s=Mi("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:S,$$watchDelegate:function(e,t,n){var r;return e.$watchGroup(C,function(n,i){var o=T(n);x(t)&&t.call(this,o,n!==i?r:o,e),r=o},n)}})}}var s=e.length,l=t.length,c=new RegExp(e.replace(/./g,o),"g"),u=new RegExp(t.replace(/./g,o),"g");return a.startSymbol=function(){return e},a.endSymbol=function(){return t},a}]}function ln(){this.$get=["$rootScope","$window","$q","$$q",function(e,t,n,r){function i(i,a,s,l){var c=t.setInterval,u=t.clearInterval,p=0,d=v(l)&&!l,f=(d?r:n).defer(),h=f.promise;return s=v(s)?s:0,h.then(null,null,i),h.$$intervalId=c(function(){f.notify(p++),s>0&&p>=s&&(f.resolve(p),u(h.$$intervalId),delete o[h.$$intervalId]),d||e.$apply()},a),o[h.$$intervalId]=f,h}var o={};return i.cancel=function(e){return e&&e.$$intervalId in o?(o[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete o[e.$$intervalId],!0):!1},i}]}function cn(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return 1===e?"one":"other"}}}}function un(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=Q(t[n]);return t.join("/")}function pn(e,t,n){var r=Wn(e,n);t.$$protocol=r.protocol,t.$$host=r.hostname,t.$$port=d(r.port)||Pi[r.protocol]||null}function dn(e,t,n){var r="/"!==e.charAt(0);r&&(e="/"+e);var i=Wn(e,n);t.$$path=decodeURIComponent(r&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname),t.$$search=H(i.search),t.$$hash=decodeURIComponent(i.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function fn(e,t){return 0===t.indexOf(e)?t.substr(e.length):void 0}function hn(e){var t=e.indexOf("#");return-1==t?e:e.substr(0,t)}function mn(e){return e.substr(0,hn(e).lastIndexOf("/")+1)}function gn(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function bn(e,t){this.$$html5=!0,t=t||"";var r=mn(e);pn(e,this,e),this.$$parse=function(t){var n=fn(r,t);if(!$(n))throw ki("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,r);dn(n,this,e),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=W(this.$$search),t=this.$$hash?"#"+Q(this.$$hash):"";this.$$url=un(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,l;return(a=fn(e,i))!==n?(s=a,l=(a=fn(t,a))!==n?r+(fn("/",a)||a):e+s):(a=fn(r,i))!==n?l=r+a:r==i+"/"&&(l=r),l&&this.$$parse(l),!!l}}function vn(e,t){var n=mn(e);pn(e,this,e),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===t.indexOf(n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o=fn(e,r)||fn(n,r),a="#"==o.charAt(0)?fn(t,o):this.$$html5?o:"";if(!$(a))throw ki("ihshprfx",'Invalid url "{0}", missing hash prefix "{1}".',r,t);dn(a,this,e),this.$$path=i(this.$$path,a,e),this.$$compose()},this.$$compose=function(){var n=W(this.$$search),r=this.$$hash?"#"+Q(this.$$hash):"";this.$$url=un(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+(this.$$url?t+this.$$url:"")},this.$$parseLinkUrl=function(t){return hn(e)==hn(t)?(this.$$parse(t),!0):!1}}function yn(e,t){this.$$html5=!0,vn.apply(this,arguments);var n=mn(e);this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==hn(r)?o=r:(a=fn(n,r))?o=e+t+a:n===r+"/"&&(o=n),o&&this.$$parse(o),!!o},this.$$compose=function(){var n=W(this.$$search),r=this.$$hash?"#"+Q(this.$$hash):"";this.$$url=un(this.$$path)+(n?"?"+n:"")+r,this.$$absUrl=e+t+this.$$url}}function $n(e){return function(){return this[e]}}function Sn(e,t){return function(n){return b(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Cn(){var t="",n={enabled:!1,requireBase:!0};this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return M(e)?(n.enabled=e,this):y(e)?(n.enabled=M(e.enabled)?e.enabled:n.enabled,n.requireBase=M(e.requireBase)?e.requireBase:n.requireBase,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,o,a){function s(e){r.$broadcast("$locationChangeSuccess",l.absUrl(),e)}var l,c,u,p=i.baseHref(),d=i.url();if(n.enabled){if(!p&&n.requireBase)throw ki("nobase","$location in HTML5 mode requires a tag to be present!");u=gn(d)+(p||"/"),c=o.history?bn:yn}else u=hn(d),c=vn;l=new c(u,"#"+t),l.$$parseLinkUrl(d,d);var f=/^\s*(javascript|mailto):/i;a.on("click",function(t){if(!t.ctrlKey&&!t.metaKey&&2!=t.which){for(var n=Gr(t.target);"a"!==L(n[0]);)if(n[0]===a[0]||!(n=n.parent())[0])return;var o=n.prop("href"),s=n.attr("href")||n.attr("xlink:href");y(o)&&"[object SVGAnimatedString]"===o.toString()&&(o=Wn(o.animVal).href),f.test(o)||!o||n.attr("target")||t.isDefaultPrevented()||l.$$parseLinkUrl(o,s)&&(t.preventDefault(),l.absUrl()!=i.url()&&(r.$apply(),e.angular["ff-684208-preventDefault"]=!0))}}),l.absUrl()!=d&&i.url(l.absUrl(),!0),i.onUrlChange(function(e){l.absUrl()!=e&&(r.$evalAsync(function(){var t=l.absUrl();l.$$parse(e),r.$broadcast("$locationChangeStart",e,t).defaultPrevented?(l.$$parse(t),i.url(t)):s(t)}),r.$$phase||r.$digest())});var h=0;return r.$watch(function(){var e=i.url(),t=l.$$replace;return h&&e==l.absUrl()||(h++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",l.absUrl(),e).defaultPrevented?l.$$parse(e):(i.url(l.absUrl(),t),s(e))})),l.$$replace=!1,h}),l}]}function xn(){var e=!0,t=this;this.debugEnabled=function(t){return v(t)?(e=t,this):e},this.$get=["$window",function(n){function r(e){return e instanceof Error&&(e.stack?e=e.message&&-1===e.stack.indexOf(e.message)?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function i(e){var t=n.console||{},i=t[e]||t.log||h,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var e=[];return o(arguments,function(t){e.push(r(t))}),i.apply(t,e)}:function(e,t){i(e,null==t?"":t)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function wn(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw Li("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Dn(e,t){if(e){if(e.constructor===e)throw Li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw Li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw Li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw Li("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function Nn(e,t){if(e){if(e.constructor===e)throw Li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===Ii||e===Ri||e===_i)throw Li("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Tn(e){return e.constant}function En(e,t,n,r){Dn(e,r);for(var i,o=t.split("."),a=0;o.length>1;a++){i=wn(o.shift(),r);var s=Dn(e[i],r);s||(s={},e[i]=s),e=s}return i=wn(o.shift(),r),Dn(e[i],r),e[i]=n,n}function Mn(e,t,r,i,o,a){return wn(e,a),wn(t,a),wn(r,a),wn(i,a),wn(o,a),function(a,s){var l=s&&s.hasOwnProperty(e)?s:a;return null==l?l:(l=l[e],t?null==l?n:(l=l[t],r?null==l?n:(l=l[r],i?null==l?n:(l=l[i],o?null==l?n:l=l[o]:l):l):l):l)}}function An(e,t,r){var i=Ui[e];if(i)return i;var a=e.split("."),s=a.length;if(t.csp)i=6>s?Mn(a[0],a[1],a[2],a[3],a[4],r):function(e,t){var i,o=0;do i=Mn(a[o++],a[o++],a[o++],a[o++],a[o++],r)(e,t),t=n,e=i;while(s>o);return i};else{var l="";o(a,function(e,t){wn(e,r),l+="if(s == null) return undefined;\ns="+(t?"s":'((l&&l.hasOwnProperty("'+e+'"))?l:s)')+"."+e+";\n"}),l+="return s;";var c=new Function("s","l",l);c.toString=g(l),i=c}return i.sharedGetter=!0,i.assign=function(t,n){return En(t,e,n,e)},Ui[e]=i,i}function Pn(){var e=lt(),t={csp:!1};this.$get=["$filter","$sniffer",function(n,r){function i(e){var t=e;return e.sharedGetter&&(t=function(t,n){return e(t,n)},t.literal=e.literal,t.constant=e.constant,t.assign=e.assign),t}function a(e,t){for(var n=0,r=e.length;r>n;n++){var i=e[n];i.constant||(i.inputs?a(i.inputs,t):-1===t.indexOf(i)&&t.push(i))}return t}function s(e,t){return null==e||null==t?e===t:"object"==typeof e&&(e=e.valueOf(),"object"==typeof e)?!1:e===t||e!==e&&t!==t}function l(e,t,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var l=s;return o=o[0],e.$watch(function(e){var t=o(e);return s(t,l)||(i=r(e),l=t&&t.valueOf()),i},t,n)}for(var c=[],u=0,p=o.length;p>u;u++)c[u]=s;return e.$watch(function(e){for(var t=!1,n=0,a=o.length;a>n;n++){var l=o[n](e);(t||(t=!s(l,c[n])))&&(c[n]=l&&l.valueOf())}return t&&(i=r(e)),i},t,n)}function c(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,x(t)&&t.apply(this,arguments),v(e)&&r.$$postDigest(function(){v(o)&&i()})},n)}function u(e,t,n,r){function i(e){var t=!0;return o(e,function(e){v(e)||(t=!1)}),t}var a;return a=e.$watch(function(e){return r(e)},function(e,n,r){x(t)&&t.call(this,e,n,r),i(e)&&r.$$postDigest(function(){i(e)&&a()})},n)}function p(e,t,n,r){var i;return i=e.$watch(function(e){return r(e)},function(){x(t)&&t.apply(this,arguments),i()},n)}function d(e,t){if(!t)return e;var n=function(n,r){var i=e(n,r),o=t(i,n,r);return v(i)?o:i};return e.$$watchDelegate&&e.$$watchDelegate!==l?n.$$watchDelegate=e.$$watchDelegate:t.$stateful||(n.$$watchDelegate=l,n.inputs=[e]),n}return t.csp=r.csp,function(r,o){var a,s,f;switch(typeof r){case"string":if(f=r=r.trim(),a=e[f],!a){":"===r.charAt(0)&&":"===r.charAt(1)&&(s=!0,r=r.substring(2));var m=new Gi(t),g=new Vi(m,n,t);a=g.parse(r),a.constant?a.$$watchDelegate=p:s?(a=i(a),a.$$watchDelegate=a.literal?u:c):a.inputs&&(a.$$watchDelegate=l),e[f]=a}return d(a,o);case"function":return d(r,o);default:return d(h,o)}}}]}function kn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return In(function(t){e.$evalAsync(t)},t)}]}function Ln(){this.$get=["$browser","$exceptionHandler",function(e,t){return In(function(t){e.defer(t)},t)}]}function In(e,t){function i(e,t,n){function r(t){return function(n){i||(i=!0,t.call(e,n))}}var i=!1;return[r(t),r(n)]}function a(){this.$$state={status:0}}function s(e,t){return function(n){t.call(e,n)}}function l(e){var r,i,o;o=e.pending,e.processScheduled=!1,e.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][e.status];try{x(r)?i.resolve(r(e.value)):1===e.status?i.resolve(e.value):i.reject(e.value)}catch(l){i.reject(l),t(l)}}}function c(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){l(t)}))}function u(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function p(e){var t=new u,n=0,r=Zr(e)?[]:{};return o(e,function(e,i){n++,b(e).then(function(e){r.hasOwnProperty(i)||(r[i]=e,--n||t.resolve(r))},function(e){r.hasOwnProperty(i)||t.reject(e)})}),0===n&&t.resolve(r),t.promise}var d=r("$q",TypeError),f=function(){return new u};a.prototype={then:function(e,t,n){var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&c(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return g(t,!0,e)},function(t){return g(t,!1,e)},t)}},u.prototype={resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(y(e)||x(e))&&(n=e&&e.then),x(n)?(this.promise.$$state.status=-1,n.call(e,r[0],r[1],this.notify)):(this.promise.$$state.value=e,this.promise.$$state.status=1,c(this.promise.$$state))}catch(o){r[1](o),t(o)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;a>o;o++){i=r[o][0],e=r[o][3];try{i.notify(x(e)?e(n):n)}catch(s){t(s)}}})}};var h=function(e){var t=new u;return t.reject(e),t.promise},m=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},g=function(e,t,n){var r=null;try{x(n)&&(r=n())}catch(i){return m(i,!1)}return A(r)?r.then(function(){return m(e,t)},function(e){return m(e,!1)}):m(e,t)},b=function(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)},v=function $(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!x(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);if(!(this instanceof $))return new $(e);var r=new u;return e(t,n),r.promise};return v.defer=f,v.reject=h,v.when=b,v.all=p,v}function Rn(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function _n(){var e=10,t=r("$rootScope"),n=null,a=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,s,l,u){function p(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$postDigestQueue=[],this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null,this.$$applyAsyncQueue=[]}function d(e){if($.$$phase)throw t("inprog","{0} already in progress",$.$$phase);$.$$phase=e}function f(){$.$$phase=null}function m(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function g(){}function b(){for(var e=$.$$applyAsyncQueue;e.length;)try{e.shift()()}catch(t){s(t)}a=null}function v(){null===a&&(a=u.defer(function(){$.$apply(b)}))}p.prototype={constructor:p,$new:function(e){var t;return e?(t=new p,t.$root=this.$root,t.$$asyncQueue=this.$$asyncQueue,t.$$postDigestQueue=this.$$postDigestQueue):(this.$$ChildScope||(this.$$ChildScope=function(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null},this.$$ChildScope.prototype=this),t=new this.$$ChildScope),t["this"]=t,t.$parent=this,t.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=t,this.$$childTail=t):this.$$childHead=this.$$childTail=t,t},$watch:function(e,t,r){var i=l(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,r,i);var o=this,a=o.$$watchers,s={fn:t,last:g,get:i,exp:e,eq:!!r};return n=null,x(t)||(s.fn=h),a||(a=o.$$watchers=[]),a.unshift(s),function(){I(a,s),n=null}},$watchGroup:function(e,t){function n(){l=!1,c?(c=!1,t(i,i,s)):t(i,r,s)}var r=new Array(e.length),i=new Array(e.length),a=[],s=this,l=!1,c=!0;if(!e.length){var u=!0;return s.$evalAsync(function(){u&&t(i,i,s)}),function(){u=!1}}return 1===e.length?this.$watch(e[0],function(e,n,o){i[0]=e,r[0]=n,t(i,e===n?i:r,o)}):(o(e,function(e,t){var o=s.$watch(e,function(e,o){i[t]=e,r[t]=o,l||(l=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function n(e){o=e;var t,n,r,s,l;if(y(o))if(i(o)){a!==f&&(a=f,g=a.length=0,p++),t=o.length,g!==t&&(p++,a.length=g=t);for(var c=0;t>c;c++)l=a[c],s=o[c],r=l!==l&&s!==s,r||l===s||(p++,a[c]=s)}else{a!==h&&(a=h={},g=0,p++),t=0;for(n in o)o.hasOwnProperty(n)&&(t++,s=o[n],l=a[n],n in a?(r=l!==l&&s!==s,r||l===s||(p++,a[n]=s)):(g++,a[n]=s,p++));if(g>t){p++;for(n in a)o.hasOwnProperty(n)||(g--,delete a[n])}}else a!==o&&(a=o,p++);return p}function r(){if(m?(m=!1,t(o,o,c)):t(o,s,c),u)if(y(o))if(i(o)){s=new Array(o.length);for(var e=0;e1,p=0,d=l(e,n),f=[],h={},m=!0,g=0;return this.$watch(d,r)},$digest:function(){var r,i,o,l,c,p,h,m,v,y,S,C=this.$$asyncQueue,w=this.$$postDigestQueue,D=e,N=this,T=[];d("$digest"),u.$$checkUrlChange(),this===$&&null!==a&&(u.defer.cancel(a),b()),n=null;do{for(p=!1,m=N;C.length;){try{S=C.shift(),S.scope.$eval(S.expression)}catch(E){s(E)}n=null}e:do{if(l=m.$$watchers)for(c=l.length;c--;)try{if(r=l[c])if((i=r.get(m))===(o=r.last)||(r.eq?F(i,o):"number"==typeof i&&"number"==typeof o&&isNaN(i)&&isNaN(o))){if(r===n){p=!1;break e}}else p=!0,n=r,r.last=r.eq?R(i,null):i,r.fn(i,o===g?i:o,m),5>D&&(v=4-D,T[v]||(T[v]=[]),y=x(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,y+="; newVal: "+U(i)+"; oldVal: "+U(o),T[v].push(y))}catch(E){s(E)}if(!(h=m.$$childHead||m!==N&&m.$$nextSibling))for(;m!==N&&!(h=m.$$nextSibling);)m=m.$parent}while(m=h);if((p||C.length)&&!D--)throw f(),t("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,U(T))}while(p||C.length);for(f();w.length;)try{w.shift()()}catch(E){s(E)}},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==$){for(var t in this.$$listenerCount)m(this,this.$$listenerCount[t],t);e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=null,this.$$listeners={},this.$$watchers=this.$$asyncQueue=this.$$postDigestQueue=[],this.$destroy=this.$digest=this.$apply=h,this.$on=this.$watch=this.$watchGroup=function(){return h}}}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e){$.$$phase||$.$$asyncQueue.length||u.defer(function(){$.$$asyncQueue.length&&$.$digest()}),this.$$asyncQueue.push({scope:this,expression:e})},$$postDigest:function(e){this.$$postDigestQueue.push(e)},$apply:function(e){try{return d("$apply"),this.$eval(e)}catch(t){s(t)}finally{f();try{$.$digest()}catch(t){throw s(t),t}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&$.$$applyAsyncQueue.push(t),v()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){n[n.indexOf(t)]=null,m(i,1,e)}},$emit:function(e){var t,n,r,i=[],o=this,a=!1,l={name:e,targetScope:o,stopPropagation:function(){a=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=B([l],arguments,1);do{for(t=o.$$listeners[e]||i,l.currentScope=o,n=0,r=t.length;r>n;n++)if(t[n])try{t[n].apply(null,c)}catch(u){s(u)}else t.splice(n,1),n--,r--;if(a)return l.currentScope=null,l;o=o.$parent}while(o);return l.currentScope=null,l},$broadcast:function(e){var t=this,n=t,r=t,i={name:e,targetScope:t,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!t.$$listenerCount[e])return i;for(var o,a,l,c=B([i],arguments,1);n=r;){for(i.currentScope=n,o=n.$$listeners[e]||[],a=0,l=o.length;l>a;a++)if(o[a])try{o[a].apply(null,c)}catch(u){s(u)}else o.splice(a,1),a--,l--;if(!(r=n.$$listenerCount[e]&&n.$$childHead||n!==t&&n.$$nextSibling))for(;n!==t&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var $=new p;return $}]}function Fn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return v(t)?(e=t,this):e -},this.imgSrcSanitizationWhitelist=function(e){return v(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return Or&&!(Or>=8)||(i=Wn(n).href,""===i||i.match(o))?n:"unsafe:"+i}}}function Bn(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#-1)throw ji("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Bn(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(w(e))return new RegExp("^"+e.source+"$");throw ji("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Gn(e){var t=[];return v(e)&&o(e,function(e){t.push(On(e))}),t}function Vn(){this.SCE_CONTEXTS=qi;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Gn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Gn(e)),t},this.$get=["$injector",function(r){function i(e,t){return"self"===e?Qn(t):!!e.exec(t.href)}function o(n){var r,o,a=Wn(n.toString()),s=!1;for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!0;break}if(s)for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!1;break}return s}function a(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function s(e,t){var r=d.hasOwnProperty(e)?d[e]:null;if(!r)throw ji("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||t===n||""===t)return t;if("string"!=typeof t)throw ji("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new r(t)}function l(e){return e instanceof p?e.$$unwrapTrustedValue():e}function c(e,t){if(null===t||t===n||""===t)return t;var r=d.hasOwnProperty(e)?d[e]:null;if(r&&t instanceof r)return t.$$unwrapTrustedValue();if(e===qi.RESOURCE_URL){if(o(t))return t;throw ji("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===qi.HTML)return u(t);throw ji("unsafe","Attempting to use an unsafe value in a safe context.")}var u=function(){throw ji("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(u=r.get("$sanitize"));var p=a(),d={};return d[qi.HTML]=a(p),d[qi.CSS]=a(p),d[qi.URL]=a(p),d[qi.JS]=a(p),d[qi.RESOURCE_URL]=a(d[qi.URL]),{trustAs:s,getTrusted:c,valueOf:l}}]}function Un(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sniffer","$sceDelegate",function(t,n,r){if(e&&n.msie&&n.msieDocumentMode<8)throw ji("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=_(qi);i.isEnabled=function(){return e},i.trustAs=r.trustAs,i.getTrusted=r.getTrusted,i.valueOf=r.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=m),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var a=i.parseAs,s=i.getTrusted,l=i.trustAs;return o(qi,function(e,t){var n=Ir(t);i[dt("parse_as_"+n)]=function(t){return a(e,t)},i[dt("get_trusted_"+n)]=function(t){return s(e,t)},i[dt("trust_as_"+n)]=function(t){return l(e,t)}}),i}]}function jn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=d((/android (\d+)/.exec(Ir((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},l=s.documentMode,c=/^(Moz|webkit|O|ms)(?=[A-Z])/,u=s.body&&s.body.style,p=!1,f=!1;if(u){for(var h in u)if(r=c.exec(h)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),p=!!("transition"in u||n+"Transition"in u),f=!!("animation"in u||n+"Animation"in u),!o||p&&f||(p=$(s.body.style.webkitTransition),f=$(s.body.style.webkitAnimation))}return{history:!(!e.history||!e.history.pushState||4>o||a),hashchange:"onhashchange"in e&&(!l||l>7),hasEvent:function(e){if("input"==e&&9==Or)return!1;if(b(i[e])){var t=s.createElement("div");i[e]="on"+e in t}return i[e]},csp:Jr(),vendorPrefix:n,transitions:p,animations:f,android:o,msie:Or,msieDocumentMode:l}}]}function qn(){this.$get=["$templateCache","$http","$q",function(e,t,n){function r(i,o){function a(){if(s.totalPendingRequests--,!o)throw Ti("tpload","Failed to load template: {0}",i);return n.reject()}var s=r;return s.totalPendingRequests++,t.get(i,{cache:e}).then(function(t){var n=t.data;return n&&0!==n.length?(s.totalPendingRequests--,e.put(i,n),n):a()},a)}return r.totalPendingRequests=0,r}]}function zn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var r={};return r.findBindings=function(e,t,n){var r=e.getElementsByClassName("ng-binding"),i=[];return o(r,function(e){var r=Wr.element(e).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+t+"(\\s|\\||$)");o.test(r)&&i.push(e)}else-1!=r.indexOf(t)&&i.push(e)})}),i},r.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i-1});var o=function(e,t){if("string"==typeof t&&"!"===t.charAt(0))return!o(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return n(e,t);case"object":switch(typeof t){case"object":return n(e,t);default:for(var r in e)if("$"!==r.charAt(0)&&o(e[r],t))return!0}return!1;case"array":for(var i=0;ie;e=Math.abs(e);var a=e+"",s="",l=[],c=!1;if(-1!==a.indexOf("e")){var u=a.match(/([\d\.]+)e(-?)(\d+)/);u&&"-"==u[2]&&u[3]>i+1?(a="0",e=0):(s=a,c=!0)}if(c)i>0&&e>-1&&1>e&&(s=e.toFixed(i));else{var p=(a.split(Wi)[1]||"").length;b(i)&&(i=Math.min(Math.max(t.minFrac,p),t.maxFrac)),e=+(Math.round(+(e.toString()+"e"+i)).toString()+"e"+-i),0===e&&(o=!1);var d=(""+e).split(Wi),f=d[0];d=d[1]||"";var h,m=0,g=t.lgSize,v=t.gSize;if(f.length>=g+v)for(m=f.length-g,h=0;m>h;h++)(m-h)%v===0&&0!==h&&(s+=n),s+=f.charAt(h);for(h=m;he&&(r="-",e=-e),e=""+e;e.length0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),tr(o,t,r)}}function rr(e,t){return function(n,r){var i=n["get"+e](),o=_r(t?"SHORT"+e:e);return r[o][i]}}function ir(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=tr(Math[t>0?"floor":"ceil"](t/60),2)+tr(Math.abs(t%60),2)}function or(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(4>=t?5:12)-t)}function ar(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function sr(e){return function(t){var n=or(t.getFullYear()),r=ar(t),i=+r-+n,o=1+Math.round(i/6048e5);return tr(o,e)}}function lr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function cr(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=d(t[9]+t[10]),o=d(t[9]+t[11])),a.call(r,d(t[1]),d(t[2])-1,d(t[3]));var l=d(t[4]||0)-i,c=d(t[5]||0)-o,u=d(t[6]||0),p=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,l,c,u,p),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,l="",c=[];if(r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,$(n)&&(n=Zi.test(n)?d(n):t(n)),S(n)&&(n=new Date(n)),!C(n))return n;for(;r;)s=Ki.exec(r),s?(c=B(c,s,1),r=c.pop()):(c.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(t){a=Qi[t],l+=a?a(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}}function ur(){return function(e){return U(e,!0)}}function pr(){return function(e,t){if(S(e)&&(e=e.toString()),!Zr(e)&&!$(e))return e;if(t=1/0===Math.abs(Number(t))?Number(t):d(t),$(e))return t?t>=0?e.slice(0,t):e.slice(t,e.length):"";var n,r,i=[];for(t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(n=0,r=t):(n=e.length+t,r=e.length);r>n;n++)i.push(e[n]);return i}}function dr(e){return function(t,n,r){function o(e,t){for(var r=0;re?-1:1):r>n?-1:1}if(!i(t))return t;if(!n)return t;n=Zr(n)?n:[n],n=n.map(function(t){var n=!1,r=t||m;if($(t)&&(("+"==t.charAt(0)||"-"==t.charAt(0))&&(n="-"==t.charAt(0),t=t.substring(1)),r=e(t),r.constant)){var i=r();return a(function(e,t){return s(e[i],t[i])},n)}return a(function(e,t){return s(r(e),r(t))},n)});for(var l=[],c=0;c15&&19>t||t>=37&&40>=t||d(e)}),i.hasEvent("paste")&&t.on("paste cut",d)}t.on("change",u),r.$render=function(){t.val(r.$isEmpty(r.$modelValue)?"":r.$viewValue)}}function yr(e,t){if(C(e))return e;if($(e)){fo.lastIndex=0;var n=fo.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,l=0,c=or(r),u=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),l=t.getMilliseconds()),new Date(r,0,c.getDate()+u,o,a,s,l)}}return 0/0}function $r(e,t){return function(n,r){var i,a;if(C(n))return n;if($(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),ao.test(n))return new Date(n);if(e.lastIndex=0,i=e.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(e,n){n=h},s.$observe("min",function(e){h=d(e),l.$validate()})}if(v(s.max)||s.ngMax){var m;l.$validators.max=function(e){return l.$isEmpty(e)||b(m)||r(e)<=m},s.$observe("max",function(e){m=d(e),l.$validate()})}}}function Cr(e,t,r,i){var o=t[0],a=i.$$hasNativeValidators=y(o.validity);a&&i.$parsers.push(function(e){var r=t.prop(Lr)||{};return r.badInput&&!r.typeMismatch?n:e})}function xr(e,t,r,i,o,a){if(Cr(e,t,r,i),vr(e,t,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(e){return i.$isEmpty(e)?null:co.test(e)?parseFloat(e):n}),i.$formatters.push(function(e){if(!i.$isEmpty(e)){if(!S(e))throw bo("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),r.min||r.ngMin){var s;i.$validators.min=function(e){return i.$isEmpty(e)||b(s)||e>=s},r.$observe("min",function(e){v(e)&&!S(e)&&(e=parseFloat(e,10)),s=S(e)&&!isNaN(e)?e:n,i.$validate()})}if(r.max||r.ngMax){var l;i.$validators.max=function(e){return i.$isEmpty(e)||b(l)||l>=e},r.$observe("max",function(e){v(e)&&!S(e)&&(e=parseFloat(e,10)),l=S(e)&&!isNaN(e)?e:n,i.$validate()})}}function wr(e,t,n,r,i,o){vr(e,t,n,r,i,o),gr(r),r.$$parserName="url",r.$validators.url=function(e){return r.$isEmpty(e)||so.test(e)}}function Dr(e,t,n,r,i,o){vr(e,t,n,r,i,o),gr(r),r.$$parserName="email",r.$validators.email=function(e){return r.$isEmpty(e)||lo.test(e)}}function Nr(e,t,n,r){b(n.name)&&t.attr("name",c());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Tr(e,t,n,i,o){var a;if(v(i)){if(a=e(i),!a.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return a(t)}return o}function Er(e,t,n,r,i,o,a,s){var l=Tr(s,e,"ngTrueValue",n.ngTrueValue,!0),c=Tr(s,e,"ngFalseValue",n.ngFalseValue,!1),u=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",u),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e!==l},r.$formatters.push(function(e){return F(e,l)}),r.$parsers.push(function(e){return e?l:c})}function Mr(e){function t(e,t,l){t===n?r("$pending",e,l):i("$pending",e,l),M(t)?t?(p(s.$error,e,l),u(s.$$success,e,l)):(u(s.$error,e,l),p(s.$$success,e,l)):(p(s.$error,e,l),p(s.$$success,e,l)),s.$pending?(o(No,!0),s.$valid=s.$invalid=n,a("",null)):(o(No,!1),s.$valid=Ar(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[e]?n:s.$error[e]?!1:s.$$success[e]?!0:null,a(e,c),d.$setValidity(e,c,s)}function r(e,t,n){s[e]||(s[e]={}),u(s[e],t,n)}function i(e,t,r){s[e]&&p(s[e],t,r),Ar(s[e])&&(s[e]=n)}function o(e,t){t&&!c[e]?(f.addClass(l,e),c[e]=!0):!t&&c[e]&&(f.removeClass(l,e),c[e]=!1)}function a(e,t){e=e?"-"+tt(e,"-"):"",o($o+e,t===!0),o(So+e,t===!1)}var s=e.ctrl,l=e.$element,c={},u=e.set,p=e.unset,d=e.parentForm,f=e.$animate;s.$setValidity=t,a("",!0)}function Ar(e){if(e)for(var t in e)return!1;return!0}function Pr(e,t){return e="ngClass"+e,["$animate",function(n){function r(e,t){var n=[];e:for(var r=0;r0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&r.push(e))}),s.data("$classCounts",n),r.join(" ")}function d(e,t){var i=r(t,e),o=r(e,t);i=p(i,1),o=p(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function f(e){if(t===!0||a.$index%2===t){var n=i(e||[]);if(h){if(!F(e,h)){var r=i(h);d(r,n)}}else c(n)}h=_(e)}var h;a.$watch(l[e],f,!0),l.$observe("class",function(){f(a.$eval(l[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(l[e]));o===t?c(s):u(s)}})}}}]}var kr=/^\/(.+)\/([a-z]*)$/,Lr="validity",Ir=function(e){return $(e)?e.toLowerCase():e},Rr=Object.prototype.hasOwnProperty,_r=function(e){return $(e)?e.toUpperCase():e},Fr=function(e){return $(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Br=function(e){return $(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e};"i"!=="I".toLowerCase()&&(Ir=Fr,_r=Br);var Or,Gr,Vr,Ur,jr=[].slice,qr=[].push,zr=Object.prototype.toString,Hr=r("ng"),Wr=e.angular||(e.angular={}),Qr=0;Or=d((/msie (\d+)/.exec(Ir(navigator.userAgent))||[])[1]),isNaN(Or)&&(Or=d((/trident\/.*; rv:(\d+)/.exec(Ir(navigator.userAgent))||[])[1])),h.$inject=[],m.$inject=[];var Kr,Zr=Array.isArray,Xr=function(e){return $(e)?e.trim():e},Jr=function(){if(v(Jr.isActive_))return Jr.isActive_;var e=!(!t.querySelector("[ng-csp]")&&!t.querySelector("[data-ng-csp]"));if(!e)try{new Function("")}catch(n){e=!0}return Jr.isActive_=e},Yr=["ng-","data-ng-","ng:","x-ng-"],ei=/[A-Z]/g,ti=!1,ni={full:"1.3.0-rc.3",major:1,minor:3,dot:0,codeName:"aggressive-pacifism"};bt.expando="ng339";var ri=bt.cache={},ii=1,oi=function(e,t,n){e.addEventListener(t,n,!1)},ai=function(e,t,n){e.removeEventListener(t,n,!1)};bt._data=function(e){return this.cache[e[this.expando]]||{}};var si=/([\:\-\_]+(.))/g,li=/^moz([A-Z])/,ci={mouseleave:"mouseout",mouseenter:"mouseover"},ui=r("jqLite"),pi=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,di=/<|&#?\w+;/,fi=/<([\w:]+)/,hi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,mi={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};mi.optgroup=mi.option,mi.tbody=mi.tfoot=mi.colgroup=mi.caption=mi.thead,mi.th=mi.td;var gi=bt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===t.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),bt(e).on("load",r),this.on("DOMContentLoaded",r))},toString:function(){var e=[];return o(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Gr(e>=0?this[e]:this[this.length+e])},length:0,push:qr,sort:[].sort,splice:[].splice},bi={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){bi[Ir(e)]=e});var vi={};o("input,select,option,textarea,button,form,details".split(","),function(e){vi[e]=!0});var yi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:xt,removeData:St},function(e,t){bt[t]=e}),o({data:xt,inheritedData:Mt,scope:function(e){return Gr.data(e,"$scope")||Mt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Gr.data(e,"$isolateScope")||Gr.data(e,"$isolateScopeNoTemplate")},controller:Et,injector:function(e){return Mt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:wt,css:function(e,t,n){return t=dt(t),v(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,r){var i=Ir(t);if(bi[i]){if(!v(r))return e[t]||(e.attributes.getNamedItem(t)||h).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(v(r))e.setAttribute(t,r);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?n:o}},prop:function(e,t,n){return v(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(b(t)){var n=e.nodeType;return 1===n||3===n?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(b(t)){if(e.multiple&&"select"===L(e)){var n=[];return o(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return b(t)?e.innerHTML:(yt(e,!0),void(e.innerHTML=t))},empty:At},function(e,t){bt.prototype[t]=function(t,r){var i,o,a=this.length;if(e!==At&&(2==e.length&&e!==wt&&e!==Et?t:r)===n){if(y(t)){for(i=0;a>i;i++)if(e===xt)e(this[i],t);else for(o in t)e(this[i],o,t[o]);return this}for(var s=e.$dv,l=s===n?Math.min(a,1):a,c=0;l>c;c++){var u=e(this[c],t,r);s=s?s+u:u}return s}for(i=0;a>i;i++)e(this[i],t,r);return this}}),o({removeData:St,on:function ha(e,t,n,r){if(v(r))throw ui("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ht(e)){var i=Ct(e,!0),o=i.events,a=i.handle;a||(a=i.handle=It(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],l=s.length;l--;){t=s[l];var c=o[t];c||(o[t]=[],"mouseenter"===t||"mouseleave"===t?ha(e,ci[t],function(e){var n=this,r=e.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(e,t)}):"$destroy"!==t&&oi(e,t,a),c=o[t]),c.push(n)}}},off:$t,one:function(e,t,n){e=Gr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,r=e.parentNode;yt(e),o(new bt(t),function(t){n?r.insertBefore(t,n.nextSibling):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return o(e.childNodes,function(e){1===e.nodeType&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(1===n||11===n){t=new bt(t);for(var r=0,i=t.length;i>r;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(1===e.nodeType){var n=e.firstChild;o(new bt(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=Gr(t).eq(0).clone()[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:Pt,detach:function(e){Pt(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new bt(t);for(var i=0,o=t.length;o>i;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Nt,removeClass:Dt,toggleClass:function(e,t,n){t&&o(t.split(" "),function(t){var r=n;b(r)&&(r=!wt(e,t)),(r?Nt:Dt)(e,t)})},parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:vt,triggerHandler:function(e,t,n){var r,i,a,s=t.type||t,l=Ct(e),c=l&&l.events,u=c&&c[s];u&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:h,type:s,target:e},t.type&&(r=p(r,t)),i=_(u),a=n?[r].concat(n):[r],o(i,function(t){r.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){bt.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;a>o;o++)b(i)?(i=e(this[o],t,n,r),v(i)&&(i=Gr(i))):Tt(i,e(this[o],t,n,r));return v(i)?i:this},bt.prototype.bind=bt.prototype.on,bt.prototype.unbind=bt.prototype.off}),_t.prototype={put:function(e,t){this[Rt(e,this.nextUid)]=t},get:function(e){return this[Rt(e,this.nextUid)]},remove:function(e){var t=this[e=Rt(e,this.nextUid)];return delete this[e],t}};var $i=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Si=/,/,Ci=/^\s*(_?)(\S+?)\1\s*$/,xi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,wi=r("$injector");Ot.$$annotate=Bt;var Di=r("$animate"),Ni=["$provide",function(e){this.$$selectors={},this.register=function(t,n){var r=t+"-animation";if(t&&"."!=t.charAt(0))throw Di("notcsel","Expecting class selector starting with '.' got '{0}'.",t);this.$$selectors[t.substr(1)]=r,e.factory(r,n)},this.classNameFilter=function(e){return 1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback",function(e,t){function n(){return r||(r=e.defer(),t(function(){r.resolve(),r=null})),r.promise}var r;return{enter:function(e,t,r){return r?r.after(e):t.prepend(e),n()},leave:function(e){return e.remove(),n()},move:function(e,t,n){return this.enter(e,t,n)},addClass:function(e,t){return t=$(t)?t:Zr(t)?t.join(" "):"",o(e,function(e){Nt(e,t)}),n()},removeClass:function(e,t){return t=$(t)?t:Zr(t)?t.join(" "):"",o(e,function(e){Dt(e,t)}),n()},setClass:function(e,t,r){return this.addClass(e,t),this.removeClass(e,r),n()},enabled:h,cancel:h}}]}],Ti=r("$compile");Ht.$inject=["$provide","$$sanitizeUriProvider"];var Ei=/^(x[\:\-_]|data[\:\-_])/i,Mi=r("$interpolate"),Ai=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Pi={http:80,https:443,ftp:21},ki=r("$location");yn.prototype=vn.prototype=bn.prototype={$$html5:!1,$$replace:!1,absUrl:$n("$$absUrl"),url:function(e){if(b(e))return this.$$url;var t=Ai.exec(e);return t[1]&&this.path(decodeURIComponent(t[1])),(t[2]||t[1])&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:$n("$$protocol"),host:$n("$$host"),port:$n("$$port"),path:Sn("$$path",function(e){return e=e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if($(e)||S(e))e=e.toString(),this.$$search=H(e);else{if(!y(e))throw ki("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");o(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:b(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Sn("$$hash",function(e){return e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};var Li=r("$parse"),Ii=Function.prototype.call,Ri=Function.prototype.apply,_i=Function.prototype.bind,Fi=lt();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(e,t){e.constant=e.literal=e.sharedGetter=!0,Fi[t]=e});var Bi=p(lt(),{"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(v(n)?n:0)-(v(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"===":function(e,t,n,r){return n(e,t)===r(e,t)},"!==":function(e,t,n,r){return n(e,t)!==r(e,t)},"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"!":function(e,t,n){return!n(e,t)},"=":!0,"|":!0}),Oi={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},Gi=function(e){this.options=e};Gi.prototype={constructor:Gi,lex:function(e){for(this.text=e,this.index=0,this.ch=n,this.tokens=[];this.index="0"&&"9">=e},isWhitespace:function(e){return" "===e||"\r"===e||" "===e||"\n"===e||" "===e||" "===e},isIdent:function(e){return e>="a"&&"z">=e||e>="A"&&"Z">=e||"_"===e||"$"===e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=v(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw Li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index0){var i=this.tokens[0],o=i.text;if(o===e||o===t||o===n||o===r||!e&&!t&&!n&&!r)return i}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return i?(this.tokens.shift(),i):!1},consume:function(e){this.expect(e)||this.throwError("is unexpected, expecting ["+e+"]",this.peek())},unaryFn:function(e,t){return p(function(n,r){return e(n,r,t)},{constant:t.constant,inputs:[t]})},binaryFn:function(e,t,n,r){return p(function(r,i){return t(r,i,e,n)},{constant:e.constant&&n.constant,inputs:!r&&[e,n]})},statements:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.filterChain()),!this.expect(";"))return 1===e.length?e[0]:function(t,n){for(var r,i=0,o=e.length;o>i;i++)r=e[i](t,n);return r}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},filter:function(e){var t,r,i=this.expect(),o=this.$filter(i.text);if(this.peek(":"))for(t=[],r=[];this.expect(":");)t.push(this.expression());var a=[e].concat(t||[]);return p(function(i,a){var s=e(i,a);if(r){r[0]=s;for(var l=t.length;l--;)r[l+1]=t[l](i,a);return o.apply(n,r)}return o(s)},{constant:!o.$stateful&&a.every(Tn),inputs:!o.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var e,t,n=this.ternary();return(t=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,t.index)+"] can not be assigned to",t),e=this.ternary(),p(function(t,r){return n.assign(t,e(t,r),r)},{inputs:[n,e]})):n},ternary:function(){var e,t,n=this.logicalOR();if(t=this.expect("?")){if(e=this.assignment(),t=this.expect(":")){var r=this.assignment();return p(function(t,i){return n(t,i)?e(t,i):r(t,i)},{constant:n.constant&&e.constant&&r.constant})}this.throwError("expected :",t)}return n},logicalOR:function(){for(var e,t=this.logicalAND();e=this.expect("||");)t=this.binaryFn(t,e.fn,this.logicalAND(),!0);return t},logicalAND:function(){var e,t=this.equality();return(e=this.expect("&&"))&&(t=this.binaryFn(t,e.fn,this.logicalAND(),!0)),t},equality:function(){var e,t=this.relational();return(e=this.expect("==","!=","===","!=="))&&(t=this.binaryFn(t,e.fn,this.equality())),t},relational:function(){var e,t=this.additive();return(e=this.expect("<",">","<=",">="))&&(t=this.binaryFn(t,e.fn,this.relational())),t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t=this.binaryFn(t,e.fn,this.multiplicative());return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t=this.binaryFn(t,e.fn,this.unary());return t},unary:function(){var e;return this.expect("+")?this.primary():(e=this.expect("-"))?this.binaryFn(Vi.ZERO,e.fn,this.unary()):(e=this.expect("!"))?this.unaryFn(e.fn,this.unary()):this.primary()},fieldAccess:function(e){var t=this.text,n=this.expect().text,r=An(n,this.options,t);return p(function(t,n,i){return r(i||e(t,n))},{assign:function(r,i,o){var a=e(r,o);return a||e.assign(r,a={}),En(a,n,i,t)}})},objectIndex:function(e){var t=this.text,r=this.expression();return this.consume("]"),p(function(i,o){var a,s=e(i,o),l=r(i,o);return wn(l,t),s?a=Dn(s[l],t):n},{assign:function(n,i,o){var a=wn(r(n,o),t),s=Dn(e(n,o),t);return s||e.assign(n,s={}),s[a]=i}})},functionCall:function(e,t){var n=[];if(")"!==this.peekToken().text)do n.push(this.expression());while(this.expect(","));this.consume(")");var r=this.text,i=n.length?[]:null;return function(o,a){var s=t?t(o,a):o,l=e(o,a,s)||h;if(i)for(var c=n.length;c--;)i[c]=Dn(n[c](o,a),r);Dn(s,r),Nn(l,r);var u=l.apply?l.apply(s,i):l(i[0],i[1],i[2],i[3],i[4]);return Dn(u,r)}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;var t=this.expression();e.push(t)}while(this.expect(","));return this.consume("]"),p(function(t,n){for(var r=[],i=0,o=e.length;o>i;i++)r.push(e[i](t,n));return r},{literal:!0,constant:e.every(Tn),inputs:e})},object:function(){var e=[],t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.expect();e.push(n.string||n.text),this.consume(":");var r=this.expression();t.push(r)}while(this.expect(","));return this.consume("}"),p(function(n,r){for(var i={},o=0,a=t.length;a>o;o++)i[e[o]]=t[o](n,r);return i},{literal:!0,constant:t.every(Tn),inputs:t})}};var Ui=lt(),ji=r("$sce"),qi={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Ti=r("$compile"),zi=t.createElement("a"),Hi=Wn(e.location.href,!0);Zn.$inject=["$provide"],Jn.$inject=["$locale"],Yn.$inject=["$locale"];var Wi=".",Qi={yyyy:nr("FullYear",4),yy:nr("FullYear",2,0,!0),y:nr("FullYear",1),MMMM:rr("Month"),MMM:rr("Month",!0),MM:nr("Month",2,1),M:nr("Month",1,1),dd:nr("Date",2),d:nr("Date",1),HH:nr("Hours",2),H:nr("Hours",1),hh:nr("Hours",2,-12),h:nr("Hours",1,-12),mm:nr("Minutes",2),m:nr("Minutes",1),ss:nr("Seconds",2),s:nr("Seconds",1),sss:nr("Milliseconds",3),EEEE:rr("Day"),EEE:rr("Day",!0),a:lr,Z:ir,ww:sr(2),w:sr(1)},Ki=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Zi=/^\-?\d+$/;cr.$inject=["$locale"];var Xi=g(Ir),Ji=g(_r);dr.$inject=["$parse"];var Yi=g({restrict:"E",compile:function(e,n){return 8>=Or&&(n.href||n.name||n.$set("href",""),e.append(t.createComment("IE fix"))),n.href||n.xlinkHref||n.name?void 0:function(e,t){var n="[object SVGAnimatedString]"===zr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}),eo={};o(bi,function(e,t){if("multiple"!=e){var n=Wt("ng-"+t);eo[n]=function(){return{restrict:"A",priority:100,link:function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),o(yi,function(e,t){eo[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(kr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),o(["src","srcset","href"],function(e){var t=Wt("ng-"+e);eo[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===zr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(Or&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var to={$addControl:h,$$renameControl:hr,$removeControl:h,$setValidity:h,$$setPending:h,$setDirty:h,$setPristine:h,$setSubmitted:h,$$clearControlValidity:h},no="ng-submitted";mr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var ro=function(e){return["$timeout",function(t){var r={name:"form",restrict:e?"EAC":"E",controller:mr,compile:function(){return{pre:function(e,r,i,o){if(!i.action){var a=function(t){e.$apply(function(){o.$commitViewValue(),o.$setSubmitted()}),t.preventDefault?t.preventDefault():t.returnValue=!1};oi(r[0],"submit",a),r.on("$destroy",function(){t(function(){ai(r[0],"submit",a)},0,!1)})}var s=o.$$parentForm,l=o.$name;l&&(En(e,l,o,l),i.$observe(i.name?"name":"ngForm",function(t){l!==t&&(En(e,l,n,l),l=t,En(e,l,o,l),s.$$renameControl(o,l))})),s!==to&&r.on("$destroy",function(){s.$removeControl(o),l&&En(e,l,n,l),p(o,to)})}}}};return r}]},io=ro(),oo=ro(!0),ao=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,so=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,lo=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,co=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,uo=/^(\d{4})-(\d{2})-(\d{2})$/,po=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,fo=/^(\d{4})-W(\d\d)$/,ho=/^(\d{4})-(\d\d)$/,mo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,go=/(\s+|^)default(\s+|$)/,bo=new r("ngModel"),vo={text:br,date:Sr("date",uo,$r(uo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Sr("datetimelocal",po,$r(po,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Sr("time",mo,$r(mo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Sr("week",fo,yr,"yyyy-Www"),month:Sr("month",ho,$r(ho,["yyyy","MM"]),"yyyy-MM"),number:xr,url:wr,email:Dr,radio:Nr,checkbox:Er,hidden:h,button:h,submit:h,reset:h,file:h},yo=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:function(i,o,a,s){s[0]&&(vo[Ir(a.type)]||vo.text)(i,o,a,s[0],t,e,n,r)}}}],$o="ng-valid",So="ng-invalid",Co="ng-pristine",xo="ng-dirty",wo="ng-untouched",Do="ng-touched",No="ng-pending",To=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,r,i,a,s,l,c,u,p){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=p(r.name||"",!1)(e);var d=a(r.ngModel),f=null,m=this,g=function(){var t=d(e);return m.$options&&m.$options.getterSetter&&x(t)&&(t=t()),t},y=function(){var t;m.$options&&m.$options.getterSetter&&x(t=d(e))?t(m.$modelValue):d.assign(e,m.$modelValue)};this.$$setOptions=function(e){if(m.$options=e,!(d.assign||e&&e.getterSetter))throw bo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,q(i))},this.$render=h,this.$isEmpty=function(e){return b(e)||""===e||null===e||e!==e};var $=i.inheritedData("$formController")||to,C=0;i.addClass(Co).addClass(wo),Mr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},parentForm:$,$animate:s}),this.$setPristine=function(){m.$dirty=!1,m.$pristine=!0,s.removeClass(i,xo),s.addClass(i,Co)},this.$setUntouched=function(){m.$touched=!1,m.$untouched=!0,s.setClass(i,wo,Do)},this.$setTouched=function(){m.$touched=!0,m.$untouched=!1,s.setClass(i,Do,wo)},this.$rollbackViewValue=function(){l.cancel(f),m.$viewValue=m.$$lastCommittedViewValue,m.$render()},this.$validate=function(){S(m.$modelValue)&&isNaN(m.$modelValue)||this.$$parseAndValidate()},this.$$runValidators=function(e,t,r,i){function a(e){var t=m.$$parserName||"parse";if(e===n)c(t,null);else if(c(t,e),!e)return o(m.$validators,function(e,t){c(t,null)}),o(m.$asyncValidators,function(e,t){c(t,null)}),!1;return!0}function s(){var e=!0;return o(m.$validators,function(n,i){var o=n(t,r);e=e&&o,c(i,o)}),e?!0:(o(m.$asyncValidators,function(e,t){c(t,null)}),!1)}function l(){var e=[],i=!0;o(m.$asyncValidators,function(o,a){var s=o(t,r);if(!A(s))throw bo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);c(a,n),e.push(s.then(function(){c(a,!0)},function(){i=!1,c(a,!1)}))}),e.length?u.all(e).then(function(){p(i)},h):p(!0)}function c(e,t){d===C&&m.$setValidity(e,t)}function p(e){d===C&&i(e)}C++;var d=C;return a(e)&&s()?void l():void p(!1)},this.$commitViewValue=function(){var e=m.$viewValue;l.cancel(f),(m.$$lastCommittedViewValue!==e||""===e&&m.$$hasNativeValidators)&&(m.$$lastCommittedViewValue=e,m.$pristine&&(m.$dirty=!0,m.$pristine=!1,s.removeClass(i,Co),s.addClass(i,xo),$.$setDirty()),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){m.$modelValue!==a&&m.$$writeModelToScope()}for(var t=!0,r=m.$$lastCommittedViewValue,i=r,o=0;o0&&(e=new RegExp(e)),e&&!e.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,e,q(t));a=e||n,o.$validate()}),o.$validators.pattern=function(e){return o.$isEmpty(e)||b(a)||a.test(e)}}}}},ko=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("maxlength",function(e){i=d(e)||0,r.$validate()}),r.$validators.maxlength=function(e,t){return r.$isEmpty(e)||t.length<=i}}}}},Lo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=d(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(e)||t.length>=i}}}}},Io=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,r,i){var a=t.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,l=s?Xr(a):a,c=function(e){if(!b(e)){var t=[];return e&&o(e.split(l),function(e){e&&t.push(s?Xr(e):e)}),t}};i.$parsers.push(c),i.$formatters.push(function(e){return Zr(e)?e.join(a):n}),i.$isEmpty=function(e){return!e||!e.length}}}},Ro=/^(true|false|\d+)$/,_o=function(){return{restrict:"A",priority:100,compile:function(e,t){return Ro.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Fo=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var r=this;this.$options=e.$eval(t.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=Xr(this.$options.updateOn.replace(go,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Bo=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,r,i){e.$$addBindingInfo(r,i.ngBind),t.$watch(i.ngBind,function(e){r.text(e==n?"":e)})}}}}],Oo=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var o=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,o.expressions),i.$observe("ngBindTemplate",function(e){r.text(e)})}}}}],Go=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(e){return(e||"").toString()});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){r.html(e.getTrustedHtml(o(t))||"")})}}}}],Vo=Pr("",!0),Uo=Pr("Odd",0),jo=Pr("Even",1),qo=fr({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),zo=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ho={},Wo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=Wt("ng-"+e);Ho[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t]);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};Wo[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Qo=["$animate",function(e){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,l,c;n.$watch(i.ngIf,function(n){n?l||a(function(n,o){l=o,n[n.length++]=t.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},e.enter(n,r.parent(),r)}):(c&&(c.remove(),c=null),l&&(l.$destroy(),l=null),s&&(c=st(s.clone),e.leave(c).then(function(){c=null}),s=null))})}}}],Ko=["$templateRequest","$anchorScroll","$animate","$sce",function(e,t,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Wr.noop,compile:function(i,o){var a=o.ngInclude||o.src,s=o.onload||"",l=o.autoscroll;return function(i,o,c,u,p){var d,f,h,m=0,g=function(){f&&(f.remove(),f=null),d&&(d.$destroy(),d=null),h&&(n.leave(h).then(function(){f=null}),f=h,h=null)};i.$watch(r.parseAsResourceUrl(a),function(r){var a=function(){!v(l)||l&&!i.$eval(l)||t()},c=++m;r?(e(r,!0).then(function(e){if(c===m){var t=i.$new();u.template=e;var l=p(t,function(e){g(),n.enter(e,null,o).then(a)});d=t,h=l,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){c===m&&(g(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(g(),u.template=null)})}}}}],Zo=["$compile",function(e){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(r,i,o,a){return/SVG/.test(i[0].toString())?(i.empty(),void e(mt(a.template,t).childNodes)(r,function(e){i.append(e)},n,n,i)):(i.html(a.template),void e(i.contents())(r))}}}],Xo=fr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Jo=fr({terminal:!0,priority:1e3}),Yo=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,i,a){var s=a.count,l=a.$attr.when&&i.attr(a.$attr.when),c=a.offset||0,u=r.$eval(l)||{},p={},d=t.startSymbol(),f=t.endSymbol(),h=/^when(Minus)?(.+)$/;o(a,function(e,t){h.test(t)&&(u[Ir(t.replace("when","").replace("Minus","-"))]=i.attr(a.$attr[t]))}),o(u,function(e,r){p[r]=t(e.replace(n,d+s+"-"+c+f))}),r.$watch(function(){var t=parseFloat(r.$eval(s));return isNaN(t)?"":(t in u||(t=e.pluralCat(t-c)),p[t](r))},function(e){i.text(e)})}}}],ea=["$parse","$animate",function(e,a){var s="$$NG_REMOVED",l=r("ngRepeat"),c=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},u=function(e){return e.clone[0]},p=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var f=d.ngRepeat,h=t.createComment(" end ngRepeat: "+f+" "),m=f.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!m)throw l("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",f);var g=m[1],b=m[2],v=m[3],y=m[4];if(m=g.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!m)throw l("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var $=m[3]||m[1],S=m[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent)$/.test(v)))throw l("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var C,x,w,D,N={$id:Rt};return y?C=e(y):(w=function(e,t){return Rt(t)},D=function(e){return e}),function(e,t,r,d,m){C&&(x=function(t,n,r){return S&&(N[S]=t),N[$]=n,N.$index=r,C(e,N)});var g=lt();e.$watchCollection(b,function(r){var d,b,y,C,N,T,E,M,A,P,k,L,I=t[0],R=lt();if(v&&(e[v]=r),i(r))A=r,M=x||w;else{M=x||D,A=[];for(var _ in r)r.hasOwnProperty(_)&&"$"!=_.charAt(0)&&A.push(_);A.sort()}for(C=A.length,k=new Array(C),d=0;C>d;d++)if(N=r===A?d:A[d],T=r[N],E=M(N,T,d),g[E])P=g[E],delete g[E],R[E]=P,k[d]=P;else{if(R[E])throw o(k,function(e){e&&e.scope&&(g[e.id]=e)}),l("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",f,E,U(T));k[d]={id:E,scope:n,clone:n},R[E]=!0}for(var F in g){if(P=g[F],L=st(P.clone),a.leave(L),L[0].parentNode)for(d=0,b=L.length;b>d;d++)L[d][s]=!0;P.scope.$destroy()}for(d=0;C>d;d++)if(N=r===A?d:A[d],T=r[N],P=k[d],P.scope){y=I;do y=y.nextSibling;while(y&&y[s]);u(P)!=y&&a.move(st(P.clone),null,Gr(I)),I=p(P),c(P.scope,d,$,T,S,N,C)}else m(function(e,t){P.scope=t;var n=h.cloneNode(!1);e[e.length++]=n,a.enter(e,null,Gr(I)),I=n,P.clone=e,R[P.id]=P,c(P.scope,d,$,T,S,N,C)});g=R})}}}}],ta=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,"ng-hide")})}}}],na=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,"ng-hide")})}}}],ra=fr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&o(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ia=["$animate",function(e){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,l=[],c=[],u=[],p=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=u.length;i>r;++r)e.cancel(u[r]);for(u.length=0,r=0,i=p.length;i>r;++r){var s=st(c[r].clone);p[r].$destroy();var f=u[r]=e.leave(s);f.then(d(u,r))}c.length=0,p.length=0,(l=a.cases["!"+n]||a.cases["?"])&&o(l,function(n){n.transclude(function(r,i){p.push(i);var o=n.element;r[r.length++]=t.createComment(" end ngSwitchWhen: ");var a={clone:r};c.push(a),e.enter(r,o.parent(),o)})})})}}}],oa=fr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),aa=fr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),sa=fr({restrict:"EAC",link:function(e,t,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",q(t));o(function(e){t.empty(),t.append(e)})}}),la=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],ca=r("ngOptions"),ua=g({restrict:"A",terminal:!0}),pa=["$compile","$parse",function(e,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:h};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r,i,o=this,a={},l=s;o.databound=n.ngModel,o.init=function(e,t,n){l=e,r=t,i=n},o.addOption=function(t,n){ot(t,'"option value"'),a[t]=!0,l.$viewValue==t&&(e.val(t),i.parent()&&i.remove()),n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(e){this.hasOption(e)&&(delete a[e],l.$viewValue==e&&this.renderUnknownOption(e))},o.renderUnknownOption=function(t){var n="? "+Rt(t)+" ?";i.val(n),e.prepend(i),e.val(n),i.prop("selected",!0)},o.hasOption=function(e){return a.hasOwnProperty(e)},t.$on("$destroy",function(){o.renderUnknownOption=h})}],link:function(s,l,c,u){function p(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(D.parent()&&D.remove(),t.val(e),""===e&&h.prop("selected",!0)):b(e)&&h?t.val(""):r.renderUnknownOption(e)},t.on("change",function(){e.$apply(function(){D.parent()&&D.remove(),n.$setViewValue(t.val())})})}function d(e,t,n){var r;n.$render=function(){var e=new _t(n.$viewValue);o(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){F(r,n.$viewValue)||(r=_(n.$viewValue),n.$render())}),t.on("change",function(){e.$apply(function(){var e=[];o(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function f(t,o,s){function l(){var e=!1;if(y){var n=s.$modelValue;if(N&&Zr(n)){e=new _t([]);for(var r={},i=0;iM;M++){if(p=M,h){if(p=B[M],"$"===p.charAt(0))continue;O[h]=p}if(O[f]=F[p],e=m(t,O)||"",(n=I[e])||(n=I[e]=[],R.push(e)),y)A=v(G.remove(N?N(t,O):g(t,O)));else{if(N){var V={};V[f]=_,A=N(t,V)===N(t,O)}else A=_===g(t,O);G=G||A}L=d(t,O),L=v(L)?L:"",n.push({id:N?N(t,O):h?B[M]:M,label:L,selected:A})}for(y||(S||null===_?I[""].unshift({id:"",label:"",selected:!G}):G||I[""].unshift({id:"?",label:"",selected:!0})),E=0,$=R.length;$>E;E++){for(e=R[E],n=I[e],T.length<=E?(i={element:w.clone().attr("label",e),label:n.label},c=[i],T.push(c),o.append(i.element)):(c=T[E],i=c[0],i.label!=e&&i.element.attr("label",i.label=e)),P=null,M=0,D=n.length;D>M;M++)r=n[M],(u=c[M+1])?(P=u.element,u.label!==r.label&&P.text(u.label=r.label),u.id!==r.id&&P.val(u.id=r.id),P[0].selected!==r.selected&&(P.prop("selected",u.selected=r.selected),Or&&P.prop("selected",u.selected))):(""===r.id&&S?k=S:(k=x.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).text(r.label),c.push(u={element:k,label:r.label,id:r.id,selected:r.selected}),P?P.after(k):i.element.append(k),P=k);for(M++;c.length>M;)c.pop().element.remove()}for(;T.length>E;)T.pop()[0].element.remove()}var p;if(!(p=$.match(i)))throw ca("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",$,q(o));var d=r(p[2]||p[1]),f=p[4]||p[6],h=p[5],m=r(p[3]||""),g=r(p[2]?p[1]:f),b=r(p[7]),D=p[8],N=D?r(p[8]):null,T=[[{element:o,label:""}]];S&&(e(S)(t),S.removeClass("ng-scope"),S.remove()),o.empty(),o.on("change",function(){t.$apply(function(){var e,r,i,a,l,c,p,d,m,v=b(t)||[],$={};if(y){for(i=[],c=0,d=T.length;d>c;c++)for(e=T[c],l=1,p=e.length;p>l;l++)if((a=e[l].element)[0].selected){if(r=a.val(),h&&($[h]=r),N)for(m=0;mi;i++)e[f]=n[i],r[i]=d(t,e);return r}},c),y&&t.$watchCollection(function(){return s.$modelValue},c)}if(u[1]){for(var h,m=u[0],g=u[1],y=c.multiple,$=c.ngOptions,S=!1,C=!1,x=Gr(t.createElement("option")),w=Gr(t.createElement("optgroup")),D=x.clone(),N=0,T=l.children(),E=T.length;E>N;N++)if(""===T[N].value){h=S=T.eq(N);break}m.init(g,S,D),y&&(g.$isEmpty=function(e){return!e||0===e.length}),$?f(s,l,g):y?d(s,l,g):p(s,l,g,m)}}}}],da=["$interpolate",function(e){var t={addOption:h,removeOption:h};return{restrict:"E",priority:100,compile:function(n,r){if(b(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound?n.prop("selected",!1):s=t,i?e.$watch(i,function(e,t){r.$set("value",e),t!==e&&s.removeOption(t),s.addOption(e,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],fa=g({restrict:"E",terminal:!1});return e.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(nt(),ut(Wr),void Gr(t).ready(function(){X(t,J)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''),function(e,t,n){"use strict";t.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){var e="$$ngAnimateChildren";return function(n,r,i){var o=i.ngAnimateChildren;t.isString(o)&&0===o.length?r.data(e,!0):n.$watch(o,function(t){r.data(e,!!t)})}}).factory("$$animateReflow",["$$rAF","$document",function(e,t){var n=t[0].body;return function(t){return e(function(){n.offsetWidth+1;t()})}}]).config(["$provide","$animateProvider",function(r,i){function o(e){for(var t=0;tn?(i||"addClass"==l.event)&&s.push(r):n>0&&(i&&"removeClass"!=l.event||a.push(r))}),a.length+s.length>0&&[a.join(" "),s.join(" ")]}function N(e){if(e){var t=[],n={},i=e.substr(1).split(".");(f.transitions||f.animations)&&t.push(r.get(p[""]));for(var o=0;o0&&y(function(){r.triggerHandler(i,{event:e,className:n})})}function p(){l("before")}function d(){l("after")}function f(){l("close"),s()}function m(){m.hasBeenRun||(m.hasBeenRun=!0,a())}function b(){if(!b.hasBeenRun){b.hasBeenRun=!0;var t=r.data(h);t&&($&&$.isClassBased?A(r,n):(y(function(){var t=r.data(h)||{};I==t.index&&A(r,n,e)}),r.data(h,t))),f()}}var v=c,$=T(r,e,n);if(!$)return m(),p(),d(),b(),v;e=$.event,n=$.className;var S=t.element._data($.node);if(S=S&&S.events,i||(i=o?o.parent():r.parent()),P(r,i))return m(),p(),d(),b(),v;var C=r.data(h)||{},x=C.active||{},w=C.totalActive||0,D=C.last,N=!1;if(w>0){var E=[];if($.isClassBased){if("setClass"==D.event)E.push(D),A(r,n);else if(x[n]){var M=x[n];M.event==e?N=!0:(E.push(M),A(r,n))}}else if("leave"==e&&x["ng-leave"])N=!0;else{for(var k in x)E.push(x[k]);C={},A(r,!0)}E.length>0&&u(E,function(e){e.cancel()})}if(!$.isClassBased||$.isSetClassOperation||N||(N="addClass"==e==r.hasClass(n)),N)return m(),p(),d(),f(),v;x=C.active||{},w=C.totalActive||0,"leave"==e&&r.one("$destroy",function(){var e=t.element(this),n=e.data(h);if(n){var r=n.active["ng-leave"];r&&(r.cancel(),A(e,"ng-leave"))}}),r.addClass(g);var I=L++;return w++,x[n]=$,r.data(h,{last:$,active:x,index:I,totalActive:w}),p(),$.before(function(t){var i=r.data(h);t=t||!i||!i.active[n]||$.isClassBased&&i.active[n].event!=e,m(),t===!0?b():(d(),$.after(b))}),$.cancel}function M(e){var n=o(e);if(n){var r=t.isFunction(n.getElementsByClassName)?n.getElementsByClassName(g):n.querySelectorAll("."+g);u(r,function(e){e=t.element(e);var n=e.data(h);n&&n.active&&u(n.active,function(e){e.cancel()})})}}function A(e,t){if(l(e,v))b.disabled||(b.running=!1,b.structural=!1);else if(t){var n=e.data(h)||{},r=t===!0;!r&&n.active&&n.active[t]&&(n.totalActive--,delete n.active[t]),(r||!n.totalActive)&&(e.removeClass(g),e.removeData(h))}}function P(e,n){if(b.disabled)return!0;if(l(e,v))return b.running;var r,i,o;do{if(0===n.length)break;var a=l(n,v),s=a?b:n.data(h)||{};if(s.disabled)return!0;if(a&&(o=!0),r!==!1){var c=n.data(m);t.isDefined(c)&&(r=c)}i=i||s.running||s.last&&!s.last.isClassBased}while(n=n.parent());return!o||!r&&i}v.data(h,b);var k=$.$watch(function(){return C.totalPendingRequests},function(e){0===e&&(k(),$.$$postDigest(function(){$.$$postDigest(function(){b.running=!1})}))}),L=0,I=i.classNameFilter(),R=I?function(e){return I.test(e)}:function(){return!0};return{enter:function(n,r,i){return n=t.element(n),r=a(r),i=a(i),x(n,!0),e.enter(n,r,i),w(function(e){return E("enter","ng-enter",s(n),r,i,c,e)})},leave:function(n){return n=t.element(n),M(n),x(n,!0),this.enabled(!1,n),w(function(t){return E("leave","ng-leave",s(n),null,null,function(){e.leave(n)},t)})},move:function(n,r,i){return n=t.element(n),r=a(r),i=a(i),M(n),x(n,!0),e.move(n,r,i),w(function(e){return E("move","ng-move",s(n),r,i,c,e)})},addClass:function(e,t){return this.setClass(e,t,[])},removeClass:function(e,t){return this.setClass(e,[],t)},setClass:function(n,r,i){var o="$$animateClasses";if(n=t.element(n),n=s(n),x(n))return e.setClass(n,r,i);r=d(r)?r:r.split(" "),i=d(i)?i:i.split(" ");var a=n.data(o);return a?(a.add=a.add.concat(r),a.remove=a.remove.concat(i),a.promise):(n.data(o,a={add:r,remove:i}),a.promise=w(function(t){var r=n.data(o);n.removeData(o);var i=n.data(h)||{},a=D(n,r,i.active);return a?E("setClass",a,n,null,null,function(){e.setClass(n,a[0],a[1])},t):t()}))},cancel:function(e){e.$$cancelFn()},enabled:function(e,t){switch(arguments.length){case 2:if(e)A(t);else{var n=t.data(h)||{};n.disabled=!0,t.data(h,n)}break;case 1:b.disabled=!e;break;default:e=!b.disabled}return!!e}}}]),i.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,i,a,s){function l(e,t){k&&k(),z.push(t),k=s(function(){u(z,function(e){e()}),z=[],k=null,j={}})}function p(e,n){var r=o(e);e=t.element(r),Q.push(e);var i=Date.now()+n;W>=i||(a.cancel(H),W=i,H=a(function(){h(Q),Q=[]},n,!1))}function h(e){u(e,function(e){var t=e.data(O);t&&u(t.closeAnimationFns,function(e){e()})})}function m(e,t){var n=t?j[t]:null;if(!n){var i=0,o=0,a=0,s=0;u(e,function(e){if(e.nodeType==f){var t=r.getComputedStyle(e)||{},n=t[T+L];i=Math.max(g(n),i);var l=t[T+R];o=Math.max(g(l),o);{t[M+R]}s=Math.max(g(t[M+R]),s);var c=g(t[M+L]);c>0&&(c*=parseInt(t[M+_],10)||1),a=Math.max(c,a)}}),n={total:0,transitionDelay:o,transitionDuration:i,animationDelay:s,animationDuration:a},t&&(j[t]=n)}return n}function g(e){var n=0,r=t.isString(e)?e.split(/\s*,\s*/):[];return u(r,function(e){n=Math.max(parseFloat(e)||0,n)}),n}function b(e){var t=e.parent(),n=t.data(B);return n||(t.data(B,++q),n=q),n+"-"+o(e).getAttribute("class")}function v(e,t,n){var r=["ng-enter","ng-leave","ng-move"].indexOf(n)>=0,i=b(t),a=i+" "+n,s=j[a]?++j[a].total:0,l={};if(s>0){var c=n+"-stagger",u=i+" "+c,p=!j[u];p&&t.addClass(c),l=m(t,u),p&&t.removeClass(c)}t.addClass(n);var d=t.data(O)||{},f=m(t,a),h=f.transitionDuration,g=f.animationDuration;if(r&&0===h&&0===g)return t.removeClass(n),!1;var v=r&&h>0,y=g>0&&l.animationDelay>0&&0===l.animationDuration,C=d.closeAnimationFns||[];t.data(O,{stagger:l,cacheKey:a,running:d.running||0,itemIndex:s,blockTransition:v,closeAnimationFns:C});var x=o(t);return v&&$(x,!0),y&&S(x,!0),!0}function y(e,t,n,r){function i(){t.off(_,s),t.removeClass(d),t.removeClass(f),I&&a.cancel(I),D(t,n);var e=o(t);for(var r in g)e.style.removeProperty(g[r])}function s(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||t.timeStamp||Date.now(),i=parseFloat(t.elapsedTime.toFixed(G));Math.max(n-R,0)>=k&&i>=T&&r()}var l=o(t),c=t.data(O);if(-1==l.getAttribute("class").indexOf(n)||!c)return void r();c.blockTransition&&$(l,!1);var d="",f="";u(n.split(" "),function(e,t){var n=(t>0?" ":"")+e;d+=n+"-active",f+=n+"-pending"});var h="",g=[],b=c.itemIndex,v=c.stagger,y=0;if(b>0){var C=0;v.transitionDelay>0&&0===v.transitionDuration&&(C=v.transitionDelay*b);var x=0;v.animationDelay>0&&0===v.animationDuration&&(x=v.animationDelay*b,g.push(P+"animation-play-state")),y=Math.round(100*Math.max(C,x))/100}y||t.addClass(d);var w=c.cacheKey+" "+d,N=m(t,w),T=Math.max(N.transitionDuration,N.animationDuration);if(0===T)return t.removeClass(d),D(t,n),void r();var M=Math.max(N.transitionDelay,N.animationDelay),k=M*U;if(g.length>0){var L=l.getAttribute("style")||"";";"!==L.charAt(L.length-1)&&(L+=";"),l.setAttribute("style",L+" "+h)}var I,R=Date.now(),_=A+" "+E,F=(M+T)*V,B=(y+F)*U;return y>0&&(t.addClass(f),I=a(function(){I=null,t.addClass(d),t.removeClass(f),N.animationDuration>0&&S(l,!1)},y*U,!1)),t.on(_,s),c.closeAnimationFns.push(function(){i(),r()}),c.running++,p(t,B),i}function $(e,t){e.style[T+I]=t?"none":""}function S(e,t){e.style[M+F]=t?"paused":""}function C(e,t,n,r){return v(e,t,n,r)?function(e){e&&D(t,n)}:void 0}function x(e,t,n,r){return t.data(O)?y(e,t,n,r):(D(t,n),void r())}function w(e,t,n,r){var i=C(e,t,n);if(!i)return void r();var o=i;return l(t,function(){o=x(e,t,n,r)}),function(e){(o||c)(e)}}function D(e,t){e.removeClass(t);var n=e.data(O);n&&(n.running&&n.running--,n.running&&0!==n.running||e.removeData(O))}function N(e,t){var n="";return e=d(e)?e:e.split(/\s+/),u(e,function(e,r){e&&e.length>0&&(n+=(r>0?" ":"")+e+t)}),n}var T,E,M,A,P="";e.ontransitionend===n&&e.onwebkittransitionend!==n?(P="-webkit-",T="WebkitTransition",E="webkitTransitionEnd transitionend"):(T="transition",E="transitionend"),e.onanimationend===n&&e.onwebkitanimationend!==n?(P="-webkit-",M="WebkitAnimation",A="webkitAnimationEnd animationend"):(M="animation",A="animationend");var k,L="Duration",I="Property",R="Delay",_="IterationCount",F="PlayState",B="$$ngAnimateKey",O="$$ngAnimateCSS3Data",G=3,V=1.5,U=1e3,j={},q=0,z=[],H=null,W=0,Q=[];return{enter:function(e,t){return w("enter",e,"ng-enter",t)},leave:function(e,t){return w("leave",e,"ng-leave",t)},move:function(e,t){return w("move",e,"ng-move",t)},beforeSetClass:function(e,t,n,r){var i=N(n,"-remove")+" "+N(t,"-add"),o=C("setClass",e,i);return o?(l(e,r),o):void r()},beforeAddClass:function(e,t,n){var r=C("addClass",e,N(t,"-add"));return r?(l(e,n),r):void n()},beforeRemoveClass:function(e,t,n){var r=C("removeClass",e,N(t,"-remove"));return r?(l(e,n),r):void n()},setClass:function(e,t,n,r){n=N(n,"-remove"),t=N(t,"-add");var i=n+" "+t;return x("setClass",e,i,r)},addClass:function(e,t,n){return x("addClass",e,N(t,"-add"),n)},removeClass:function(e,t,n){return x("removeClass",e,N(t,"-remove"),n)}}}])}])}(window,window.angular),angular.module("monospaced.elastic",[]).constant("msdElasticConfig",{append:""}).directive("msdElastic",["$timeout","$window","msdElasticConfig",function(e,t,n){"use strict";return{require:"ngModel",restrict:"A, C",link:function(r,i,o,a){function s(){f=u,$=getComputedStyle(u),angular.forEach(E,function(e){b+=e+":"+$.getPropertyValue(e)+";"}),y.setAttribute("style",b)}function l(){var t,n,i,o,a;f!==u&&s(),h||(h=!0,y.value=u.value+m,y.style.overflowY=u.style.overflowY,t=""===u.style.height?"auto":parseInt(u.style.height,10),n=getComputedStyle(u).getPropertyValue("width"),"px"===n.substr(n.length-2,2)&&(o=parseInt(n,10)-x.width,y.style.width=o+"px"),i=y.scrollHeight,i>T?(i=T,a="scroll"):N>i&&(i=N),i+=x.height,u.style.overflowY=a||"hidden",t!==i&&(u.style.height=i+"px",r.$emit("elastic:resize",p)),e(function(){h=!1},1))}function c(){h=!1,l()}var u=i[0],p=i;if("TEXTAREA"===u.nodeName&&t.getComputedStyle){p.css({overflow:"hidden","overflow-y":"hidden","word-wrap":"break-word"});var d=u.value;u.value="",u.value=d;var f,h,m=o.msdElastic?o.msdElastic.replace(/\\n/g,"\n"):n.append,g=angular.element(t),b="position: absolute; top: -999px; right: auto; bottom: auto;left: 0; overflow: hidden; -webkit-box-sizing: content-box;-moz-box-sizing: content-box; box-sizing: content-box;min-height: 0 !important; height: 0 !important; padding: 0;word-wrap: break-word; border: 0;",v=angular.element('\n\n\n\n");}]); +$templateCache.put("components/transUnit/trans-unit-status.html","
\n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
\n
\n"); +$templateCache.put("components/transUnit/trans-unit.html","
\n\n \n\n
\n \n\n
\n
\n Singular Form\n Plural Form\n
    \n
  • \n \n
  • \n
\n
\n
\n    
\n \n
\n\n
\n \n
\n
\n Singular Form\n Plural Form\n
\n \n
\n \n
\n\n
\n"); +$templateCache.put("components/transUnitFilter/trans-unit-filter.html","
    \n
  • \n
    \n \n \n
    \n
  • \n
  • \n
    \n \n \n
    \n
  • \n
  • \n
    \n \n \n
    \n
  • \n
  • \n
    \n \n \n
    \n
  • \n
  • \n
    \n \n \n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
\n"); +$templateCache.put("components/transUnit/source/footer.html","
\n
\n \n
\n
\n"); +$templateCache.put("components/transUnit/source/header.html","
\n

{{::editorContext.srcLocale.name}} {{::editorContext.srcLocale.localeId}}\n

\n
    \n
  • \n
  • \n
  • \n \n
  • \n
  • \n \n
  • \n
\n
\n"); +$templateCache.put("components/transUnit/translation/footer.html","
\n
\n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
\n
\n
\n \n Save as\n \n \n
\n
\n \n
\n
\n \n
\n
\n
    \n
  • \n \n
  • \n
\n
\n
\n
\n"); +$templateCache.put("components/transUnit/translation/header.html","
\n

{{transUnitCtrl.getLocaleName(editorContext.localeId)}} {{editorContext.localeId}}

\n
    \n
  • \n \n
  • \n
  • \n \n
  • \n
\n
\n");}]); \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/maps/app.js.map b/zanata-war/src/main/webapp/app/maps/app.js.map old mode 100755 new mode 100644 index 2528f6855b..04f2889fb7 --- a/zanata-war/src/main/webapp/app/maps/app.js.map +++ b/zanata-war/src/main/webapp/app/maps/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["app.js","AppConfig.js","AppConstants.js","AppCtrl.js","editor/EditorContentCtrl.js","editor/EditorCtrl.js","editor/EditorDetailsCtrl.js","editor/EditorService.js","editor/EditorShortcuts.js","editor/EditorSuggestionsCtrl.js","components/blur-on/blurOnDirective.js","components/clickElsewhere/clickElsewhereDirective.js","components/document/DocumentService.js","components/dropdown/DropdownController.js","components/dropdown/DropdownService.js","components/dropdown/dropdown.js","components/dropdown/dropdownDirective.js","components/event/EventService.js","components/icon/iconDirective.js","components/locale/LocaleService.js","components/logo-loader/logoLoaderDirective.js","components/message/MessageHandler.js","components/notification/NotificationService.js","components/phrases/PhraseCache.js","components/phrases/PhraseService.js","components/progressbar/progressbarDirective.js","components/project/ProjectService.js","components/scrollbar-width/ScrollbarWidthCtrl.js","components/scrollbar-width/scrollbarWidthDirective.js","components/toggle/toggleDirective.js","components/transStatus/TransStatusService.js","components/transUnit/TransUnitCtrl.js","components/transUnit/TransUnitService.js","components/transUnit/transUnitDirective.js","components/user/UserService.js","components/util/FilterUtil.js","components/util/StatisticUtil.js","components/util/StringUtil.js","components/util/UrlService.js"],"names":[],"mappings":"AAAA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;AAEJ;;ACnBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;;IAEA,kBAAkB,qBAAA;MAChB;QACE;UACE;UACA;UACA;QACF;QACA;UACE;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;UACE;YACE;UACF;YACE;cACE;UACJ;YACE;UACF;UACA;QACF;MACF;IACF,CAAC,CAAA;;IAED;;IAEA;IACA;;IAEA;MACE;QACE;QACA;QACA,aAAa,oBAAoB;QACjC;UACE,MAAM,eAAA;YACJ;UACF,CAAC;QACH;MACF;QACE;QACA;UACE;YACE;YACA,aAAa,kCAAkC;UACjD;UACA;YACE;YACA,aAAa,0CAA0C;UACzD;UACA;YACE;YACA,aAAa,kCAAkC;UACjD;QACF;MACF;QACE;QACA;MACF;;MAEA;QACE;UACE;YACE;cACE;cACA;cACA;cACA;YACF;YACA;cACE;gBACE;gBACA;kBACE;oBACE;oBACA;oBACA;kBACF;kBACA;oBACE;kBACF;gBACF;gBACA;kBACE;oBACE;oBACA;kBACF;kBACA;oBACE;kBACF;gBACF;cACF;YACF;UACF;QACF;;EAEN;EACA;EACA,CAAC;;;EAED;IACE;IACA;;AAEJ;;;;;ACzHA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;IACA;;AAEJ;;;;ACfA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;mBACiB;IACf;;IAEA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;;IAEF;IACA;MACE;MACA;MACA;QACE;QACA;YACI;gBACI;kBACE;gBACF;gBACA;kBACE;oBACE;oBACA;kBACF;oBACE;kBACF;gBACF;MACV;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;UACE;UACA;UACA;YACE;QACJ;UACE;QACF;IACJ;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;YACF;YACA;UACF;UACA;YACE;UACF;YACE;UACF;QACF;QACA;UACE;YACE;YACA;UACF;QACF;IACJ;EACF,CAAC;;;EAED;IACE;IACA,aAAa,OAAO;;AAExB;;;;;AC9GA;EACE;;EAEA;GACC;GACA;GACA;EACD;6BAC2B;6BACA;;IAEzB;IACA;QACI;QACA;QACA;UACE;QACF;;IAEJ;;IAEA;MACE;MACA;;IAEF;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;UACJ;;UAEA;YACE;;UAEF;MACJ;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,iBAAiB;AAClC;;ACjHA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;;IAEA;IACA;IACA;MACE;MACA;MACA;;IAEF;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;UACE;MACJ;;IAEF;MACE;MACA;QACE;QACA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;MACA;QACE;;QAEA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;cACI;UACJ;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;QACE;UACE;;QAEF;QACA;MACF;;IAEF;MACE;QACE;MACF;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;cACE;YACF;cACE;YACF;YACA;cACE;UACJ;UACA;YACE;UACF;IACN;;IAEA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,UAAU;AAC3B;;ACxMA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,iBAAiB;AAClC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;;IAEJ;;IAEA;IACA;;IAEA;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;MACF;;IAEF;2CACuC;MACrC;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;QACJ;UACE;UACA;UACA;QACF;;QAEA;;QAEA;QACA;UACE;UACA;UACA;UACA;QACF;UACE;UACA;UACA;YACE;YACA;YACA;YACA;UACF;UACA;QACF;MACF;;IAEF;IACA;MACE;;MAEA;;MAEA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;;UAEA;YACE;;UAEF;YACE;;UAEF;YACE;QACJ;QACA;UACE;YACE;UACF;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;ACnJA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;2BACyB;IACvB;MACE;MACA;;IAEF;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;;IAED;IACA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;QACF;MACF;QACE;QACA;UACE;UACA;YACE;QACJ;UACE;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;YACA;UACF;QACF;QACA;QACA;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;MACJ;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;QACE;;MAEF;;MAEA;QACE;;MAEF;QACE;;MAEF;QACE;QACA;;MAEF;MACA;QACE;;MAEF;QACE;QACA;QACA;;MAEF;QACE;;IAEJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;IACA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;UACE;MACJ;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;YACE;UACF;MACJ;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;UACE;UACA;UACA;YACE;cACE;cACA;cACA;cACA;YACF;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;;ACxSA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,qBAAqB;AACtC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;UACE;cACI;YACF;UACF;QACF;IACJ;EACF;;EAEA;IACE;IACA,YAAY,MAAM;;AAEtB;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;QACE;UACE;YACE;UACF;QACF;;QAEA;;QAEA;UACE;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,cAAc;;AAE9B;;AClCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;2BACyB;IACvB;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;UACE;UACA;YACE;cACE;cACA;gBACE;gBACA;gBACA;gBACA;cACF;cACA;YACF;UACF;UACA;YACE;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;SACG;MACH;IACF;;IAEA;+CAC2C;MACzC;MACA;QACE;UACE;;QAEF;UACE;YACE;YACA;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;IACA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;QACE;;MAEF;MACA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;ACrJA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;QACA;QACA;QACA;QACA;UACE;;IAEN;MACE;;MAEA;QACE;QACA;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;;MAEF;QACE;QACA;QACA;QACA;UACE;QACF;QACA;MACF;QACE;MACF;;MAEA;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;EACF,CAAC;;;EAED;IACE;IACA,aAAa,YAAY;;AAE7B;;ACpGA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;;IAEJ;MACE;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;QACE;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;;AAE7B;;;AC/DA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;IACA;;AAEJ;;AClBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA,aAAa,YAAY;MACzB;QACE;MACF;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA;MACA;QACE;UACE;QACF;;QAEA;;QAEA;UACE;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,QAAQ;IACpB,YAAY,eAAe;IAC3B,YAAY,cAAc;;AAE9B;;;AC1FA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;OACC;OACA;OACA;OACA;MACD;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;;MAEA;;MAEA;;MAEA;;MAEA;OACC;OACA;MACD;MACA;MACA;;MAEA;OACC;OACA;OACA;MACD;;IAEF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,YAAY;AAC1B;;ACnIA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;MACA;QACE;YACI;;QAEJ;;QAEA;UACE;QACF;;QAEA;QACA;UACE;YACE;YACA;UACF;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,IAAI;;AAEpB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;IAEE;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;MAEE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;IACF;;IAEA;IACA;MACE;QACE;UACE;UACA;QACF;MACF;MACA;QACE;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;AAC3B;;ACjGA;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;QACA;MACF;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA,YAAY,UAAU;;AAE1B;;AC9CA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,UAAU,cAAc;;AAE5B;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;EAEA;;EAEA;IACE;IACA,UAAU,mBAAmB;;AAEjC;;ACjBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;uBACqB;IACnB;MACE;MACA;;IAEF;MACE;QACE;QACA;UACE;QACF;UACE;UACA;cACI;gBACE;gBACA;kBACE;kBACA;kBACA;kBACA;gBACF;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;YACA;UACF;QACF;MACF;;IAEF;MACE;QACE;QACA;MACF;QACE;UACE;YACE;UACF;YACE;UACF;QACF;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;UACE;YACE;QACJ;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;QAEE;UACE;;QAEF;UACE;QACF;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;QACF;QACA;QACA;QACA;QACA;MACF;;IAEF;MACE;QACE;IACJ;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,WAAW;;AAEzB;;ACpKA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;GACA;EACD;yBACuB;IACrB;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;QACE;UACE;UACA;QACF;IACJ;;IAEA;KACC;KACA;IACD;6CACyC;;MAEvC;;MAEA;QACE;;MAEF;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;QACA;QACA;QACA;UACE;MACJ;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;cACI;;UAEJ;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;UACF;MACJ;IACF;;IAEA;IACA;MACE;;MAEA;QACE;;MAEF;MACA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;YACE;UACF;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;UACA;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;YACA;;UAEF;YACE;UACF;;UAEA;YACE;cACE;YACF;cACE;YACF;UACF;UACA;QACF;IACJ;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;ACnOA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;MACF;MACA;MACA,YAAY,WAAA;QACV;SACC;SACA;SACA;QACD;UACE;YACE;UACF;QACF;MACF,CAAC;IACH;EACF;;EAEA;IACE;QACI;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;IAEJ;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA,YAAY,WAAW;;AAE3B;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;;IAEE;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;YACE;YACA;cACE;YACF;UACF;QACF;;MAEF;MACA;IACF;;IAEA;MACE;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,cAAc;AAC5B;;ACtCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;UACI;UACA;;MAEJ;IACF;;EAEF;;EAEA;IACE;IACA,aAAa,kBAAkB;;AAEnC;;AC5BA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA,aAAa,wCAAwC;MACrD;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;IAC1B,YAAY,qBAAqB;IACjC,YAAY,uBAAuB;IACnC,YAAY,mBAAmB;;AAEnC;;ACrFA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;;AAE9B;;ACtBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;EACD;IACE;QACI;UACE;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;;IAEJ;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,kBAAkB;AAChC;;;ACjHA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;;IAEA;;IAEA;MACE;;IAEF;MACE;IACF;;IAEA;MACE;UACI;IACN;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;UACE;YACE;YACA;MACN;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;QACE;UACE;UACA;UACA;QACF;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;UACE;UACA;QACF;IACJ;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;QACN;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,aAAa;AAC9B;;;ACxIA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;MACF;;IAEF;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;QACA;UACE;QACF;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;UACE;;UAEA;YACE;YACA;cACE;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;gBACF;YACJ;YACA;UACF;;UAEA;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;cACE;cACA;YACF;UACF;QACF;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;;QAEA;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;OACG;;IAEH;KACC;KACA;KACA;IACD;OACG;;IAEH;MACE;MACA;MACA;IACF;OACG;;IAEH;IACA;;IAEA;IACA;;IAEA;IACA;MACE;;IAEF;MACE;MACA;MACA;IACF;OACG;;IAEH;MACE;MACA;QACE;MACF;QACE;IACJ;;IAEA;OACG;OACA;IACH;;IAEA;MACE;MACA;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;UACE;QACF;UACE;YACE;QACJ;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;UACE;YACE;YACA;YACA;YACA;UACF;MACJ;MACA;IACF;;IAEA;MACE;QACE;UACE;YACE;cACE;gBACE;gBACA;gBACA;cACF;UACJ;YACE;YACA;UACF;QACF;;IAEJ;;IAEA;MACE;QACE;UACE;YACE;cACE;gBACE;gBACA;gBACA;cACF;UACJ;YACE;YACA;UACF;QACF;IACJ;;IAEA;MACE;QACE;UACE;YACE;cACE;gBACE;gBACA;gBACA;cACF;UACJ;YACE;YACA;UACF;QACF;IACJ;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,gBAAgB;AAC9B;;;;ACjTA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA,aAAa,8BAA8B;MAC3C;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,SAAS;;AAEzB;;AC7BA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;MACE;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,WAAW;AACzB;;AC5CA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;;IAGA;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,UAAU;AACxB;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;MACF;MACA;QACE;MACF;IACF;EACF;EACA;IACE;IACA,UAAU,aAAa;AAC3B;;ACxBA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;IACE;IACA,UAAU,UAAU;AACxB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;IACJ;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;;IAEJ;;IAEA;MACE;QACE;MACF;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;UACF;YACE;gBACI;;YAEJ;YACA;cACE;YACF;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;YACE;cACE;UACJ;;UAEA;YACE;QACJ;MACF;IACF;;IAEA;KACC;KACA;IACD;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;IACD;MACE;QACE;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,UAAU;AACxB","file":"app.js","sourcesContent":["(function() {\n 'use strict';\n\n /**\n * Root application\n * app.js\n */\n angular.module(\n 'app', [\n 'ngResource',\n 'ngAnimate',\n 'ui.router',\n 'templates',\n 'cfp.hotkeys',\n 'focusOn',\n 'monospaced.elastic',\n 'gettext'\n ]);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name AppConfig\n * @description Main config for the entire app\n * @ngInject\n */\n function AppConfig($stateProvider, $urlRouterProvider, $httpProvider,\n hotkeysProvider) {\n\n var interceptor = function($q, $rootScope) {\n return {\n request: function(config) {\n // See EventService.LOADING_INITIATED\n $rootScope.$broadcast('loadingInitiated');\n return config;\n },\n requestError: function(rejection) {\n console.log('Request error due to ', rejection);\n return $q.reject(rejection);\n },\n response: function(response) {\n // See EventService.LOADING_COMPLETE\n $rootScope.$broadcast('loadingComplete');\n return response || $q.when(response);\n },\n responseError: function(rejection) {\n if (rejection.status === 401) {\n console.error('Unauthorized access. Please login');\n } else if (rejection.status === 404) {\n console.error('Service end point not found- ',\n rejection.config.url);\n } else {\n console.error('Error in response ', rejection);\n }\n return $q.reject(rejection);\n }\n };\n };\n\n $httpProvider.interceptors.push(interceptor);\n\n // For any unmatched url, redirect to /editor\n $urlRouterProvider.otherwise('/');\n\n $stateProvider\n .state('editor', {\n url: '/:projectSlug/:versionSlug/translate',\n templateUrl: 'editor/editor.html',\n controller: 'EditorCtrl as editor',\n resolve: {\n url : function(UrlService) {\n return UrlService.init();\n }\n }\n }).state('editor.selectedContext', {\n url: '/:docId/:localeId',\n views: {\n 'editor-content': {\n templateUrl: 'editor/editor-content.html',\n controller: 'EditorContentCtrl as editorContent'\n },\n 'editor-suggestions': {\n templateUrl: 'editor/editor-suggestions.html',\n controller: 'EditorSuggestionsCtrl as editorSuggestions'\n },\n 'editor-details': {\n templateUrl: 'editor/editor-details.html',\n controller: 'EditorDetailsCtrl as editorDetails'\n }\n }\n }).state('editor.selectedContext.tu', {\n url: '/?id&selected?states',\n reloadOnSearch: false\n });\n\n hotkeysProvider.template = '' +\n '
' +\n '
' +\n '
' +\n '

Keyboard Shortcuts

' +\n '' +\n '
' +\n '
' +\n '
    ' +\n '
  • ' +\n '
    ' +\n '{{ key }}' +\n '
    ' +\n '
    ' +\n '{{ hotkey.description }}
    ' +\n '
  • ' +\n '
  • ' +\n '
    ' +\n 'Tab + U' +\n '
    ' +\n '
    Save and go to next untranslated string' +\n '
    ' +\n '
  • ' +\n '
' +\n '
' +\n '
' +\n '
';\n\n // $locationProvider.html5Mode(true);\n // .hashPrefix('!');\n }\n\n angular\n .module('app')\n .config(AppConfig);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * AddConstants\n * \"Global\" app variables. Don't worry David, they're not really global.\n */\n angular\n .module('app')\n .constant('_', window._)\n .constant('str', window._.string)\n .constant('Mousetrap', window.Mousetrap)\n // Toggle to hide/show features that are ready for production\n .constant('PRODUCTION', true);\n\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name AppCtrl\n * @description Main controler for the entire app\n * @ngInject\n */\n function AppCtrl($scope, UserService, UrlService, LocaleService,\n MessageHandler, gettextCatalog, StringUtil, PRODUCTION) {\n var appCtrl = this;\n\n // See AppConstants.js\n appCtrl.PRODUCTION = PRODUCTION;\n appCtrl.settings = UserService.settings;\n appCtrl.uiLocaleList = [ LocaleService.DEFAULT_LOCALE ];\n appCtrl.loading = true;\n\n $scope.$on('$stateChangeStart', function(event, toState) {\n appCtrl.loading = true;\n if (toState.resolve) {\n // TODO: Move to here\n }\n });\n\n $scope.$on('$stateChangeSuccess', function(event, toState) {\n appCtrl.loading = false;\n if (toState.resolve) {\n // TODO: Move to here\n }\n });\n\n UrlService.init().then(loadLocales).\n then(loadUserInformation).\n then(loadUILocale);\n\n // On UI locale changes listener\n appCtrl.onChangeUILocale = function(locale) {\n appCtrl.myInfo.locale = locale;\n var uiLocaleId = appCtrl.myInfo.locale.localeId;\n if (!StringUtil.startsWith(uiLocaleId,\n LocaleService.DEFAULT_LOCALE.localeId, true)) {\n gettextCatalog.loadRemote(UrlService.uiTranslationURL(uiLocaleId))\n .then(\n function() {\n gettextCatalog.setCurrentLanguage(uiLocaleId);\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n } else {\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE.localeId);\n }\n };\n\n appCtrl.dashboardPage = function() {\n return UrlService.DASHBOARD_PAGE;\n };\n\n function loadLocales() {\n return LocaleService.getAllLocales();\n }\n\n function loadUserInformation() {\n return UserService.getMyInfo().then(\n function(myInfo) {\n appCtrl.myInfo = myInfo;\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n appCtrl.myInfo.gravatarUrl = UrlService.gravatarUrl(\n appCtrl.myInfo.gravatarHash, 72);\n }, function(error) {\n MessageHandler.displayError('Error loading my info: ' + error);\n });\n }\n\n function loadUILocale() {\n LocaleService.getUILocaleList().then(\n function(translationList) {\n for ( var i in translationList.locales) {\n var language = {\n 'localeId' : translationList.locales[i],\n 'name' : ''\n };\n appCtrl.uiLocaleList.push(language);\n }\n appCtrl.myInfo.locale = LocaleService.getLocaleByLocaleId(\n appCtrl.uiLocaleList, LocaleService.DEFAULT_LOCALE.localeId);\n if (!appCtrl.myInfo.locale) {\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n }\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n }\n }\n\n angular\n .module('app')\n .controller('AppCtrl', AppCtrl);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * EditorContentCtrl.js\n * @ngInject\n */\n function EditorContentCtrl($rootScope, EditorService, PhraseService,\n DocumentService, UrlService, EventService,\n $stateParams) {\n\n //TODO: move pager to directives/convert to infinite scroll\n var COUNT_PER_PAGE = 50,\n editorContentCtrl = this,\n states = UrlService.readValue('states'),\n filter = {\n 'states': states ? states.split(' ') : states\n };\n\n editorContentCtrl.phrases = [];\n\n EditorService.updateContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n $stateParams.localeId);\n\n init();\n\n $rootScope.$on(EventService.EVENT.GOTO_FIRST_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex = 0;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_PREV_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex -= 1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex +=1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_LAST_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex = EditorService.maxPageIndex;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n function changePage(pageIndex) {\n loadPhrase(pageIndex);\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT);\n }\n\n /**\n * Load transUnit\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function init() {\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: EditorService.context.projectSlug,\n versionSlug: EditorService.context.versionSlug,\n docId: EditorService.context.docId,\n localeId: EditorService.context.localeId\n }\n );\n\n PhraseService.getPhraseCount(EditorService.context, filter).\n then(function(count) {\n EditorService.maxPageIndex = parseInt(count / COUNT_PER_PAGE);\n if(count > COUNT_PER_PAGE) {\n EditorService.maxPageIndex = count % COUNT_PER_PAGE !== 0 ?\n EditorService.maxPageIndex +=1 : EditorService.maxPageIndex;\n }\n\n EditorService.maxPageIndex = EditorService.maxPageIndex -1 < 0 ? 0 :\n EditorService.maxPageIndex -1;\n\n loadPhrase(EditorService.currentPageIndex);\n });\n }\n\n function loadPhrase(pageIndex) {\n var startIndex = pageIndex * COUNT_PER_PAGE;\n PhraseService.fetchAllPhrase(EditorService.context, filter,\n startIndex, COUNT_PER_PAGE).then(displayPhrases);\n }\n\n function displayPhrases(phrases) {\n editorContentCtrl.phrases = phrases;\n }\n\n return editorContentCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorContentCtrl', EditorContentCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorCtrl.js\n * @ngInject\n */\n function EditorCtrl(UserService, DocumentService, LocaleService,\n ProjectService, EditorService, TransStatusService,\n StatisticUtil, UrlService, $stateParams, $state, MessageHandler, $rootScope,\n EventService, EditorShortcuts, hotkeys) {\n var editorCtrl = this;\n editorCtrl.pageNumber = 1;\n\n //TODO: cross domain rest\n //TODO: Unit test\n\n //Working URL: http://localhost:8000/#/tiny-project/1/translate or\n // http://localhost:8000/#/tiny-project/1/translate/hello.txt/fr\n editorCtrl.context = EditorService.initContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n LocaleService.DEFAULT_LOCALE, LocaleService.DEFAULT_LOCALE.localeId,\n 'READ_WRITE');\n\n editorCtrl.toggleKeyboardShortcutsModal = function() {\n hotkeys.toggleCheatSheet();\n };\n\n editorCtrl.versionPage = function() {\n return UrlService.PROJECT_PAGE(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug);\n };\n\n editorCtrl.encodeDocId = function(docId) {\n return DocumentService.encodeDocId(docId);\n };\n\n ProjectService.getProjectInfo($stateParams.projectSlug).then(\n function(projectInfo) {\n editorCtrl.projectInfo = projectInfo;\n },\n function(error) {\n MessageHandler.displayError('Error getting project ' +\n 'information:' + error);\n });\n\n LocaleService.getSupportedLocales(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(locales) {\n editorCtrl.locales = locales;\n if (!editorCtrl.locales || editorCtrl.locales.length <= 0) {\n //redirect if no supported locale in version\n MessageHandler.displayError('No supported locales in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if localeId is not defined in url, set to first from list\n var selectedLocaleId = $state.params.localeId;\n var context = editorCtrl.context;\n\n if (!selectedLocaleId) {\n context.localeId = editorCtrl.locales[0].localeId;\n transitionToEditorSelectedView();\n } else {\n context.localeId = selectedLocaleId;\n if (!LocaleService.containsLocale(editorCtrl.locales,\n selectedLocaleId)) {\n context.localeId = editorCtrl.locales[0].localeId;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting locale list: ' + error);\n });\n\n DocumentService.findAll(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(documents) {\n editorCtrl.documents = documents;\n\n if (!editorCtrl.documents || editorCtrl.documents.length <= 0) {\n //redirect if no documents in version\n MessageHandler.displayError('No documents in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if docId is not defined in url, set to first from list\n var selectedDocId = $state.params.docId,\n context = editorCtrl.context;\n if (!selectedDocId) {\n context.docId = editorCtrl.documents[0].name;\n transitionToEditorSelectedView();\n } else {\n context.docId = DocumentService.decodeDocId(selectedDocId);\n if (!DocumentService.containsDoc(editorCtrl.documents,\n context.docId)) {\n context.docId = editorCtrl.documents[0].name;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting document list: ' + error);\n });\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorCtrl.unitSelected = data.id;\n editorCtrl.focused = data.focus;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n editorCtrl.unitSelected = false;\n editorCtrl.focused = false;\n });\n\n $rootScope.$on(EventService.EVENT.REFRESH_STATISTIC,\n function (event, data) {\n loadStatistic(data.projectSlug, data.versionSlug, data.docId,\n data.localeId);\n\n editorCtrl.context.docId = data.docId;\n editorCtrl.context.localeId = data.localeId;\n });\n\n editorCtrl.pageNumber = function() {\n if(EditorService.maxPageIndex === 0) {\n return EditorService.currentPageIndex + 1;\n } else {\n return (EditorService.currentPageIndex + 1) + ' of ' +\n (EditorService.maxPageIndex + 1);\n }\n };\n\n editorCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n editorCtrl.firstPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_FIRST_PAGE);\n };\n\n editorCtrl.lastPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_LAST_PAGE);\n };\n\n\n editorCtrl.nextPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_PAGE);\n };\n\n editorCtrl.previousPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_PREV_PAGE);\n };\n\n function transitionToEditorSelectedView() {\n if (isDocumentAndLocaleSelected()) {\n $state.go('editor.selectedContext', {\n 'docId': editorCtrl.context.docId,\n 'localeId': editorCtrl.context.localeId\n });\n }\n }\n\n function isDocumentAndLocaleSelected() {\n return editorCtrl.context.docId && editorCtrl.context.localeId;\n }\n\n /**\n * Load document statistics (word and message)\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function loadStatistic(projectSlug, versionSlug, docId, localeId) {\n DocumentService.getStatistics(projectSlug, versionSlug, docId, localeId)\n .then(function(statistics) {\n editorCtrl.wordStatistic = StatisticUtil\n .getWordStatistic(statistics);\n editorCtrl.messageStatistic = StatisticUtil\n .getMsgStatistic(statistics);\n // Make needReview(server) available to needswork\n editorCtrl.messageStatistic[TransStatusService.getId('needswork')] =\n editorCtrl.messageStatistic.needReview || 0;\n },\n function(error) {\n MessageHandler.displayError('Error loading statistic: ' + error);\n });\n }\n\n this.settings = UserService.settings.editor;\n\n EditorShortcuts.enableEditorKeys();\n }\n\n angular\n .module('app')\n .controller('EditorCtrl', EditorCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorDetailsCtrl.js\n * @ngInject\n */\n function EditorDetailsCtrl() {\n var editorDetailsCtrl = this;\n\n return editorDetailsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorDetailsCtrl', EditorDetailsCtrl);\n})();\n","(function () {\n 'use strict';\n\n /**\n * EditorService.js\n * //TODO: parse editorContext in functions\n * @ngInject\n */\n function EditorService($rootScope, $resource, _, UrlService,\n EventService, PhraseService, DocumentService, MessageHandler,\n TransStatusService, TransUnitService) {\n var editorService = this,\n queue = {};\n\n editorService.context = {};\n\n editorService.currentPageIndex = 0;\n editorService.maxPageIndex = 0;\n\n editorService.initContext =\n function (projectSlug, versionSlug, docId, srcLocale, localeId, mode) {\n editorService.context = {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n srcLocale: srcLocale,\n localeId: localeId,\n mode: mode // READ_WRITE, READ_ONLY, REVIEW\n };\n return editorService.context;\n };\n\n editorService.updateContext = function(projectSlug, versionSlug, docId,\n localeId) {\n if(editorService.context.projectSlug !== projectSlug) {\n editorService.context.projectSlug = projectSlug;\n }\n if(editorService.context.versionSlug !== versionSlug) {\n editorService.context.versionSlug = versionSlug;\n }\n if(editorService.context.docId !== docId) {\n editorService.context.docId = docId;\n }\n if(editorService.context.localeId !== localeId) {\n editorService.context.localeId = localeId;\n }\n };\n\n /**\n * EventService.EVENT.SAVE_TRANSLATION listener\n * Perform save translation with given status\n *\n * - queue save translation request (1 global queue, 1 for each TU)\n * - if queue contains request id, replace old request with new request\n */\n $rootScope.$on(EventService.EVENT.SAVE_TRANSLATION,\n function (event, data) {\n var phrase = data.phrase,\n status = data.status;\n if (phrase.translation === phrase.newTranslation &&\n status === phrase.status) {\n // nothing has changed\n return;\n }\n\n EventService.emitEvent(EventService.EVENT.SAVE_INITIATED, data);\n\n //update pending queue if contains\n if(_.has(queue, phrase.id)) {\n var pendingRequest = queue[phrase.id];\n pendingRequest.phrase = phrase;\n pendingRequest.status = status;\n processSaveRequest(phrase.id);\n } else if(TransUnitService.isTranslationModified(phrase) ||\n phrase.status !== status) {\n status = resolveTranslationState(phrase, status);\n queue[phrase.id] = {\n 'phrase': phrase,\n 'status' : status,\n 'locale': data.locale,\n 'docId' : data.docId\n };\n processSaveRequest(phrase.id);\n }\n });\n\n // Process save translation request\n function processSaveRequest(id) {\n var context = _.cloneDeep(editorService.context);\n\n var request = queue[id];\n\n var Translation = $resource(UrlService.TRANSLATION_URL, {}, {\n update: {\n method: 'PUT',\n params: {\n localeId: request.locale\n }\n }\n });\n var data = {\n id: request.phrase.id,\n revision: request.phrase.revision ? request.phrase.revision : 0,\n content: request.phrase.newTranslation,\n contents: request.phrase.newTranslations,\n // Return status object to PascalCase Id for the server\n status: TransStatusService.getServerId(request.status.ID),\n plural: request.phrase.plural\n };\n\n Translation.update(data).$promise.then(\n function(response) {\n var oldStatus = request.phrase.status;\n\n PhraseService.onTransUnitUpdated(context, data.id, request.locale,\n response.revision, response.status, request.phrase.newTranslation);\n\n DocumentService.updateStatistic(request.docId, request.locale,\n oldStatus, response.status, request.phrase.wordCount);\n\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n },\n function(response) {\n MessageHandler.displayWarning('Update translation failed for ' +\n data.id + ' -' + response);\n PhraseService.onTransUnitUpdateFailed(data.id);\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n });\n delete queue[id];\n }\n\n function resolveTranslationState(phrase, requestStatus) {\n if(phrase.newTranslation === '') {\n return TransStatusService.getStatusInfo('UNTRANSLATED');\n }\n return requestStatus;\n }\n\n return editorService;\n }\n\n angular\n .module('app')\n .factory('EditorService', EditorService);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * @name EditorShortcuts\n * @description service for editor keyboard shortcuts\n * @ngInject\n */\n function EditorShortcuts(EventService, $stateParams, _, hotkeys,\n TransStatusService, Mousetrap, str) {\n var editorShortcuts = this,\n tabCombinationPressed = false,\n inSaveAsMode = false;\n\n // this will be set by TransUnitService\n // on EVENT.SELECT_TRANS_UNIT and unset on EVENT.CANCEL_EDIT\n editorShortcuts.selectedTUCtrl = null;\n\n function copySourceCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n editorShortcuts.selectedTUCtrl.getPhrase());\n }\n }\n\n /**\n * browser by default intercepts keydown on tab and move focus out of\n * textarea. We can't use hotkeys to do this as it won't allow us register\n * same key twice. Mousetrap is used as it's the underlying library hotkeys\n * uses.\n */\n\n // TODO: Unbind tab when transunit is deselected\n Mousetrap.bind('tab', function() {\n event.preventDefault();\n tabCombinationPressed = false;\n }, 'keydown');\n\n function gotoNextRowCallback(event) {\n // If they didn't use the tab key\n // Or if the tab key wasn't used in a combination\n // Go to the next row\n var tabKeyCode = 9;\n if ((event.which !== tabKeyCode || !tabCombinationPressed) &&\n editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_ROW,\n currentContext());\n }\n }\n\n function gotoPreviousRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_PREVIOUS_ROW,\n currentContext());\n }\n }\n\n function cancelEditCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (inSaveAsMode) {\n editorShortcuts.cancelSaveAsModeIfOn();\n if (editorShortcuts.selectedTUCtrl) {\n editorShortcuts.selectedTUCtrl.focusTranslation();\n }\n } else if (editorShortcuts.selectedTUCtrl) {\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase.newTranslation !== phrase.translation) {\n // if it has changed translation, undo edit\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase);\n } else {\n // otherwise cancel edit\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase);\n }\n }\n }\n\n function saveAsCurrentStatusCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': phrase.status,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n /**\n * This is to mimic sequence shortcut.\n * e.g. press ctlr-shift-s then press 'n' to save as\n * 'needs work'.\n */\n function saveAsModeCallback(event) {\n editorShortcuts.cancelSaveAsModeIfOn();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': phrase.id,\n 'open': true\n });\n addSaveAsModeExtensionKey(phrase, 'n', 'needsWork');\n addSaveAsModeExtensionKey(phrase, 't', 'translated');\n addSaveAsModeExtensionKey(phrase, 'a', 'approved');\n inSaveAsMode = true;\n }\n }\n\n function gotoToNextUntranslatedCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (editorShortcuts.selectedTUCtrl) {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n currentContext());\n }\n // the shortcut is a tab + u combination\n // we don't want other tab event to trigger\n tabCombinationPressed = true;\n }\n\n /**\n * mod will be replaced by ctrl if on windows/linux or cmd if on mac.\n * By default it listens on keydown event.\n */\n editorShortcuts.SHORTCUTS = {\n COPY_SOURCE: new ShortcutInfo(\n 'alt+c', copySourceCallback, 'Copy source as translation', 'alt+g'),\n\n CANCEL_EDIT: new ShortcutInfo('esc', cancelEditCallback, 'Cancel edit'),\n\n SAVE_AS_CURRENT_STATUS: new ShortcutInfo(\n 'mod+s', saveAsCurrentStatusCallback, 'Save'),\n\n SAVE_AS_MODE: new ShortcutInfo(\n 'mod+shift+s', saveAsModeCallback, 'Save as…'),\n\n GOTO_NEXT_ROW: new ShortcutInfo(\n 'tab', gotoNextRowCallback, 'Save and go to next string',\n [], 'keyup'),\n\n // Keep other shortcuts using keydown to be quicker\n GOTO_NEXT_ROW_FAST: new ShortcutInfo(\n 'mod+enter', gotoNextRowCallback, '', ['alt+k', 'alt+down']),\n\n GOTO_PREVIOUS_ROW: new ShortcutInfo(\n 'shift+tab', gotoPreviousRowCallback,\n 'Save and go to previous string', ['mod+shift+enter', 'alt+j',\n 'alt+up']),\n\n GOTO_NEXT_UNTRANSLATED: new ShortcutInfo(\n 'tab+u', gotoToNextUntranslatedCallback)\n\n };\n\n /**\n *\n * @param {string} defaultKey default key combo for a shortcut\n * @param {function} callback callback to execute\n * @param {string} [description]\n * optional. If not empty will apply to default key (shows in cheatsheet)\n * @param {(string|string[])} [otherKeys]\n * optional other keys that will do the same (won't show in cheatsheet)\n * @param {string} [action] optional event to listen to. e.g. 'keyup'\n * @returns {EditorShortcuts.ShortcutInfo}\n * @constructor\n */\n function ShortcutInfo(defaultKey, callback, description, otherKeys, action)\n {\n this.defaultKey = defaultKey;\n this.keyCombos = [\n singleKeyConfig(defaultKey, description, action, callback)\n ];\n if (otherKeys) {\n this.otherKeys = otherKeys instanceof Array ? otherKeys : [otherKeys];\n this.keyCombos.push(\n singleKeyConfig(this.otherKeys, '', action, callback));\n }\n return this;\n }\n\n function singleKeyConfig(combo, description, action, callback) {\n var keyConfig = {\n allowIn: ['TEXTAREA'],\n callback: callback\n };\n keyConfig.combo = combo;\n if (description) {\n keyConfig.description = description;\n }\n if (action) {\n keyConfig.action = action;\n }\n return keyConfig;\n }\n\n editorShortcuts.enableEditorKeys = function () {\n // here we only check copy source shortcut since we always enable keys in\n // bundle.\n if (!hotkeys.get(editorShortcuts.SHORTCUTS.COPY_SOURCE.defaultKey)) {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n enableShortcut(value);\n });\n }\n };\n\n editorShortcuts.disableEditorKeys = function () {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n _.forEach(value.keyCombos, function(hotkey) {\n editorShortcuts.deleteKeys(hotkey.combo, hotkey.action);\n });\n });\n };\n\n function enableShortcut(shortcutInfo) {\n if (!hotkeys.get(shortcutInfo.defaultKey)) {\n _.forEach(shortcutInfo.keyCombos,\n function(combo) {\n hotkeys.add(combo);\n });\n }\n }\n\n function currentContext() {\n return {\n 'currentId': editorShortcuts.selectedTUCtrl.getPhrase().id\n };\n }\n\n function addSaveAsModeExtensionKey(phrase, combo, status) {\n var statusInfo = TransStatusService.getStatusInfo(status);\n return hotkeys.add({\n combo: combo,\n description: str.sprintf('Save as %s', status),\n allowIn: ['INPUT', 'TEXTAREA'],\n action: 'keydown',\n callback: function (event) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': statusInfo,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n editorShortcuts.cancelSaveAsModeIfOn();\n }\n });\n }\n\n editorShortcuts.cancelSaveAsModeIfOn = function() {\n if (inSaveAsMode && editorShortcuts.selectedTUCtrl) {\n inSaveAsMode = false;\n editorShortcuts.deleteKeys(['n', 't', 'a']);\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': editorShortcuts.selectedTUCtrl.getPhrase().id,\n 'open': false\n });\n }\n };\n\n /**\n * This is a workaround for augular-hotkeys not being able to delete hotkey.\n * @see https://github.com/chieffancypants/angular-hotkeys/issues/100\n *\n * @param {(string|string[])} keys single key or array of keys to be deleted\n * @param {string} [action='keydown'] 'keyup' or 'keydown' etc.\n */\n editorShortcuts.deleteKeys = function(keys, action) {\n var keysToDelete = keys instanceof Array ? keys : [keys];\n action = action || 'keydown';\n _.forEach(keysToDelete, function(key) {\n hotkeys.del(key);\n Mousetrap.unbind(key, action);\n });\n };\n\n return editorShortcuts;\n }\n\n angular\n .module('app')\n .factory('EditorShortcuts', EditorShortcuts);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * EditorSuggestionsCtrl.js\n * @ngInject\n */\n function EditorSuggestionsCtrl() {\n var editorSuggestionsCtrl = this;\n\n return editorSuggestionsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorSuggestionsCtrl', EditorSuggestionsCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name blur-on\n * @description When you put attribute 'blur-on=\"something\"',\n * you can then blur this element. It works the same way as focus-on library.\n */\n function blurOn() {\n return {\n restrict: 'A',\n link: function(scope, elem, attr) {\n return scope.$on('blurOn', function (e, name) {\n if (name === attr.blurOn) {\n return elem[0].blur();\n }\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('blurOn', blurOn);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name clickElsewhere\n * @description Initiate expression when clicking somewhere else\n * @ngInject\n */\n function clickElsewhere($document) {\n return {\n restrict: 'A',\n scope: {\n callback: '&clickElsewhere'\n },\n link: function(scope, element) {\n var handler = function(e) {\n if (!element[0].contains(e.target)) {\n scope.$apply(scope.callback(e));\n }\n };\n\n $document.on('click', handler);\n\n scope.$on('$destroy', function() {\n $document.off('click', handler);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('clickElsewhere', clickElsewhere);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle server communication on document related\n * information in project-version.\n *\n * DocumentService.js\n * @ngInject\n */\n function DocumentService($q, $resource, UrlService, StringUtil,\n StatisticUtil, EventService, _) {\n var documentService = this,\n statisticMap = {};\n\n /**\n * Finds all documents in given project version\n *\n * @param _projectSlug\n * @param _versionSlug\n * @returns {$promise|*|N.$promise}\n */\n documentService.findAll = function findAll(_projectSlug, _versionSlug) {\n var Documents = $resource(UrlService.DOCUMENT_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug\n },\n isArray: true\n }\n });\n return Documents.query().$promise;\n };\n\n /**\n * Get statistic of document in locale (word and message)\n *\n * @param _projectSlug\n * @param _versionSlug\n * @param _docId\n * @param _localeId\n * @returns {*}\n */\n documentService.getStatistics = function (_projectSlug, _versionSlug,\n _docId, _localeId) {\n if (_docId && _localeId) {\n var key = generateStatisticKey(_docId, _localeId);\n if (_.has(statisticMap, key)) {\n return $q.when(statisticMap[key]);\n } else {\n var encodedDocId = documentService.encodeDocId(_docId);\n var Statistics = $resource(UrlService.DOC_STATISTIC_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug,\n docId: encodedDocId,\n localeId: _localeId\n },\n isArray: true\n }\n });\n return Statistics.query().$promise.then(function(statistics) {\n statisticMap[key] = statistics;\n return statisticMap[key];\n });\n }\n }\n };\n\n /**\n * Encode docId, replace '/' with ',' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.encodeDocId = function(docId) {\n return docId ? docId.replace(/\\//g, ',') : docId;\n };\n\n /**\n * Encode docId, replace ',' with '/' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.decodeDocId = function(docId) {\n return docId ? docId.replace(/\\,/g, '/') : docId;\n };\n\n documentService.containsDoc = function (documents, docId) {\n return _.any(documents, function(document) {\n return StringUtil.equals(document.name, docId, true);\n });\n };\n\n documentService.updateStatistic = function(docId, localeId, oldState,\n newState, wordCount) {\n var key = generateStatisticKey(docId, localeId);\n if(_.has(statisticMap, key)) {\n adjustStatistic(statisticMap[key], oldState, newState,\n wordCount);\n\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: 'tiny-project',\n versionSlug: '1',\n docId: docId,\n localeId: localeId\n }\n );\n }\n };\n\n //Generate unique key from docId and localeId for statistic cache\n function generateStatisticKey(docId, localeId) {\n return docId + '-' + localeId;\n }\n\n /**\n * Adjust statistic based on translation change of state\n * word - -wordCount of oldState, +wordCount of newState\n * msg - -1 of oldState, +1 of newState\n */\n function adjustStatistic(statistics, oldState, newState, wordCount) {\n var wordStatistic = StatisticUtil.getWordStatistic(statistics),\n msgStatistic = StatisticUtil.getMsgStatistic(statistics);\n\n wordCount = parseInt(wordCount);\n if(wordStatistic) {\n var wordOldState = parseInt(wordStatistic[oldState]) - wordCount;\n wordStatistic[oldState] = wordOldState < 0 ? 0 : wordOldState;\n wordStatistic[newState] = parseInt(wordStatistic[newState]) + wordCount;\n }\n\n if(msgStatistic) {\n var msgOldState = parseInt(msgStatistic[oldState]) - 1;\n msgStatistic[oldState] = msgOldState < 0 ? 0 : msgOldState;\n msgStatistic[newState] = parseInt(msgStatistic[newState]) + 1;\n }\n }\n\n return documentService;\n }\n\n angular\n .module('app')\n .factory('DocumentService', DocumentService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name DropdownCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function DropdownCtrl($scope, $attrs, $parse, dropdownConfig,\n DropdownService, $animate, $timeout) {\n var dropdownCtrl = this,\n // create a child scope so we are not polluting original one\n scope = $scope.$new(),\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ?\n $parse($attrs.onToggle) : angular.noop;\n\n this.init = function(element) {\n dropdownCtrl.$element = element;\n\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return dropdownCtrl.toggleElement;\n };\n\n scope.focusToggleElement = function() {\n if (dropdownCtrl.toggleElement) {\n dropdownCtrl.toggleElement[0].focus();\n }\n };\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n $animate[isOpen ? 'addClass' : 'removeClass']\n (dropdownCtrl.$element, openClass);\n\n if (isOpen) {\n // need to wrap it in a timeout\n // see http://stackoverflow.com/questions/12729122/\n // prevent-error-digest-already-in-progress-when-calling-scope-apply\n $timeout(function() {\n scope.focusToggleElement();\n });\n DropdownService.open(scope);\n } else {\n DropdownService.close(scope);\n }\n\n setIsOpen($scope, isOpen);\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, {\n open: !!isOpen\n });\n }\n });\n\n $scope.$on('$locationChangeSuccess', function() {\n scope.isOpen = false;\n });\n\n $scope.$on('$destroy', function() {\n scope.$destroy();\n });\n\n $scope.$on('openDropdown', function() {\n scope.isOpen = true;\n });\n\n $scope.$on('closeDropdown', function() {\n scope.isOpen = false;\n });\n }\n\n angular\n .module('app')\n .controller('DropdownCtrl', DropdownCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdownService\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n\n function DropdownService($document) {\n var openScope = null,\n dropdownService = this;\n\n dropdownService.open = function(dropdownScope) {\n if (!openScope) {\n $document.bind('click', closeDropdown);\n $document.bind('keydown', escapeKeyBind);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n };\n\n dropdownService.close = function(dropdownScope) {\n if (openScope === dropdownScope) {\n openScope = null;\n $document.unbind('click', closeDropdown);\n $document.unbind('keydown', escapeKeyBind);\n }\n };\n\n var closeDropdown = function(evt) {\n if (!openScope) {\n return;\n }\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.$apply(function() {\n openScope.isOpen = false;\n });\n };\n\n var escapeKeyBind = function(evt) {\n if (evt.which === 27) {\n openScope.focusToggleElement();\n closeDropdown();\n }\n };\n }\n\n angular\n .module('app')\n .service('DropdownService', DropdownService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name Dropdown\n *\n * @description\n * Custom module for dropdowns\n *\n */\n var dropdownConfig = {\n openClass: 'is-active'\n };\n\n angular\n .module('app')\n .constant('dropdownConfig', dropdownConfig);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdown\n *\n * @description\n * Main dropdown container\n *\n */\n\n function dropdown() {\n return {\n restrict: 'EA',\n controller: 'DropdownCtrl',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init(element);\n }\n };\n }\n\n function onCloseDropdown() {\n return {\n restrict: 'A',\n require: '?^dropdown',\n scope: {\n callback: '&onCloseDropdown'\n },\n link: function(scope, elem, attrs, dropdownCtrl) {\n dropdownCtrl.onCloseDropdown = scope.callback;\n }\n };\n }\n\n /**\n * @name dropdown-toggle\n *\n * @description\n * Main dropdown toggle\n *\n */\n\n function dropdownToggle() {\n return {\n restrict: 'EA',\n require: '?^dropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.bind('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n if (dropdownCtrl.onCloseDropdown && !isOpen) {\n scope.$applyAsync(dropdownCtrl.onCloseDropdown);\n }\n });\n\n scope.$on('$destroy', function() {\n element.unbind('click', toggleDropdown);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('dropdown', dropdown)\n .directive('onCloseDropdown', onCloseDropdown)\n .directive('dropdownToggle', dropdownToggle);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * EventService.js\n * Broadcast events service in app\n *\n * @ngInject\n */\n function EventService($rootScope) {\n var eventService = this;\n eventService.EVENT = {\n /**\n * Loading Events\n *\n * Broadcast from AppConfig\n */\n LOADING_INITIATED: 'loadingInitiated',\n LOADING_COMPLETE: 'loadingStarted',\n\n /**\n * scroll to trans unit\n * data: {id: number, updateURL: boolean, focus: boolean}\n * id: (transunit id),\n * updateURL: (flag on whether to update url with trans unit id)\n * focus: flag on whether to have row in view and focused\n */\n SELECT_TRANS_UNIT: 'selectTransUnit',\n\n //data: {phrase: Phrase}\n COPY_FROM_SOURCE: 'copyFromSource',\n\n //data: {phrase: Phrase}\n UNDO_EDIT: 'undoEdit',\n\n //data: {phrase: Phrase}\n CANCEL_EDIT: 'cancelEdit',\n\n //data:phrase\n FOCUS_TRANSLATION: 'focusTranslation',\n\n /**\n * data: {\n * phrase: Phrase, status: StatusInfo, locale: string, docId: string\n * }\n * phrase:\n * status: Object. Request save state\n * locale: target locale\n * docId: docId\n */\n SAVE_TRANSLATION: 'saveTranslation',\n\n /**\n * Translation save in this editor is being sent to the server and\n * is waiting on a response.\n */\n SAVE_INITIATED: 'saveInitiated',\n\n /**\n * Translation save in this editor has been completed\n * (Server has responded with a success or error).\n */\n SAVE_COMPLETED: 'saveCompleted',\n\n /**\n * The text in the translation editor textbox has been edited and\n * not yet saved.\n */\n TRANSLATION_TEXT_MODIFIED: 'translationTextModified',\n\n /**\n * refresh ui statistic - changes in doc or locale\n *\n * data: {projectSlug: string, versionSlug: string,\n * docId: string, localeId: string}\n */\n REFRESH_STATISTIC: 'refreshStatistic',\n\n GOTO_PREV_PAGE: 'gotoPreviousPage',\n\n GOTO_NEXT_PAGE: 'gotoNextPage',\n\n GOTO_FIRST_PAGE: 'gotoFirstPage',\n\n GOTO_LAST_PAGE: 'gotoLastPage',\n\n /**\n * data: { currentId: number }\n */\n GOTO_NEXT_ROW: 'gotoNextRow',\n GOTO_PREVIOUS_ROW: 'gotoPreviousRow',\n GOTO_NEXT_UNTRANSLATED: 'gotoNextUntranslated',\n\n /**\n * Toggle save as options dropdown.\n * data: {id: number, open: boolean}\n */\n TOGGLE_SAVE_OPTIONS: 'openSaveOptions'\n\n };\n\n /**\n * Firing an event downwards of scope\n *\n * @param event - eventService.EVENT type\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.broadcastEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$broadcast(event, data);\n };\n\n /**\n * Firing an event upwards of scope\n *\n * @param event - eventService.EVENT types\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.emitEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$emit(event, data);\n };\n\n return eventService;\n }\n\n angular\n .module('app')\n .factory('EventService', EventService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name icon\n * @description declarative svg icons\n * @ngInject\n */\n function icon($sce) {\n return {\n restrict: 'E',\n required: ['name'],\n scope: {\n name: '@',\n title: '@',\n size: '@'\n },\n // templateUrl: 'components/icon/icon.html',\n link: function(scope, element) {\n var svg = '',\n titleHtml = '';\n\n element.addClass('Icon');\n\n if (scope.title) {\n titleHtml = '' + scope.title + '';\n }\n\n // Stupid hack to make svg work\n svg = '' +\n '' +\n '' +\n titleHtml +\n '';\n element.html($sce.trustAsHtml(svg));\n }\n };\n }\n\n angular\n .module('app')\n .directive('icon', icon);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle locales related information.\n *\n * LocaleService.js\n * @ngInject\n */\n function LocaleService(UrlService, StringUtil, FilterUtil, $resource, _) {\n\n var locales = [];\n\n /**\n * Get project-version supported locales\n * @param projectSlug\n * @param versionSlug\n * @returns {$promise|*}\n */\n function getSupportedLocales(projectSlug, versionSlug) {\n\n var Locales = $resource(UrlService.LOCALE_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug\n },\n isArray: true\n }\n });\n\n return Locales.query().$promise;\n }\n\n //Returns all locales supported in Zanata instance\n function getAllLocales() {\n var Locales = $resource(UrlService.ALL_LOCALE_URL, {}, {\n query: {\n method: 'GET',\n isArray: true\n }\n });\n return Locales.query().$promise.then(function(results) {\n locales = FilterUtil.cleanResourceList(results);\n });\n }\n\n function getUILocaleList() {\n var list = $resource(UrlService.uiTranslationListURL, {}, {\n query: {\n method: 'GET'\n }\n });\n\n return list.query().$promise;\n }\n\n function getLocaleByLocaleId(locales, localeId) {\n if(locales) {\n return _.find(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n }\n\n function containsLocale (locales, localeId) {\n return _.any(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n\n function getName(localeId) {\n var locale = getLocaleByLocaleId(locales, localeId);\n if(locale) {\n return locale.name;\n }\n return localeId;\n }\n\n return {\n getSupportedLocales : getSupportedLocales,\n getUILocaleList : getUILocaleList,\n getLocaleByLocaleId : getLocaleByLocaleId,\n getAllLocales : getAllLocales,\n containsLocale : containsLocale,\n getName : getName,\n DEFAULT_LOCALE: {\n 'localeId' : 'en-US',\n 'name' : 'English'\n }\n };\n }\n\n angular\n .module('app')\n .factory('LocaleService', LocaleService);\n})();\n","(function() {\n\n 'use strict';\n\n /**\n * @name logoLoader\n *\n * @description\n * Logo that is activated on global loading state\n *\n * @ngInject\n */\n function logoLoader() {\n return {\n restrict: 'EA',\n scope: {\n loading: '=',\n inverted: '='\n },\n link: function(scope) {\n scope.classes = '';\n\n scope.$on('loadingInitiated', function() {\n scope.classes += ' is-loading';\n });\n\n scope.$on('loadingComplete', function() {\n scope.classes = scope.classes.replace('is-loading', '');\n });\n\n scope.$watch('inverted', function(newInverted) {\n if (newInverted) {\n scope.classes += ' LogoLoader--inverted';\n } else {\n scope.classes = scope.classes.replace('LogoLoader--inverted', '');\n }\n });\n },\n templateUrl: 'components/logo-loader/logo-loader.html'\n };\n }\n\n angular\n .module('app')\n .directive('logoLoader', logoLoader);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * MessageHandler.js\n * @ngInject\n */\n function MessageHandler() {\n return {\n displayError: function(msg) {\n console.error(msg);\n },\n displayWarning: function(msg) {\n console.warn(msg);\n },\n displayInfo: function(msg) {\n console.info(msg);\n }\n };\n }\n\n angular\n .module('app')\n .factory('MessageHandler', MessageHandler);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle notification in editor\n *\n * NotificationService.js\n * @ngInject\n */\n function NotificationService() {\n\n }\n\n angular\n .module('app')\n .factory('NotificationService', NotificationService);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * PhraseCache.js\n * Stores textflow, states in local cache.\n * TODO: use angular-data for storage\n * @ngInject\n */\n function PhraseCache($q, $resource, FilterUtil, UrlService, DocumentService,\n _) {\n var phraseCache = this,\n states = {}, //ids and states of all tu in order\n transUnits = {};\n\n phraseCache.getStates =\n function (projectSlug, versionSlug, documentId, localeId) {\n var key = generateKey(projectSlug, versionSlug, documentId, localeId);\n if (_.has(states, key)) {\n return $q.when(states[key]);\n } else {\n var encodedDocId = DocumentService.encodeDocId(documentId);\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: encodedDocId,\n localeId: localeId\n },\n isArray: true\n }\n },\n States = $resource(UrlService.TRANSLATION_STATUS_URL, {}, methods);\n return States.query().$promise.then(function (state) {\n state = FilterUtil.cleanResourceList(state);\n states[key] = state;\n return states[key];\n });\n }\n };\n\n phraseCache.getTransUnits = function (ids, localeId) {\n var results = {},\n missingTUId = [],\n missingLocaleTUId = [];\n ids.forEach(function (id) {\n if (_.has(transUnits, id)) {\n if(transUnits[id][localeId]) {\n results[id] = transUnits[id];\n } else {\n missingLocaleTUId.push(id);\n }\n } else {\n missingTUId.push(id);\n }\n });\n if (_.isEmpty(missingTUId) && _.isEmpty(missingLocaleTUId)) {\n return $q.when(results);\n }\n else {\n var TextFlows, Translations;\n if(!_.isEmpty(missingTUId)) {\n TextFlows = $resource(UrlService.TEXT_FLOWS_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingTUId.join(',')\n }\n }\n });\n }\n if(!_.isEmpty(missingLocaleTUId)) {\n Translations = $resource(UrlService.TRANSLATION_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingLocaleTUId.join(',')\n }\n }\n });\n }\n\n //need to create chain of promises\n if(TextFlows && Translations) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU).\n then(Translations.query().$promise.then(updateCacheWithExistingTU));\n } else if(TextFlows) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU);\n } else if(Translations) {\n return Translations.query().$promise.then(updateCacheWithExistingTU);\n }\n }\n\n function updateCacheWithExistingTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n //push to cache\n transUnits[key][localeId] = newTransUnits[key][localeId];\n //merge with results\n results[key] = transUnits[key];\n }\n return results;\n }\n\n function updateCacheWithNewTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n transUnits[key] = newTransUnits[key]; //push to cache\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n };\n\n /**\n * On translation updated from server\n * @param id\n * @param localeId\n * @param revision\n * @param state\n * @param content\n * @param contents\n */\n phraseCache.onTransUnitUpdated =\n function (context, id, localeId, revision, status, content, contents) {\n\n var key = generateKey(context.projectSlug, context.versionSlug,\n context.docId, localeId);\n\n var stateEntry = _.find(states[key], function(stateEntry) {\n return stateEntry.id === id;\n });\n //Update states cache\n if(stateEntry) {\n stateEntry.state = status;\n }\n\n //Update transUnits cache\n var translation = transUnits[id][localeId];\n if (!translation) {\n translation = {};\n }\n translation.revision = parseInt(revision);\n translation.state = status;\n translation.content = content;\n translation.contents = contents;\n };\n\n function generateKey(projectId, versionId, documentId, localeId) {\n return projectId + '-' + versionId + '-' +\n documentId + '-' + localeId;\n }\n\n return phraseCache;\n }\n\n angular\n .module('app')\n .factory('PhraseCache', PhraseCache);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} Phrase\n * @property {number} id text flow id\n * @property {string} source source content\n * @property {string[]} sources source contents if it's plural\n * @property {string} translation original translation content\n * @property {string[]} translations original translation plural contents\n * @property {string} newTranslation translation in the editor\n * @property {string[]} newTranslations translations in the editor\n * @property {boolean} plural whether it's in plural form\n * @property {StatusInfo} status information about this phrase\n * @property {number} revision translation revision number\n * @property {number} wordCount source word count\n */\n /**\n * @name PhraseService\n * @description Provides a list of phrases for the current document(s)\n *\n * @ngInject\n */\n function PhraseService(FilterUtil, PhraseCache, TransStatusService, _,\n $stateParams) {\n var phraseService = {};\n\n phraseService.phrases = []; //current displayed phrases\n\n // FIXME use an object for all the ID arguments - in general we will only\n // need to modify such an object sporadically when switching document\n // or locale, and it is neater than passing them all\n // around separately.\n\n phraseService.getPhraseCount = function(context, filter) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, context.localeId).then(function(states) {\n var ids = getIds(states, filter.states);\n return ids.length;\n });\n };\n\n /**\n * Fetch each of the text flows appearing in the given states data.\n */\n phraseService.fetchAllPhrase = function (context, filter,\n offset, maxResult) {\n\n var localeId = context.localeId;\n\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(getTransUnits);\n\n function getTransUnits(states) {\n var ids = getIds(states, filter.states);\n if (!isNaN(offset)) {\n if(!isNaN(maxResult)) {\n ids = ids.slice(offset, offset + maxResult);\n } else {\n ids = ids.slice(offset);\n }\n }\n // Reading for chaining promises https://github.com/kriskowal/q\n // (particularly \"Sequences\").\n return PhraseCache.getTransUnits(ids, localeId).\n then(transformToPhrases).then(sortPhrases);\n }\n\n /**\n * Converts text flow data from the API into the form expected in the\n * editor.\n *\n * @returns {Phrase[]}\n */\n function transformToPhrases(transUnits) {\n return _.map(transUnits, function(transUnit, id) {\n var source = transUnit.source,\n trans = transUnit[localeId];\n\n return {\n id: parseInt(id),\n // TODO: handle plural content\n source: source.content,\n sources: source.contents,\n // Original translation\n translation: trans ? trans.content : '',\n translations: trans ? trans.contents : [],\n // Translation from editor\n newTranslation: trans ? trans.content : '',\n newTranslations: trans ? trans.contents : [],\n plural: source.plural,\n // Conform the status from the server, return an object\n status: trans ? TransStatusService.getStatusInfo(trans.state) :\n TransStatusService.getStatusInfo('untranslated'),\n revision: trans ? parseInt(trans.revision) : 0,\n wordCount: parseInt(source.wordCount)\n };\n });\n }\n\n function sortPhrases(phrases) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(function(states) {\n phraseService.phrases = _.sortBy(phrases, function(phrase) {\n var index = _.findIndex(states, function(state) {\n return state.id === phrase.id;\n });\n return index >= 0 ? index : phrases.length;\n });\n return phraseService.phrases;\n });\n }\n };\n\n //update phrase,statuses and textFlows with given tu id\n phraseService.onTransUnitUpdated = function(context, id, localeId, revision,\n status, content, contents) {\n\n PhraseCache.onTransUnitUpdated(context, id, localeId, revision, status,\n content, contents);\n\n var phrase = findPhrase(id, phraseService.phrases);\n //update phrase if found\n if(phrase) {\n phrase.translation = content;\n phrase.revision = revision;\n phrase.status = TransStatusService.getStatusInfo(status);\n }\n };\n\n //rollback content of phrase\n phraseService.onTransUnitUpdateFailed = function(id) {\n var phrase = findPhrase(id, phraseService.phrases);\n if(phrase) {\n phrase.newTranslation = phrase.translation;\n }\n };\n\n // find next Id from phrases states\n phraseService.findNextId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n nextIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n nextIndex = currentIndex + 1 < states.length ?\n currentIndex + 1 : states.length - 1;\n return states[nextIndex].id;\n });\n };\n\n // find previous id from phrases states\n phraseService.findPreviousId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n previousIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n previousIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : 0;\n return states[previousIndex].id;\n });\n };\n\n // find next phrase with requested status\n phraseService.findNextStatus = function(currentId, status) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (statusList) {\n var currentIndex,\n nextStatusInfo,\n requestStatus = TransStatusService.getStatusInfo(status);\n\n currentIndex = _.findIndex(statusList, function (state) {\n return state.id === currentId;\n });\n\n for (var i = currentIndex + 1; i < statusList.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n statusList[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n return statusList[i].id;\n }\n }\n return currentId;\n });\n };\n\n function findPhrase(id, phrases) {\n return _.find(phrases, function(phrase) {\n return phrase.id === id;\n });\n }\n\n function getIds(resources, states) {\n if(states) {\n resources = FilterUtil.filterResources(resources, ['state'], states);\n }\n return _.map(resources, function (item) {\n return item.id;\n });\n }\n\n // Does not appear to be used anywhere. Removing until phrase-caching code\n // is added.\n // phraseService.findById = function(phraseId) {\n // var deferred = $q.defer();\n // var phrase = phrases[phraseId];\n // deferred.resolve(phrase);\n // return deferred.promise;\n // };\n\n return phraseService;\n }\n\n angular\n .module('app')\n .factory('PhraseService', PhraseService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name progressbar\n * @description progressbar container\n * @ngInject\n */\n function progressbar() {\n return {\n restrict: 'E',\n required: 'progressbarStatistic',\n scope: {\n statistic: '=progressbarStatistic',\n size: '@' //large, full, or empty\n },\n templateUrl: 'components/progressbar/progressbar.html',\n controller: function($scope) {\n /**\n * Need to set to true for complex object watch. Performance issue.\n * https://docs.angularjs.org/api/ng/type/$rootScope.Scope\n */\n $scope.$watch('statistic', function(statistic) {\n if (statistic) {\n $scope.style = getStyle(statistic);\n }\n }, true);\n }\n };\n }\n\n function getStyle(statistic) {\n var total = statistic.total,\n widthApproved = getWidthPercent(statistic.approved, total),\n widthTranslated = getWidthPercent(statistic.translated, total),\n marginLeftTranslated = widthApproved,\n widthNeedsWork = getWidthPercent(statistic.needswork, total),\n marginLeftNeedsWork = widthApproved + widthTranslated,\n widthUntranslated = getWidthPercent(statistic.untranslated, total),\n marginLeftUntranslated = widthApproved +\n widthTranslated + widthNeedsWork,\n style = {};\n\n style.approved = {\n 'width': widthApproved + '%',\n 'marginLeft': 0\n };\n style.translated = {\n 'width': widthTranslated + '%',\n 'marginLeft': marginLeftTranslated + '%'\n };\n style.needsWork = {\n 'width': widthNeedsWork + '%',\n 'marginLeft': marginLeftNeedsWork + '%'\n };\n style.untranslated = {\n 'width': widthUntranslated + '%',\n 'marginLeft': marginLeftUntranslated + '%'\n };\n return style;\n }\n\n function getWidthPercent(value, total) {\n var percent = 0;\n if (value) {\n percent = value / total * 100;\n }\n return percent;\n }\n\n angular\n .module('app')\n .directive('progressbar', progressbar);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle communication with server on Project related information.\n * ProjectService.js\n * @ngInject\n */\n\n function ProjectService(UrlService, $resource) {\n\n /**\n * Get project's information\n *\n * @param projectSlug\n * @returns {$promise|*|N.$promise}\n */\n function getProjectInfo(projectSlug) {\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug\n }\n }\n };\n\n var Locales = $resource(UrlService.PROJECT_URL, {}, methods);\n return Locales.query().$promise;\n }\n\n return {\n getProjectInfo: getProjectInfo\n };\n }\n angular\n .module('app')\n .factory('ProjectService', ProjectService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($scope, $element, $stateParams, _, TransUnitService,\n EventService, LocaleService, focus, EditorShortcuts) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n\n transUnitCtrl.isTranslationModified =\n TransUnitService.isTranslationModified;\n\n transUnitCtrl.focusTranslation = function() {\n focus('phrase-' + $scope.phrase.id);\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected}, null);\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n phrase, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n { 'phrase' : phrase,\n 'status' : status,\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n }, $scope);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n };\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n TransUnitService.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !TransUnitService.isTranslationModified(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService($location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n PhraseService, EditorShortcuts, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId\n ;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.isTranslationModified = function(phrase) {\n return phrase.newTranslation !== phrase.translation;\n };\n\n transUnitService.getSaveButtonStatus = function(phrase) {\n if (phrase.newTranslation === '') {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (phrase.translation !== phrase.newTranslation) {\n return TransStatusService.getStatusInfo('translated');\n } else {\n return phrase.status;\n }\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus) {\n return filterSaveButtonOptions(saveButtonStatus);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n //perform implicit save if changed\n if(transUnitService.isTranslationModified(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n setSelected(oldTUController, false);\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, phrase) {\n modifyTranslationText(phrase, phrase.source);\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (transUnitService.isTranslationModified(phrase)) {\n modifyTranslationText(phrase, phrase.translation);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n // EventService.EVENT.GOTO_NEXT_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_ROW, goToNextRow);\n\n // EventService.EVENT.GOTO_PREVIOUS_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_PREVIOUS_ROW, goToPreviousRow);\n\n // EventService.EVENT.GOTO_NEXT_UNTRANSLATED listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n goToNextUntranslated);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function modifyTranslationText(phrase, newText) {\n phrase.newTranslation = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation save state\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return [];\n } else {\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n }\n\n function saveCurrentRowIfModifiedAndUnfocus(data) {\n var phrase = controllerList[data.currentId].getPhrase();\n if (transUnitService.isTranslationModified(phrase)) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale': data.localeId,\n 'docId': data.docId\n });\n }\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT, phrase);\n }\n\n function goToNextRow(event, data) {\n PhraseService.findNextId(data.currentId)\n .then(function(next) {\n if (next !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': next,\n 'updateURL': true,\n 'focus' : true\n }, null);\n } else {\n // we have reach the end\n saveCurrentRowIfModifiedAndUnfocus(data);\n }\n });\n\n }\n\n function goToPreviousRow(event, data) {\n PhraseService.findPreviousId(data.currentId)\n .then(function(previous) {\n if (previous !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': previous,\n 'updateURL': true,\n 'focus' : true\n }, null);\n } else {\n // have have reach the start\n saveCurrentRowIfModifiedAndUnfocus(data);\n }\n });\n }\n\n function goToNextUntranslated(event, data) {\n PhraseService.findNextStatus(data.currentId, 'untranslated')\n .then(function(next) {\n if (next !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': next,\n 'updateURL': true,\n 'focus' : true\n }, null);\n } else {\n // can not find next untranslated\n saveCurrentRowIfModifiedAndUnfocus(data);\n }\n });\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["app.js","AppConfig.js","AppConstants.js","AppCtrl.js","editor/EditorContentCtrl.js","editor/EditorCtrl.js","editor/EditorDetailsCtrl.js","editor/EditorService.js","editor/EditorShortcuts.js","editor/EditorSuggestionsCtrl.js","components/blur-on/blurOnDirective.js","components/clickElsewhere/clickElsewhereDirective.js","components/document/DocumentService.js","components/dropdown/DropdownController.js","components/dropdown/DropdownService.js","components/dropdown/dropdown.js","components/dropdown/dropdownDirective.js","components/event/EventService.js","components/icon/iconDirective.js","components/locale/LocaleService.js","components/logo-loader/logoLoaderDirective.js","components/message/MessageHandler.js","components/notification/NotificationService.js","components/phrases/PhraseCache.js","components/phrases/PhraseService.js","components/progressbar/progressbarDirective.js","components/project/ProjectService.js","components/renderWhitespaceCharacters/renderWhitespaceCharacters.js","components/scrollbar-width/ScrollbarWidthCtrl.js","components/scrollbar-width/scrollbarWidthDirective.js","components/toggle/toggleDirective.js","components/transStatus/TransStatusService.js","components/transUnit/TransUnitCtrl.js","components/transUnit/TransUnitService.js","components/transUnit/transUnitDirective.js","components/transUnitFilter/transUnitFilterDirective.js","components/user/UserService.js","components/util/FilterUtil.js","components/util/PhraseUtil.js","components/util/StatisticUtil.js","components/util/StringUtil.js","components/util/UrlService.js"],"names":[],"mappings":"AAAA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;AAEJ;;ACnBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;;IAEA;IACA;MACE;QACE;UACE;UACA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;UACE;UACA;UACA;YACE;UACF;YACE;cACE;UACJ;YACE;UACF;UACA;QACF;MACF;IACF,EAAE;;;IAEF;;IAEA;IACA;;IAEA;MACE;QACE;QACA;QACA,aAAa,oBAAoB;QACjC;UACE,MAAM,eAAA;YACJ;UACF,CAAC;QACH;MACF;QACE;QACA;UACE;YACE;YACA,aAAa,kCAAkC;UACjD;UACA;YACE;YACA,aAAa,0CAA0C;UACzD;UACA;YACE;YACA,aAAa,kCAAkC;UACjD;QACF;MACF;QACE;QACA;MACF;;MAEA;;EAEJ;EACA;EACA,CAAC;;;EAED;IACE;IACA;;AAEJ;;;;;AC5FA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;IACA;;AAEJ;;;;ACfA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;mBACiB;IACf;;IAEA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;IAEF;IACA;MACE;MACA;MACA;QACE;QACA;YACI;gBACI;kBACE;gBACF;gBACA;kBACE;oBACE;oBACA;kBACF;oBACE;kBACF;gBACF;MACV;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;UACE;UACA;UACA;YACE;QACJ;UACE;QACF;IACJ;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;YACF;YACA;UACF;UACA;YACE;UACF;YACE;UACF;QACF;QACA;UACE;YACE;YACA;UACF;QACF;IACJ;EACF,CAAC;;;EAED;IACE;IACA,aAAa,OAAO;;AAExB;;;;;AC5GA;EACE;;EAEA;GACC;GACA;GACA;EACD;6BAC2B;6BACA;6BACA;;IAEzB;IACA;QACI;IACJ;;IAEA;;IAEA;MACE;MACA;;IAEF;;IAEA;MACE;QACE;UACE;QACF;UACE;UACA;YACE;cACE;YACF;UACF;UACA;QACF;QACA;QACA;MACF;;IAEF;MACE;;MAEA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;IACF;;;IAGA;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;MACA;KACD;IACD;IACA;;IAEA;IACA;;IAEA;IACA;mBACe;;IAEf;MACE;QACE;QACA;QACA;QACA;;MAEF;QACE;MACF;MACA;MACA;;MAEA;QACE;+BACuB;iCACE;iCACA;iCACA;+BACF;MACzB;QACE;QACA;QACA;WACG;aACE;aACA;aACA;aACA;WACF;MACL;IACF;;IAEA;MACE;QACE;QACA;QACA;QACA;;MAEF;QACE;MACF;MACA;MACA;;MAEA;QACE;+BACuB;iCACE;iCACA;iCACA;+BACF;MACzB;QACE;QACA;QACA;WACG;aACE;aACA;aACA;aACA;WACF;MACL;IACF;;IAEA;MACE;QACE;QACA;QACA;;MAEF;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;iCACuB;mCACE;mCACA;mCACA;iCACF;UACvB;QACF;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;UACJ;;UAEA;YACE;;UAEF;MACJ;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,iBAAiB;AAClC;;AC3PA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;QACA;QACA;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;QACE;IACJ;;IAEA;IACA;;IAEA;IACA;IACA;MACE;MACA;MACA;;IAEF;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;UACE;MACJ;;IAEF;MACE;MACA;QACE;QACA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;MACA;QACE;;QAEA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;cACI;UACJ;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;;QAEE;UACE;;QAEF;QACA;MACF;;IAEF;MACE;QACE;MACF;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;QACA;UACE;YACE;QACJ;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;IACJ;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;cACE;YACF;cACE;UACJ;UACA;YACE;UACF;IACN;;IAEA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,UAAU;AAC3B;;AC/SA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,iBAAiB;AAClC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;;IAEJ;;IAEA;IACA;;IAEA;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;MACF;;IAEF;2CACuC;MACrC;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;QACJ;UACE;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;UACA;YACE;YACA;YACA;YACA;UACF;QACF;QACA;QACA;MACF;;IAEF;MACE;QACE;IACJ;;IAEA;IACA;MACE;;MAEA;;MAEA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;;UAEA;YACE;;UAEF;YACE;YACA;YACA;;UAEF;YACE;QACJ;QACA;UACE;YACE;UACF;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;ACtJA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;2BACyB;IACvB;MACE;;IAEF;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;QACF;MACF;QACE;QACA;UACE;UACA;YACE;QACJ;UACE;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;QACE;UACE;YACE;YACA;UACF;;QAEF;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;QACE;;MAEF;;MAEA;QACE;;MAEF;QACE;;MAEF;MACA;MACA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;QACA;;MAEF;QACE;QACA;QACA;QACA;SACC;SACA;QACD;QACA;IACJ;;IAEA;KACC;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;IACA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;UACE;MACJ;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;YACE;UACF;MACJ;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;uDACmD;MACjD;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;MACF;;MAEA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;;ACnVA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,qBAAqB;AACtC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;UACE;cACI;YACF;UACF;QACF;IACJ;EACF;;EAEA;IACE;IACA,YAAY,MAAM;;AAEtB;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;QACE;UACE;YACE;UACF;QACF;;QAEA;;QAEA;UACE;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,cAAc;;AAE9B;;AClCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;2BACyB;IACvB;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;UACE;UACA;YACE;cACE;cACA;gBACE;gBACA;gBACA;gBACA;cACF;cACA;YACF;UACF;UACA;;YAEE;YACA;cACE;gBACE;YACJ;;YAEA;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;SACG;MACH;IACF;;IAEA;+CAC2C;+CACA;MACzC;MACA;QACE;UACE;;QAEF;UACE;YACE;YACA;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;IACA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;;MAEE;QACE;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;AC9JA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;QACA;QACA;QACA;QACA;UACE;;IAEN;MACE;;MAEA;QACE;QACA;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;;MAEF;QACE;QACA;QACA;QACA;UACE;QACF;QACA;MACF;QACE;MACF;;MAEA;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;EACF,CAAC;;;EAED;IACE;IACA,aAAa,YAAY;;AAE7B;;ACpGA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;;IAEJ;MACE;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;QACE;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;;AAE7B;;;AC/DA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;IACA;;AAEJ;;AClBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA,aAAa,YAAY;MACzB;QACE;MACF;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA;MACA;QACE;UACE;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,QAAQ;IACpB,YAAY,eAAe;IAC3B,YAAY,cAAc;;AAE9B;;;AC3FA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;OACC;OACA;OACA;OACA;MACD;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;;MAEA;;MAEA;;MAEA;;MAEA;OACC;OACA;MACD;MACA;MACA;;MAEA;OACC;OACA;OACA;MACD;;;MAGA;OACC;OACA;MACD;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,YAAY;AAC1B;;AC1IA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;MACA;QACE;YACI;;QAEJ;;QAEA;UACE;QACF;;QAEA;QACA;UACE;YACE;YACA;UACF;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,IAAI;;AAEpB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;IAEE;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;MAEE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;IACF;;IAEA;IACA;MACE;QACE;UACE;UACA;QACF;MACF;MACA;QACE;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;AAC3B;;ACjGA;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;QACA;MACF;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;MACA;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,UAAU;;AAE1B;;AC9CA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,UAAU,cAAc;;AAE5B;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;EAEA;;EAEA;IACE;IACA,UAAU,mBAAmB;;AAEjC;;ACjBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;uBACqB;IACnB;MACE;MACA;;IAEF;MACE;QACE;QACA;UACE;QACF;UACE;UACA;cACI;gBACE;gBACA;kBACE;kBACA;kBACA;kBACA;gBACF;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;YACA;UACF;QACF;MACF;;IAEF;MACE;QACE;QACA;MACF;QACE;UACE;YACE;UACF;YACE;UACF;QACF;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;UACE;YACE;QACJ;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;QAEE;UACE;;QAEF;UACE;QACF;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;;IAEF;MACE;QACE;IACJ;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,WAAW;;AAEzB;;AClKA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;GACA;EACD;yBACuB;IACrB;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;QACE;UACE;UACA;QACF;IACJ;;IAEA;KACC;KACA;IACD;6CACyC;;MAEvC;;MAEA;QACE;;MAEF;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;QACA;QACA;QACA;UACE;MACJ;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;cACI;UACJ;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;UACF;MACJ;IACF;;IAEA;IACA;MACE;;MAEA;QACE;;MAEF;MACA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;YACE;UACF;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;UACA;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;YACA;;UAEF;YACE;UACF;;UAEA;YACE;cACE;YACF;cACE;YACF;UACF;UACA;QACF;IACJ;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;AClOA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;MACF;MACA;MACA,YAAY,WAAA;QACV;SACC;SACA;SACA;QACD;UACE;YACE;UACF;QACF;MACF,CAAC;IACH;EACF;;EAEA;IACE;QACI;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;IAEJ;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA,YAAY,WAAW;;AAE3B;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;;IAEE;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;YACE;YACA;cACE;YACF;UACF;QACF;;MAEF;MACA;IACF;;IAEA;MACE;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,cAAc;AAC5B;;ACtCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;IACF;EACF;;EAEA;IACE;IACA,YAAY,0BAA0B;;AAE1C;;ACnDA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;UACI;UACA;;MAEJ;IACF;;EAEF;;EAEA;IACE;IACA,aAAa,kBAAkB;;AAEnC;;AC5BA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA,aAAa,wCAAwC;MACrD;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;IAC1B,YAAY,qBAAqB;IACjC,YAAY,uBAAuB;IACnC,YAAY,mBAAmB;;AAEnC;;ACrFA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;;AAE9B;;ACtBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;EACD;IACE;QACI;UACE;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;;IAEJ;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,kBAAkB;AAChC;;;ACjHA;EACE;;EAEA;GACC;GACA;GACA;EACD;yBACuB;yBACA;;IAErB;;IAEA;IACA;IACA;;IAEA;MACE;;IAEF;MACE;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;MACA;QACE;UACE;YACE;YACA;UACF;MACJ;IACF;;IAEA;MACE;UACI;IACN;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;UACE;YACE;YACA;MACN;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;UACE;MACJ;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;MACJ;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;+BACuB;iCACE;iCACA;+BACF;MACzB;IACF;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;QACN;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,aAAa;AAC9B;;;AChKA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;;IAEJ;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;QACA;UACE;QACF;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;UACE;;UAEA;YACE;;YAEA;YACA;cACE;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;gBACF;YACJ;UACF;;UAEA;UACA;UACA;;UAEA;;UAEA;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;cACE;cACA;YACF;UACF;QACF;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;QACA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;YACF;UACF;QACF;QACA;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;OACG;;IAEH;KACC;KACA;KACA;IACD;OACG;;IAEH;MACE;MACA;MACA;IACF;OACG;;IAEH;MACE;MACA;MACA;IACF;OACG;;IAEH;MACE;MACA;QACE;QACA;MACF;MACA;MACA;QACE;MACF;QACE;IACJ;;IAEA;MACE;MACA;;MAEA;QACE;MACF;QACE;IACJ;;IAEA;OACG;OACA;IACH;;IAEA;MACE;MACA;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;UACE;UACA;QACF;YACI;YACA;QACJ;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,gBAAgB;AAC9B;;;;ACrQA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA,aAAa,8BAA8B;MAC3C;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,SAAS;;AAEzB;;AC7BA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA,YAAY,eAAe;;AAE/B;;ACvBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;MACE;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,WAAW;AACzB;;AC5CA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;;IAGA;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,UAAU;AACxB;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;YACE;QACJ;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,UAAU;AACxB;;AC3DA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;MACF;MACA;QACE;MACF;IACF;EACF;EACA;IACE;IACA,UAAU,aAAa;AAC3B;;ACxBA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;IACE;IACA,UAAU,UAAU;AACxB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;IACJ;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;;IAEJ;;IAEA;MACE;QACE;MACF;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;UACF;YACE;gBACI;;YAEJ;YACA;cACE;YACF;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;YACE;cACE;UACJ;;UAEA;YACE;QACJ;MACF;IACF;;IAEA;KACC;KACA;IACD;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;IACD;MACE;QACE;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,UAAU;AACxB","file":"app.js","sourcesContent":["(function() {\n 'use strict';\n\n /**\n * Root application\n * app.js\n */\n angular.module(\n 'app', [\n 'ngResource',\n 'ngAnimate',\n 'ui.router',\n 'templates',\n 'cfp.hotkeys',\n 'focusOn',\n 'monospaced.elastic',\n 'gettext'\n ]);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name AppConfig\n * @description Main config for the entire app\n * @ngInject\n */\n function AppConfig($stateProvider, $urlRouterProvider, $httpProvider,\n hotkeysProvider) {\n\n //Can't use injection for EventService as this module is out of the scope\n var interceptor = function($q, $rootScope) {\n return {\n request: function(config) {\n // See EventService.EVENT.LOADING_START\n $rootScope.$broadcast('loadingStart');\n return config;\n },\n requestError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n console.error('Request error due to ', rejection);\n return $q.reject(rejection);\n },\n response: function(response) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n return response || $q.when(response);\n },\n responseError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n if (rejection.status === 401) {\n console.error('Unauthorized access. Please login');\n } else if (rejection.status === 404) {\n console.error('Service end point not found- ',\n rejection.config.url);\n } else {\n console.error('Error in response ', rejection);\n }\n return $q.reject(rejection);\n }\n };\n };\n\n $httpProvider.interceptors.push(interceptor);\n\n // For any unmatched url, redirect to /editor\n $urlRouterProvider.otherwise('/');\n\n $stateProvider\n .state('editor', {\n url: '/:projectSlug/:versionSlug/translate',\n templateUrl: 'editor/editor.html',\n controller: 'EditorCtrl as editor',\n resolve: {\n url : function(UrlService) {\n return UrlService.init();\n }\n }\n }).state('editor.selectedContext', {\n url: '/:docId/:localeId',\n views: {\n 'editor-content': {\n templateUrl: 'editor/editor-content.html',\n controller: 'EditorContentCtrl as editorContent'\n },\n 'editor-suggestions': {\n templateUrl: 'editor/editor-suggestions.html',\n controller: 'EditorSuggestionsCtrl as editorSuggestions'\n },\n 'editor-details': {\n templateUrl: 'editor/editor-details.html',\n controller: 'EditorDetailsCtrl as editorDetails'\n }\n }\n }).state('editor.selectedContext.tu', {\n url: '/?id&selected?states',\n reloadOnSearch: false\n });\n\n hotkeysProvider.includeCheatSheet = false;\n\n // $locationProvider.html5Mode(true);\n // .hashPrefix('!');\n }\n\n angular\n .module('app')\n .config(AppConfig);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * AddConstants\n * \"Global\" app variables. Don't worry David, they're not really global.\n */\n angular\n .module('app')\n .constant('_', window._)\n .constant('str', window._.string)\n .constant('Mousetrap', window.Mousetrap)\n // Toggle to hide/show features that are ready for production\n .constant('PRODUCTION', true);\n\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name AppCtrl\n * @description Main controler for the entire app\n * @ngInject\n */\n function AppCtrl($scope, UserService, UrlService, LocaleService,\n MessageHandler, gettextCatalog, StringUtil, PRODUCTION) {\n var appCtrl = this;\n\n // See AppConstants.js\n appCtrl.PRODUCTION = PRODUCTION;\n appCtrl.settings = UserService.settings;\n appCtrl.uiLocaleList = [ LocaleService.DEFAULT_LOCALE ];\n\n /*\n Not used for the time being. But should show loading when change state\n $scope.$on('$stateChangeStart', function(event, toState) {\n if (toState.resolve) {\n }\n });\n\n $scope.$on('$stateChangeSuccess', function(event, toState) {\n if (toState.resolve) {\n }\n });\n */\n\n UrlService.init().then(loadLocales).\n then(loadUserInformation).\n then(loadUILocale);\n\n // On UI locale changes listener\n appCtrl.onChangeUILocale = function(locale) {\n appCtrl.myInfo.locale = locale;\n var uiLocaleId = appCtrl.myInfo.locale.localeId;\n if (!StringUtil.startsWith(uiLocaleId,\n LocaleService.DEFAULT_LOCALE.localeId, true)) {\n gettextCatalog.loadRemote(UrlService.uiTranslationURL(uiLocaleId))\n .then(\n function() {\n gettextCatalog.setCurrentLanguage(uiLocaleId);\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n } else {\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE.localeId);\n }\n };\n\n appCtrl.dashboardPage = function() {\n return UrlService.DASHBOARD_PAGE;\n };\n\n function loadLocales() {\n return LocaleService.getAllLocales();\n }\n\n function loadUserInformation() {\n return UserService.getMyInfo().then(\n function(myInfo) {\n appCtrl.myInfo = myInfo;\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n appCtrl.myInfo.gravatarUrl = UrlService.gravatarUrl(\n appCtrl.myInfo.gravatarHash, 72);\n }, function(error) {\n MessageHandler.displayError('Error loading my info: ' + error);\n });\n }\n\n function loadUILocale() {\n LocaleService.getUILocaleList().then(\n function(translationList) {\n for ( var i in translationList.locales) {\n var language = {\n 'localeId' : translationList.locales[i],\n 'name' : ''\n };\n appCtrl.uiLocaleList.push(language);\n }\n appCtrl.myInfo.locale = LocaleService.getLocaleByLocaleId(\n appCtrl.uiLocaleList, LocaleService.DEFAULT_LOCALE.localeId);\n if (!appCtrl.myInfo.locale) {\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n }\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n }\n }\n\n angular\n .module('app')\n .controller('AppCtrl', AppCtrl);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * EditorContentCtrl.js\n * @ngInject\n */\n function EditorContentCtrl($rootScope, EditorService, PhraseService,\n DocumentService, UrlService, EventService,\n $stateParams, PhraseUtil, $location, _,\n TransStatusService) {\n\n //TODO: move pager to directives/convert to infinite scroll\n var COUNT_PER_PAGE = 50,\n editorContentCtrl = this, status, filter;\n refreshFilterQueryFromUrl();\n\n editorContentCtrl.phrases = [];\n\n EditorService.updateContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n $stateParams.localeId);\n\n init();\n\n $rootScope.$on(EventService.EVENT.FILTER_TRANS_UNIT,\n function (event, filter) {\n if(filter.status.all === true) {\n $location.search('status', null);\n } else {\n var queries = [];\n _.forEach(filter.status, function(val, key) {\n if(val) {\n queries.push(key);\n }\n });\n $location.search('status', queries.join(','));\n }\n refreshFilterQueryFromUrl();\n init();\n });\n\n function refreshFilterQueryFromUrl() {\n status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n status = _.transform(status, function(result, state) {\n state = TransStatusService.getServerId(state);\n return result.push(state);\n });\n }\n filter = {\n 'status': status\n };\n }\n\n\n $rootScope.$on(EventService.EVENT.GOTO_FIRST_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex = 0;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_PREV_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex -= 1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex +=1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_LAST_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex = EditorService.maxPageIndex;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n /*\n TODO: after moving to infinite scroll, all these go to event handler\n should move back to TransUnitService and use PhraseService.findNextId etc\n */\n // EventService.EVENT.GOTO_NEXT_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_ROW, goToNextRow);\n\n // EventService.EVENT.GOTO_PREVIOUS_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_PREVIOUS_ROW, goToPreviousRow);\n\n // EventService.EVENT.GOTO_NEXT_UNTRANSLATED listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n goToNextUntranslated);\n\n function goToNextRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n nextIndex,\n nextId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n nextIndex = Math.min(currentIndex + 1, phrases.length - 1);\n nextId = phrases[nextIndex].id;\n\n if (nextId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': nextId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n // we have reach the end\n phrase = phrases[currentIndex];\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToPreviousRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n previousIndex,\n prevId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n previousIndex = Math.max(currentIndex - 1, 0);\n prevId = phrases[previousIndex].id;\n\n if (prevId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': prevId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n phrase = phrases[currentIndex];\n // have reach the start\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToNextUntranslated(event, data) {\n var phrases = editorContentCtrl.phrases,\n requestStatus = TransStatusService.getStatusInfo(status),\n currentIndex,\n nextStatusInfo;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n\n for (var i = currentIndex + 1; i < phrases.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n phrases[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': phrases[i].id,\n 'updateURL': true,\n 'focus': true\n }, null);\n return;\n }\n }\n // can not find next untranslated\n //TransUnitService.saveCurrentRowIfModifiedAndUnfocus(data);\n }\n\n function changePage(pageIndex) {\n loadPhrase(pageIndex);\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT);\n }\n\n /**\n * Load transUnit\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function init() {\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: EditorService.context.projectSlug,\n versionSlug: EditorService.context.versionSlug,\n docId: EditorService.context.docId,\n localeId: EditorService.context.localeId\n }\n );\n\n PhraseService.getPhraseCount(EditorService.context, filter).\n then(function(count) {\n EditorService.maxPageIndex = parseInt(count / COUNT_PER_PAGE);\n if(count > COUNT_PER_PAGE) {\n EditorService.maxPageIndex = count % COUNT_PER_PAGE !== 0 ?\n EditorService.maxPageIndex +=1 : EditorService.maxPageIndex;\n }\n\n EditorService.maxPageIndex = EditorService.maxPageIndex -1 < 0 ? 0 :\n EditorService.maxPageIndex -1;\n\n loadPhrase(EditorService.currentPageIndex);\n });\n }\n\n function loadPhrase(pageIndex) {\n var startIndex = pageIndex * COUNT_PER_PAGE;\n PhraseService.fetchAllPhrase(EditorService.context, filter,\n startIndex, COUNT_PER_PAGE).then(displayPhrases);\n }\n\n function displayPhrases(phrases) {\n editorContentCtrl.phrases = phrases;\n }\n\n return editorContentCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorContentCtrl', EditorContentCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorCtrl.js\n * @ngInject\n */\n function EditorCtrl($scope, UserService, DocumentService, LocaleService,\n ProjectService, EditorService, StatisticUtil,\n UrlService, $stateParams, $state, MessageHandler, $rootScope,\n EventService, EditorShortcuts, _, Mousetrap) {\n var editorCtrl = this;\n editorCtrl.pageNumber = 1;\n editorCtrl.showCheatsheet = false;\n editorCtrl.shortcuts = _.mapValues(\n _.values(EditorShortcuts.SHORTCUTS), function(shortcutInfo) {\n // second combo (secondary keys) is an array. We have to flatten it\n var keyCombos = _.flatten(shortcutInfo.keyCombos, 'combo');\n return {\n combos: _.map(keyCombos, function(key) {\n return EditorShortcuts.symbolizeKey(key);\n }),\n description: shortcutInfo.keyCombos[0].description\n };\n });\n\n //tu status to include for display\n editorCtrl.filter = {\n 'status' : {\n 'all': true,\n 'approved' : false,\n 'translated' : false,\n 'needsWork': false,\n 'untranslated': false\n }\n };\n\n processFilterQuery();\n\n //This is just processing UI during startup,\n //phrase filtering are done in EditorContentCtrl during init\n function processFilterQuery() {\n //process filter query\n var status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n _.forEach(status, function(val) {\n if(!_.isUndefined(editorCtrl.filter.status[val])) {\n editorCtrl.filter.status[val] = true;\n }\n });\n updateFilter();\n }\n }\n\n Mousetrap.bind('?', function(event) {\n var srcElement = event.srcElement;\n if (!editorCtrl.showCheatsheet && !stopCheatsheetCallback(srcElement)) {\n editorCtrl.toggleKeyboardShortcutsModal();\n $scope.$digest();\n }\n }, 'keyup');\n\n /**\n * Mousetrap by default stops callback on input elements BUT\n * hotkeys monkey patched it!!!\n * TODO change this hack once we remove angular hotkeys\n */\n function stopCheatsheetCallback(element) {\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n // stop for input, select, and textarea\n return element.tagName === 'INPUT' || element.tagName === 'SELECT' ||\n element.tagName === 'TEXTAREA' || element.isContentEditable;\n }\n\n //TODO: cross domain rest\n //TODO: Unit test\n\n //Working URL: http://localhost:8000/#/tiny-project/1/translate or\n // http://localhost:8000/#/tiny-project/1/translate/hello.txt/fr\n editorCtrl.context = EditorService.initContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n LocaleService.DEFAULT_LOCALE, LocaleService.DEFAULT_LOCALE.localeId,\n 'READ_WRITE');\n\n editorCtrl.toggleKeyboardShortcutsModal = function() {\n editorCtrl.showCheatsheet = !editorCtrl.showCheatsheet;\n };\n\n editorCtrl.versionPage = function() {\n return UrlService.PROJECT_PAGE(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug);\n };\n\n editorCtrl.encodeDocId = function(docId) {\n return DocumentService.encodeDocId(docId);\n };\n\n ProjectService.getProjectInfo($stateParams.projectSlug).then(\n function(projectInfo) {\n editorCtrl.projectInfo = projectInfo;\n },\n function(error) {\n MessageHandler.displayError('Error getting project ' +\n 'information:' + error);\n });\n\n LocaleService.getSupportedLocales(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(locales) {\n editorCtrl.locales = locales;\n if (!editorCtrl.locales || editorCtrl.locales.length <= 0) {\n //redirect if no supported locale in version\n MessageHandler.displayError('No supported locales in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if localeId is not defined in url, set to first from list\n var selectedLocaleId = $state.params.localeId;\n var context = editorCtrl.context;\n\n if (!selectedLocaleId) {\n context.localeId = editorCtrl.locales[0].localeId;\n transitionToEditorSelectedView();\n } else {\n context.localeId = selectedLocaleId;\n if (!LocaleService.containsLocale(editorCtrl.locales,\n selectedLocaleId)) {\n context.localeId = editorCtrl.locales[0].localeId;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting locale list: ' + error);\n });\n\n DocumentService.findAll(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(documents) {\n editorCtrl.documents = documents;\n\n if (!editorCtrl.documents || editorCtrl.documents.length <= 0) {\n //redirect if no documents in version\n MessageHandler.displayError('No documents in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if docId is not defined in url, set to first from list\n var selectedDocId = $state.params.docId,\n context = editorCtrl.context;\n if (!selectedDocId) {\n context.docId = editorCtrl.documents[0].name;\n transitionToEditorSelectedView();\n } else {\n context.docId = DocumentService.decodeDocId(selectedDocId);\n if (!DocumentService.containsDoc(editorCtrl.documents,\n context.docId)) {\n context.docId = editorCtrl.documents[0].name;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting document list: ' + error);\n });\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorCtrl.unitSelected = data.id;\n editorCtrl.focused = data.focus;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n editorCtrl.unitSelected = false;\n editorCtrl.focused = false;\n });\n\n $rootScope.$on(EventService.EVENT.REFRESH_STATISTIC,\n function (event, data) {\n\n loadStatistic(data.projectSlug, data.versionSlug, data.docId,\n data.localeId);\n\n editorCtrl.context.docId = data.docId;\n editorCtrl.context.localeId = data.localeId;\n });\n\n editorCtrl.pageNumber = function() {\n if(EditorService.maxPageIndex === 0) {\n return EditorService.currentPageIndex + 1;\n } else {\n return (EditorService.currentPageIndex + 1) + ' of ' +\n (EditorService.maxPageIndex + 1);\n }\n };\n\n editorCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n editorCtrl.firstPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_FIRST_PAGE);\n };\n\n editorCtrl.lastPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_LAST_PAGE);\n };\n\n\n editorCtrl.nextPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_PAGE);\n };\n\n editorCtrl.previousPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_PREV_PAGE);\n };\n\n editorCtrl.resetFilter = function() {\n resetFilter(true);\n };\n\n editorCtrl.updateFilter = function() {\n updateFilter(true);\n };\n\n function updateFilter(fireEvent) {\n if(isStatusSame(editorCtrl.filter.status)) {\n resetFilter(fireEvent);\n } else {\n editorCtrl.filter.status.all = false;\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n }\n\n function resetFilter(fireEvent) {\n editorCtrl.filter.status.all = true;\n editorCtrl.filter.status.approved = false;\n editorCtrl.filter.status.translated = false;\n editorCtrl.filter.status.needsWork = false;\n editorCtrl.filter.status.untranslated = false;\n\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n\n function isStatusSame(statuses) {\n return statuses.approved === statuses.translated &&\n statuses.translated === statuses.needsWork &&\n statuses.needsWork === statuses.untranslated;\n }\n\n function transitionToEditorSelectedView() {\n if (isDocumentAndLocaleSelected()) {\n $state.go('editor.selectedContext', {\n 'docId': editorCtrl.context.docId,\n 'localeId': editorCtrl.context.localeId\n });\n }\n }\n\n function isDocumentAndLocaleSelected() {\n return editorCtrl.context.docId && editorCtrl.context.localeId;\n }\n\n /**\n * Load document statistics (word and message)\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function loadStatistic(projectSlug, versionSlug, docId, localeId) {\n DocumentService.getStatistics(projectSlug, versionSlug, docId, localeId)\n .then(function(statistics) {\n editorCtrl.wordStatistic = StatisticUtil\n .getWordStatistic(statistics);\n editorCtrl.messageStatistic = StatisticUtil\n .getMsgStatistic(statistics);\n },\n function(error) {\n MessageHandler.displayError('Error loading statistic: ' + error);\n });\n }\n\n this.settings = UserService.settings.editor;\n\n EditorShortcuts.enableEditorKeys();\n }\n\n angular\n .module('app')\n .controller('EditorCtrl', EditorCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorDetailsCtrl.js\n * @ngInject\n */\n function EditorDetailsCtrl() {\n var editorDetailsCtrl = this;\n\n return editorDetailsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorDetailsCtrl', EditorDetailsCtrl);\n})();\n","(function () {\n 'use strict';\n\n /**\n * EditorService.js\n * //TODO: parse editorContext in functions\n * @ngInject\n */\n function EditorService($rootScope, $resource, _, UrlService,\n EventService, PhraseService, PhraseUtil, DocumentService, MessageHandler,\n TransStatusService) {\n var editorService = this,\n queue = {};\n\n editorService.context = {};\n\n editorService.currentPageIndex = 0;\n editorService.maxPageIndex = 0;\n\n editorService.initContext =\n function (projectSlug, versionSlug, docId, srcLocale, localeId, mode) {\n editorService.context = {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n srcLocale: srcLocale,\n localeId: localeId,\n mode: mode // READ_WRITE, READ_ONLY, REVIEW\n };\n return editorService.context;\n };\n\n editorService.updateContext = function(projectSlug, versionSlug, docId,\n localeId) {\n if(editorService.context.projectSlug !== projectSlug) {\n editorService.context.projectSlug = projectSlug;\n }\n if(editorService.context.versionSlug !== versionSlug) {\n editorService.context.versionSlug = versionSlug;\n }\n if(editorService.context.docId !== docId) {\n editorService.context.docId = docId;\n }\n if(editorService.context.localeId !== localeId) {\n editorService.context.localeId = localeId;\n }\n };\n\n /**\n * EventService.EVENT.SAVE_TRANSLATION listener\n * Perform save translation with given status\n *\n * - queue save translation request (1 global queue, 1 for each TU)\n * - if queue contains request id, replace old request with new request\n */\n $rootScope.$on(EventService.EVENT.SAVE_TRANSLATION,\n function (event, data) {\n var phrase = data.phrase,\n status = data.status;\n if (!needToSavePhrase(phrase, status)) {\n // nothing has changed\n return;\n }\n\n //update pending queue if contains\n if (_.has(queue, phrase.id)) {\n var pendingRequest = queue[phrase.id];\n pendingRequest.phrase = phrase;\n pendingRequest.status = status;\n } else {\n status = resolveTranslationState(phrase, status);\n queue[phrase.id] = {\n 'phrase': phrase,\n 'status': status,\n 'locale': data.locale,\n 'docId': data.docId\n };\n }\n EventService.emitEvent(EventService.EVENT.SAVE_INITIATED, data);\n processSaveRequest(phrase.id);\n });\n\n function needToSavePhrase(phrase, status) {\n return PhraseUtil.hasTranslationChanged(phrase) ||\n phrase.status !== status;\n }\n\n // Process save translation request\n function processSaveRequest(id) {\n var context = _.cloneDeep(editorService.context);\n\n var request = queue[id];\n\n var Translation = $resource(UrlService.TRANSLATION_URL, {}, {\n update: {\n method: 'PUT',\n params: {\n localeId: request.locale\n }\n }\n });\n var data = {\n id: request.phrase.id,\n revision: request.phrase.revision || 0,\n content: request.phrase.newTranslations[0],\n contents: request.phrase.newTranslations,\n // Return status object to PascalCase Id for the server\n status: TransStatusService.getServerId(request.status.ID),\n plural: request.phrase.plural\n };\n\n Translation.update(data).$promise.then(\n function(response) {\n var oldStatus = request.phrase.status.ID;\n\n PhraseService.onTransUnitUpdated(context, data.id, request.locale,\n response.revision, response.status, request.phrase);\n\n DocumentService.updateStatistic(context.projectSlug,\n context.versionSlug, request.docId, request.locale,\n oldStatus, TransStatusService.getId(response.status),\n request.phrase.wordCount);\n\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n },\n function(response) {\n MessageHandler.displayWarning('Update translation failed for ' +\n data.id + ' -' + response);\n PhraseService.onTransUnitUpdateFailed(data.id);\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n });\n delete queue[id];\n }\n\n function resolveTranslationState(phrase, requestStatus) {\n if (_.isEmpty(_.compact(phrase.newTranslations))) {\n return TransStatusService.getStatusInfo('UNTRANSLATED');\n }\n return requestStatus;\n }\n\n return editorService;\n }\n\n angular\n .module('app')\n .factory('EditorService', EditorService);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * @name EditorShortcuts\n * @description service for editor keyboard shortcuts\n * @ngInject\n */\n function EditorShortcuts(EventService, $stateParams, _, hotkeys, PhraseUtil,\n TransStatusService, Mousetrap, str, $window) {\n var editorShortcuts = this,\n inSaveAsMode = false;\n\n // this will be set by TransUnitService\n // on EVENT.SELECT_TRANS_UNIT and unset on EVENT.CANCEL_EDIT\n editorShortcuts.selectedTUCtrl = null;\n\n function copySourceCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': editorShortcuts.selectedTUCtrl.getPhrase()});\n }\n }\n\n function gotoNextRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_ROW,\n currentContext());\n }\n }\n\n function gotoPreviousRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_PREVIOUS_ROW,\n currentContext());\n }\n }\n\n function cancelEditCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (inSaveAsMode) {\n editorShortcuts.cancelSaveAsModeIfOn();\n if (editorShortcuts.selectedTUCtrl) {\n editorShortcuts.selectedTUCtrl.focusTranslation();\n }\n } else if (editorShortcuts.selectedTUCtrl) {\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n // if it has changed translation, undo edit\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase);\n } else {\n // otherwise cancel edit\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase);\n }\n }\n }\n\n function saveAsCurrentButtonOptionCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n /**\n * This is to mimic sequence shortcut.\n * e.g. press ctlr-shift-s then press 'n' to save as\n * 'needs work'.\n */\n function saveAsModeCallback(event) {\n event.preventDefault();\n editorShortcuts.cancelSaveAsModeIfOn();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase) {\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': phrase.id,\n 'open': true\n });\n\n addSaveAsModeExtensionKey(phrase, 'n', 'needsWork');\n addSaveAsModeExtensionKey(phrase, 't', 'translated');\n addSaveAsModeExtensionKey(phrase, 'a', 'approved');\n }\n }\n\n /**\n * mod will be replaced by ctrl if on windows/linux or cmd if on mac.\n * By default it listens on keydown event.\n */\n editorShortcuts.SHORTCUTS = {\n COPY_SOURCE: new ShortcutInfo(\n 'alt+c', copySourceCallback, 'Copy source as translation', 'alt+g'),\n\n CANCEL_EDIT: new ShortcutInfo('esc', cancelEditCallback, 'Cancel edit'),\n\n SAVE_AS_CURRENT_BUTTON_OPTION: new ShortcutInfo(\n 'mod+s', saveAsCurrentButtonOptionCallback, 'Save'),\n\n SAVE_AS_MODE: new ShortcutInfo(\n 'mod+shift+s', saveAsModeCallback, 'Save as…'),\n\n // this is just so we can show it in cheatsheet.\n // see app/editor/EditorCtrl.shortcuts\n SAVE_AS_NEEDSWORK: {\n keyCombos: [{combo: 'mod+shift+s n', description: 'Save as needs work'}]\n },\n\n SAVE_AS_TRANSLATED: {\n keyCombos: [{combo: 'mod+shift+s t', description: 'Save as translated'}]\n },\n\n SAVE_AS_APPROVED: {\n keyCombos: [{combo: 'mod+shift+s a', description: 'Save as approved'}]\n },\n\n GOTO_NEXT_ROW_FAST: new ShortcutInfo(\n 'mod+enter', gotoNextRowCallback,\n 'Save (if changed) and go to next string',\n ['alt+k', 'alt+down']),\n\n GOTO_PREVIOUS_ROW: new ShortcutInfo(\n 'mod+shift+enter', gotoPreviousRowCallback,\n 'Save (if changed) and go to previous string',\n ['alt+j', 'alt+up'])\n /*\n Disable for now until status navigation implementation\n GOTO_NEXT_UNTRANSLATED: new ShortcutInfo(\n 'tab+u', gotoToNextUntranslatedCallback)\n */\n };\n\n /*\n Disable for now until status navigation implementation\n\n function gotoToNextUntranslatedCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (editorShortcuts.selectedTUCtrl) {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n currentContext());\n }\n // the shortcut is a tab + u combination\n // we don't want other tab event to trigger\n tabCombinationPressed = true;\n }\n */\n\n /**\n *\n * @param {string} defaultKey default key combo for a shortcut\n * @param {function} callback callback to execute\n * @param {string} [description]\n * optional. If not empty will apply to default key (shows in cheatsheet)\n * @param {(string|string[])} [otherKeys]\n * optional other keys that will do the same (won't show in cheatsheet)\n * @param {string} [action] optional event to listen to. e.g. 'keyup'\n * @returns {EditorShortcuts.ShortcutInfo}\n * @constructor\n */\n function ShortcutInfo(defaultKey, callback, description, otherKeys, action)\n {\n this.defaultKey = defaultKey;\n this.keyCombos = [\n singleKeyConfig(defaultKey, description, action, callback)\n ];\n if (otherKeys) {\n this.otherKeys = otherKeys instanceof Array ? otherKeys : [otherKeys];\n this.keyCombos.push(\n singleKeyConfig(this.otherKeys, '', action, callback));\n }\n return this;\n }\n\n function singleKeyConfig(combo, description, action, callback) {\n var keyConfig = {\n allowIn: ['TEXTAREA'],\n callback: callback\n };\n keyConfig.combo = combo;\n if (description) {\n keyConfig.description = description;\n }\n if (action) {\n keyConfig.action = action;\n }\n return keyConfig;\n }\n\n editorShortcuts.enableEditorKeys = function () {\n // here we only check copy source shortcut since we always enable keys in\n // bundle.\n if (!hotkeys.get(editorShortcuts.SHORTCUTS.COPY_SOURCE.defaultKey)) {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n if (value instanceof ShortcutInfo) { // a hack to handle sequence keys\n enableShortcut(value);\n }\n });\n }\n };\n\n editorShortcuts.disableEditorKeys = function () {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n _.forEach(value.keyCombos, function(hotkey) {\n editorShortcuts.deleteKeys(hotkey.combo, hotkey.action);\n });\n });\n };\n\n function enableShortcut(shortcutInfo) {\n if (!hotkeys.get(shortcutInfo.defaultKey)) {\n _.forEach(shortcutInfo.keyCombos,\n function(combo) {\n hotkeys.add(combo);\n });\n }\n }\n\n function currentContext() {\n return {\n 'currentId': editorShortcuts.selectedTUCtrl.getPhrase().id\n };\n }\n\n function addSaveAsModeExtensionKey(phrase, combo, status) {\n var statusInfo = TransStatusService.getStatusInfo(status);\n return hotkeys.add({\n combo: combo,\n description: str.sprintf('Save as %s', status),\n allowIn: ['INPUT', 'TEXTAREA'],\n action: 'keydown',\n callback: function (event) {\n editorShortcuts.saveTranslationCallBack(event, phrase, statusInfo);\n }\n });\n }\n\n editorShortcuts.saveTranslationCallBack = function(event, phrase,\n statusInfo) {\n inSaveAsMode = true;\n\n event.preventDefault();\n event.stopPropagation();\n\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': statusInfo,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n editorShortcuts.cancelSaveAsModeIfOn();\n };\n\n editorShortcuts.cancelSaveAsModeIfOn = function() {\n if (inSaveAsMode && editorShortcuts.selectedTUCtrl) {\n inSaveAsMode = false;\n editorShortcuts.deleteKeys(['n', 't', 'a']);\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': editorShortcuts.selectedTUCtrl.getPhrase().id,\n 'open': false\n });\n }\n };\n\n /**\n * This is a workaround for augular-hotkeys not being able to delete hotkey.\n * @see https://github.com/chieffancypants/angular-hotkeys/issues/100\n *\n * @param {(string|string[])} keys single key or array of keys to be deleted\n * @param {string} [action='keydown'] 'keyup' or 'keydown' etc.\n */\n editorShortcuts.deleteKeys = function(keys, action) {\n var keysToDelete = keys instanceof Array ? keys : [keys];\n action = action || 'keydown';\n _.forEach(keysToDelete, function(key) {\n hotkeys.del(key);\n Mousetrap.unbind(key, action);\n });\n };\n\n /**\n * Copied from angular-hotkeys.\n * Convert strings like cmd into symbols like ⌘\n * @param {String} combo Key combination, e.g. 'mod+f'\n * @return {String} The key combination with symbols\n */\n editorShortcuts.symbolizeKey = function (combo) {\n var map = {\n command: '⌘',\n shift: '⇧',\n left: '←',\n right: '→',\n up: '↑',\n down: '↓',\n 'return': '↩',\n backspace: '⌫'\n };\n combo = combo.split('+');\n\n for (var i = 0; i < combo.length; i++) {\n // try to resolve command / ctrl based on OS:\n if (combo[i] === 'mod') {\n if ($window.navigator &&\n $window.navigator.platform.indexOf('Mac') >= 0) {\n combo[i] = 'command';\n } else {\n combo[i] = 'ctrl';\n }\n }\n\n combo[i] = map[combo[i]] || combo[i];\n }\n\n return combo.join(' + ');\n };\n\n return editorShortcuts;\n }\n\n angular\n .module('app')\n .factory('EditorShortcuts', EditorShortcuts);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * EditorSuggestionsCtrl.js\n * @ngInject\n */\n function EditorSuggestionsCtrl() {\n var editorSuggestionsCtrl = this;\n\n return editorSuggestionsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorSuggestionsCtrl', EditorSuggestionsCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name blur-on\n * @description When you put attribute 'blur-on=\"something\"',\n * you can then blur this element. It works the same way as focus-on library.\n */\n function blurOn() {\n return {\n restrict: 'A',\n link: function(scope, elem, attr) {\n return scope.$on('blurOn', function (e, name) {\n if (name === attr.blurOn) {\n return elem[0].blur();\n }\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('blurOn', blurOn);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name clickElsewhere\n * @description Initiate expression when clicking somewhere else\n * @ngInject\n */\n function clickElsewhere($document) {\n return {\n restrict: 'A',\n scope: {\n callback: '&clickElsewhere'\n },\n link: function(scope, element) {\n var handler = function(e) {\n if (!element[0].contains(e.target)) {\n scope.$apply(scope.callback(e));\n }\n };\n\n $document.on('click', handler);\n\n scope.$on('$destroy', function() {\n $document.off('click', handler);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('clickElsewhere', clickElsewhere);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle server communication on document related\n * information in project-version.\n *\n * DocumentService.js\n * @ngInject\n */\n function DocumentService($q, $resource, UrlService, StringUtil,\n StatisticUtil, EventService, _, TransStatusService) {\n var documentService = this,\n statisticMap = {};\n\n /**\n * Finds all documents in given project version\n *\n * @param _projectSlug\n * @param _versionSlug\n * @returns {$promise|*|N.$promise}\n */\n documentService.findAll = function findAll(_projectSlug, _versionSlug) {\n var Documents = $resource(UrlService.DOCUMENT_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug\n },\n isArray: true\n }\n });\n return Documents.query().$promise;\n };\n\n /**\n * Get statistic of document in locale (word and message)\n *\n * @param _projectSlug\n * @param _versionSlug\n * @param _docId\n * @param _localeId\n * @returns {*}\n */\n documentService.getStatistics = function (_projectSlug, _versionSlug,\n _docId, _localeId) {\n if (_docId && _localeId) {\n var key = generateStatisticKey(_docId, _localeId);\n if (_.has(statisticMap, key)) {\n return $q.when(statisticMap[key]);\n } else {\n var encodedDocId = documentService.encodeDocId(_docId);\n var Statistics = $resource(UrlService.DOC_STATISTIC_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug,\n docId: encodedDocId,\n localeId: _localeId\n },\n isArray: true\n }\n });\n return Statistics.query().$promise.then(function(statistics) {\n\n // Make needReview(server) available to needswork\n _.forEach(statistics, function(statistic) {\n statistic[TransStatusService.getId('needswork')] =\n statistic.needReview || 0;\n });\n\n statisticMap[key] = statistics;\n return statisticMap[key];\n });\n }\n }\n };\n\n /**\n * Encode docId, replace '/' with ',' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.encodeDocId = function(docId) {\n return docId ? docId.replace(/\\//g, ',') : docId;\n };\n\n /**\n * Encode docId, replace ',' with '/' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.decodeDocId = function(docId) {\n return docId ? docId.replace(/\\,/g, '/') : docId;\n };\n\n documentService.containsDoc = function (documents, docId) {\n return _.any(documents, function(document) {\n return StringUtil.equals(document.name, docId, true);\n });\n };\n\n documentService.updateStatistic = function(projectSlug, versionSlug, docId,\n localeId, oldState,\n newState, wordCount) {\n var key = generateStatisticKey(docId, localeId);\n if(_.has(statisticMap, key)) {\n adjustStatistic(statisticMap[key], oldState, newState,\n wordCount);\n\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n localeId: localeId\n }\n );\n }\n };\n\n //Generate unique key from docId and localeId for statistic cache\n function generateStatisticKey(docId, localeId) {\n return docId + '-' + localeId;\n }\n\n /**\n * Adjust statistic based on translation change of state\n * word - -wordCount of oldState, +wordCount of newState\n * msg - -1 of oldState, +1 of newState\n */\n function adjustStatistic(statistics, oldState, newState, wordCount) {\n\n var wordStatistic = StatisticUtil.getWordStatistic(statistics),\n msgStatistic = StatisticUtil.getMsgStatistic(statistics);\n\n if(wordStatistic) {\n wordCount = parseInt(wordCount);\n var wordOldState = parseInt(wordStatistic[oldState]) - wordCount;\n wordStatistic[oldState] = wordOldState < 0 ? 0 : wordOldState;\n wordStatistic[newState] = parseInt(wordStatistic[newState]) + wordCount;\n }\n\n if(msgStatistic) {\n var msgOldState = parseInt(msgStatistic[oldState]) - 1;\n msgStatistic[oldState] = msgOldState < 0 ? 0 : msgOldState;\n msgStatistic[newState] = parseInt(msgStatistic[newState]) + 1;\n }\n }\n\n return documentService;\n }\n\n angular\n .module('app')\n .factory('DocumentService', DocumentService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name DropdownCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function DropdownCtrl($scope, $attrs, $parse, dropdownConfig,\n DropdownService, $animate, $timeout) {\n var dropdownCtrl = this,\n // create a child scope so we are not polluting original one\n scope = $scope.$new(),\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ?\n $parse($attrs.onToggle) : angular.noop;\n\n this.init = function(element) {\n dropdownCtrl.$element = element;\n\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return dropdownCtrl.toggleElement;\n };\n\n scope.focusToggleElement = function() {\n if (dropdownCtrl.toggleElement) {\n dropdownCtrl.toggleElement[0].focus();\n }\n };\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n $animate[isOpen ? 'addClass' : 'removeClass']\n (dropdownCtrl.$element, openClass);\n\n if (isOpen) {\n // need to wrap it in a timeout\n // see http://stackoverflow.com/questions/12729122/\n // prevent-error-digest-already-in-progress-when-calling-scope-apply\n $timeout(function() {\n scope.focusToggleElement();\n });\n DropdownService.open(scope);\n } else {\n DropdownService.close(scope);\n }\n\n setIsOpen($scope, isOpen);\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, {\n open: !!isOpen\n });\n }\n });\n\n $scope.$on('$locationChangeSuccess', function() {\n scope.isOpen = false;\n });\n\n $scope.$on('$destroy', function() {\n scope.$destroy();\n });\n\n $scope.$on('openDropdown', function() {\n scope.isOpen = true;\n });\n\n $scope.$on('closeDropdown', function() {\n scope.isOpen = false;\n });\n }\n\n angular\n .module('app')\n .controller('DropdownCtrl', DropdownCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdownService\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n\n function DropdownService($document) {\n var openScope = null,\n dropdownService = this;\n\n dropdownService.open = function(dropdownScope) {\n if (!openScope) {\n $document.bind('click', closeDropdown);\n $document.bind('keydown', escapeKeyBind);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n };\n\n dropdownService.close = function(dropdownScope) {\n if (openScope === dropdownScope) {\n openScope = null;\n $document.unbind('click', closeDropdown);\n $document.unbind('keydown', escapeKeyBind);\n }\n };\n\n var closeDropdown = function(evt) {\n if (!openScope) {\n return;\n }\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.$apply(function() {\n openScope.isOpen = false;\n });\n };\n\n var escapeKeyBind = function(evt) {\n if (evt.which === 27) {\n openScope.focusToggleElement();\n closeDropdown();\n }\n };\n }\n\n angular\n .module('app')\n .service('DropdownService', DropdownService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name Dropdown\n *\n * @description\n * Custom module for dropdowns\n *\n */\n var dropdownConfig = {\n openClass: 'is-active'\n };\n\n angular\n .module('app')\n .constant('dropdownConfig', dropdownConfig);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdown\n *\n * @description\n * Main dropdown container\n *\n */\n\n function dropdown() {\n return {\n restrict: 'EA',\n controller: 'DropdownCtrl',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init(element);\n }\n };\n }\n\n function onCloseDropdown() {\n return {\n restrict: 'A',\n require: '?^dropdown',\n scope: {\n callback: '&onCloseDropdown'\n },\n link: function(scope, elem, attrs, dropdownCtrl) {\n dropdownCtrl.onCloseDropdown = scope.callback;\n }\n };\n }\n\n /**\n * @name dropdown-toggle\n *\n * @description\n * Main dropdown toggle\n *\n */\n\n function dropdownToggle() {\n return {\n restrict: 'EA',\n require: '?^dropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.bind('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n if (dropdownCtrl.onCloseDropdown && !isOpen) {\n scope.$applyAsync(dropdownCtrl.onCloseDropdown);\n }\n });\n\n scope.$on('$destroy', function() {\n element.unbind('click', toggleDropdown);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('dropdown', dropdown)\n .directive('onCloseDropdown', onCloseDropdown)\n .directive('dropdownToggle', dropdownToggle);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * EventService.js\n * Broadcast events service in app.\n * Usage: EventService.emitEvent( event, data, scope)\n * See EventService.emitEvent\n *\n * @ngInject\n */\n function EventService($rootScope) {\n var eventService = this;\n eventService.EVENT = {\n /**\n * Loading Events\n *\n * Broadcast from AppConfig\n */\n LOADING_START: 'loadingStart',\n LOADING_STOP: 'loadingStop',\n\n /**\n * scroll to trans unit\n * data: {id: number, updateURL: boolean, focus: boolean}\n * id: (transunit id),\n * updateURL: (flag on whether to update url with trans unit id)\n * focus: flag on whether to have row in view and focused\n */\n SELECT_TRANS_UNIT: 'selectTransUnit',\n\n //data: {phrase: Phrase, sourceIndex:sourceIndex}\n COPY_FROM_SOURCE: 'copyFromSource',\n\n //data: {phrase: Phrase}\n UNDO_EDIT: 'undoEdit',\n\n //data: {phrase: Phrase}\n CANCEL_EDIT: 'cancelEdit',\n\n //data:phrase\n FOCUS_TRANSLATION: 'focusTranslation',\n\n /**\n * data: {\n * phrase: Phrase, status: StatusInfo, locale: string, docId: string\n * }\n * phrase:\n * status: Object. Request save state\n * locale: target locale\n * docId: docId\n */\n SAVE_TRANSLATION: 'saveTranslation',\n\n /**\n * Translation save in this editor is being sent to the server and\n * is waiting on a response.\n */\n SAVE_INITIATED: 'saveInitiated',\n\n /**\n * Translation save in this editor has been completed\n * (Server has responded with a success or error).\n */\n SAVE_COMPLETED: 'saveCompleted',\n\n /**\n * The text in the translation editor textbox has been edited and\n * not yet saved.\n */\n TRANSLATION_TEXT_MODIFIED: 'translationTextModified',\n\n /**\n * refresh ui statistic - changes in doc or locale\n *\n * data: {projectSlug: string, versionSlug: string,\n * docId: string, localeId: string}\n */\n REFRESH_STATISTIC: 'refreshStatistic',\n\n GOTO_PREV_PAGE: 'gotoPreviousPage',\n\n GOTO_NEXT_PAGE: 'gotoNextPage',\n\n GOTO_FIRST_PAGE: 'gotoFirstPage',\n\n GOTO_LAST_PAGE: 'gotoLastPage',\n\n /**\n * data: { currentId: number }\n */\n GOTO_NEXT_ROW: 'gotoNextRow',\n GOTO_PREVIOUS_ROW: 'gotoPreviousRow',\n GOTO_NEXT_UNTRANSLATED: 'gotoNextUntranslated',\n\n /**\n * Toggle save as options dropdown.\n * data: {id: number, open: boolean}\n */\n TOGGLE_SAVE_OPTIONS: 'openSaveOptions',\n\n\n /**\n * data: {filter: refer to editorCtrl.filter}\n */\n FILTER_TRANS_UNIT: 'filterTransUnit'\n };\n\n /**\n * Firing an event downwards of scope\n *\n * @param event - eventService.EVENT type\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.broadcastEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$broadcast(event, data);\n };\n\n /**\n * Firing an event upwards of scope\n *\n * @param event - eventService.EVENT types\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.emitEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$emit(event, data);\n };\n\n return eventService;\n }\n\n angular\n .module('app')\n .factory('EventService', EventService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name icon\n * @description declarative svg icons\n * @ngInject\n */\n function icon($sce) {\n return {\n restrict: 'E',\n required: ['name'],\n scope: {\n name: '@',\n title: '@',\n size: '@'\n },\n // templateUrl: 'components/icon/icon.html',\n link: function(scope, element) {\n var svg = '',\n titleHtml = '';\n\n element.addClass('Icon');\n\n if (scope.title) {\n titleHtml = '' + scope.title + '';\n }\n\n // Stupid hack to make svg work\n svg = '' +\n '' +\n '' +\n titleHtml +\n '';\n element.html($sce.trustAsHtml(svg));\n }\n };\n }\n\n angular\n .module('app')\n .directive('icon', icon);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle locales related information.\n *\n * LocaleService.js\n * @ngInject\n */\n function LocaleService(UrlService, StringUtil, FilterUtil, $resource, _) {\n\n var locales = [];\n\n /**\n * Get project-version supported locales\n * @param projectSlug\n * @param versionSlug\n * @returns {$promise|*}\n */\n function getSupportedLocales(projectSlug, versionSlug) {\n\n var Locales = $resource(UrlService.LOCALE_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug\n },\n isArray: true\n }\n });\n\n return Locales.query().$promise;\n }\n\n //Returns all locales supported in Zanata instance\n function getAllLocales() {\n var Locales = $resource(UrlService.ALL_LOCALE_URL, {}, {\n query: {\n method: 'GET',\n isArray: true\n }\n });\n return Locales.query().$promise.then(function(results) {\n locales = FilterUtil.cleanResourceList(results);\n });\n }\n\n function getUILocaleList() {\n var list = $resource(UrlService.uiTranslationListURL, {}, {\n query: {\n method: 'GET'\n }\n });\n\n return list.query().$promise;\n }\n\n function getLocaleByLocaleId(locales, localeId) {\n if(locales) {\n return _.find(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n }\n\n function containsLocale (locales, localeId) {\n return _.any(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n\n function getName(localeId) {\n var locale = getLocaleByLocaleId(locales, localeId);\n if(locale) {\n return locale.name;\n }\n return localeId;\n }\n\n return {\n getSupportedLocales : getSupportedLocales,\n getUILocaleList : getUILocaleList,\n getLocaleByLocaleId : getLocaleByLocaleId,\n getAllLocales : getAllLocales,\n containsLocale : containsLocale,\n getName : getName,\n DEFAULT_LOCALE: {\n 'localeId' : 'en-US',\n 'name' : 'English'\n }\n };\n }\n\n angular\n .module('app')\n .factory('LocaleService', LocaleService);\n})();\n","(function() {\n\n 'use strict';\n\n /**\n * @name logoLoader\n *\n * @description\n * Logo that is activated on global loading state\n *\n * @ngInject\n */\n function logoLoader(EventService) {\n return {\n restrict: 'EA',\n scope: {\n loading: '=',\n inverted: '='\n },\n link: function(scope) {\n scope.classes = '';\n\n scope.$on(EventService.EVENT.LOADING_START, function() {\n scope.classes += ' is-loading';\n });\n\n scope.$on(EventService.EVENT.LOADING_STOP, function() {\n scope.classes = scope.classes.replace('is-loading', '');\n });\n\n scope.$watch('inverted', function(newInverted) {\n if (newInverted) {\n scope.classes += ' LogoLoader--inverted';\n } else {\n scope.classes = scope.classes.replace('LogoLoader--inverted', '');\n }\n });\n },\n templateUrl: 'components/logo-loader/logo-loader.html'\n };\n }\n\n angular\n .module('app')\n .directive('logoLoader', logoLoader);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * MessageHandler.js\n * @ngInject\n */\n function MessageHandler() {\n return {\n displayError: function(msg) {\n console.error(msg);\n },\n displayWarning: function(msg) {\n console.warn(msg);\n },\n displayInfo: function(msg) {\n console.info(msg);\n }\n };\n }\n\n angular\n .module('app')\n .factory('MessageHandler', MessageHandler);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle notification in editor\n *\n * NotificationService.js\n * @ngInject\n */\n function NotificationService() {\n\n }\n\n angular\n .module('app')\n .factory('NotificationService', NotificationService);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * PhraseCache.js\n * Stores textflow, states in local cache.\n * TODO: use angular-data for storage\n * @ngInject\n */\n function PhraseCache($q, $resource, FilterUtil, UrlService, DocumentService,\n _) {\n var phraseCache = this,\n states = {}, //ids and states of all tu in order\n transUnits = {};\n\n phraseCache.getStates =\n function (projectSlug, versionSlug, documentId, localeId) {\n var key = generateKey(projectSlug, versionSlug, documentId, localeId);\n if (_.has(states, key)) {\n return $q.when(states[key]);\n } else {\n var encodedDocId = DocumentService.encodeDocId(documentId);\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: encodedDocId,\n localeId: localeId\n },\n isArray: true\n }\n },\n States = $resource(UrlService.TRANSLATION_STATUS_URL, {}, methods);\n return States.query().$promise.then(function (state) {\n state = FilterUtil.cleanResourceList(state);\n states[key] = state;\n return states[key];\n });\n }\n };\n\n phraseCache.getTransUnits = function (ids, localeId) {\n var results = {},\n missingTUId = [],\n missingLocaleTUId = [];\n ids.forEach(function (id) {\n if (_.has(transUnits, id)) {\n if(transUnits[id][localeId]) {\n results[id] = transUnits[id];\n } else {\n missingLocaleTUId.push(id);\n }\n } else {\n missingTUId.push(id);\n }\n });\n if (_.isEmpty(missingTUId) && _.isEmpty(missingLocaleTUId)) {\n return $q.when(results);\n }\n else {\n var TextFlows, Translations;\n if(!_.isEmpty(missingTUId)) {\n TextFlows = $resource(UrlService.TEXT_FLOWS_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingTUId.join(',')\n }\n }\n });\n }\n if(!_.isEmpty(missingLocaleTUId)) {\n Translations = $resource(UrlService.TRANSLATION_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingLocaleTUId.join(',')\n }\n }\n });\n }\n\n //need to create chain of promises\n if(TextFlows && Translations) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU).\n then(Translations.query().$promise.then(updateCacheWithExistingTU));\n } else if(TextFlows) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU);\n } else if(Translations) {\n return Translations.query().$promise.then(updateCacheWithExistingTU);\n }\n }\n\n function updateCacheWithExistingTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n //push to cache\n transUnits[key][localeId] = newTransUnits[key][localeId];\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n\n function updateCacheWithNewTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n transUnits[key] = newTransUnits[key]; //push to cache\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n };\n\n /**\n * On translation updated from server\n * @param id\n * @param localeId\n * @param revision\n * @param state\n * @param content\n * @param contents\n */\n phraseCache.onTransUnitUpdated =\n function (context, id, localeId, revision, status, phrase) {\n\n var key = generateKey(context.projectSlug, context.versionSlug,\n context.docId, localeId);\n\n var stateEntry = _.find(states[key], function(stateEntry) {\n return stateEntry.id === id;\n });\n //Update states cache\n if(stateEntry) {\n stateEntry.state = status;\n }\n\n //Update transUnits cache\n var translation = transUnits[id][localeId];\n if (!translation) {\n translation = {};\n }\n translation.revision = parseInt(revision);\n translation.state = status;\n translation.contents = phrase.newTranslations.slice();\n };\n\n function generateKey(projectId, versionId, documentId, localeId) {\n return projectId + '-' + versionId + '-' +\n documentId + '-' + localeId;\n }\n\n return phraseCache;\n }\n\n angular\n .module('app')\n .factory('PhraseCache', PhraseCache);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} Phrase\n * @property {number} id text flow id\n * @property {string[]} sources source contents\n * @property {string[]} translations original translation\n * @property {string[]} newTranslations translations in the editor\n * @property {boolean} plural whether it's in plural form\n * @property {StatusInfo} status information about this phrase\n * @property {number} revision translation revision number\n * @property {number} wordCount source word count\n */\n /**\n * @name PhraseService\n * @description Provides a list of phrases for the current document(s)\n *\n * @ngInject\n */\n function PhraseService(FilterUtil, PhraseCache, TransStatusService, _,\n $stateParams) {\n var phraseService = {};\n\n phraseService.phrases = []; //current displayed phrases\n\n // FIXME use an object for all the ID arguments - in general we will only\n // need to modify such an object sporadically when switching document\n // or locale, and it is neater than passing them all\n // around separately.\n\n phraseService.getPhraseCount = function(context, filter) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, context.localeId).then(function(states) {\n var ids = getIds(states, filter.status);\n return ids.length;\n });\n };\n\n /**\n * Fetch each of the text flows appearing in the given states data.\n */\n phraseService.fetchAllPhrase = function (context, filter,\n offset, maxResult) {\n\n var localeId = context.localeId;\n\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(getTransUnits);\n\n function getTransUnits(states) {\n var ids = getIds(states, filter.status);\n if (!isNaN(offset)) {\n if(!isNaN(maxResult)) {\n ids = ids.slice(offset, offset + maxResult);\n } else {\n ids = ids.slice(offset);\n }\n }\n // Reading for chaining promises https://github.com/kriskowal/q\n // (particularly \"Sequences\").\n return PhraseCache.getTransUnits(ids, localeId).\n then(transformToPhrases).then(sortPhrases);\n }\n\n /**\n * Converts text flow data from the API into the form expected in the\n * editor.\n *\n * @returns {Phrase[]}\n */\n function transformToPhrases(transUnits) {\n return _.map(transUnits, function(transUnit, id) {\n var source = transUnit.source,\n trans = transUnit[localeId];\n return {\n id: parseInt(id),\n sources: source.plural ? source.contents : [source.content],\n // Original translation\n translations: extractTranslations(source, trans),\n // Translation from editor\n newTranslations: extractTranslations(source, trans),\n plural: source.plural,\n // Conform the status from the server, return an object\n status: trans ? TransStatusService.getStatusInfo(trans.state) :\n TransStatusService.getStatusInfo('untranslated'),\n revision: trans ? parseInt(trans.revision) : 0,\n wordCount: parseInt(source.wordCount)\n };\n });\n }\n\n function extractTranslations(source, trans) {\n if(source.plural) {\n return trans && trans.contents ? trans.contents.slice() : [];\n }\n return trans ? [trans.content] : [];\n }\n\n function sortPhrases(phrases) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(function(states) {\n phraseService.phrases = _.sortBy(phrases, function(phrase) {\n var index = _.findIndex(states, function(state) {\n return state.id === phrase.id;\n });\n return index >= 0 ? index : phrases.length;\n });\n return phraseService.phrases;\n });\n }\n };\n\n //update phrase,statuses and textFlows with given tu id\n phraseService.onTransUnitUpdated = function(context, id, localeId, revision,\n status, phrase) {\n\n PhraseCache.onTransUnitUpdated(context, id, localeId, revision, status,\n phrase);\n\n var cachedPhrase = findPhrase(id, phraseService.phrases);\n //update phrase if found\n if(cachedPhrase) {\n cachedPhrase.translations = phrase.newTranslations.slice();\n cachedPhrase.revision = revision;\n cachedPhrase.status = TransStatusService.getStatusInfo(status);\n }\n };\n\n //rollback content of phrase\n phraseService.onTransUnitUpdateFailed = function(id) {\n var phrase = findPhrase(id, phraseService.phrases);\n if(phrase) {\n phrase.newTranslations = phrase.translations.slice();\n }\n };\n\n // find next Id from phrases states\n phraseService.findNextId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n nextIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n nextIndex = currentIndex + 1 < states.length ?\n currentIndex + 1 : states.length - 1;\n return states[nextIndex].id;\n });\n };\n\n // find previous id from phrases states\n phraseService.findPreviousId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n previousIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n previousIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : 0;\n return states[previousIndex].id;\n });\n };\n\n // find next phrase with requested status\n phraseService.findNextStatus = function(currentId, status) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (statusList) {\n var currentIndex,\n nextStatusInfo,\n requestStatus = TransStatusService.getStatusInfo(status);\n\n currentIndex = _.findIndex(statusList, function (state) {\n return state.id === currentId;\n });\n\n for (var i = currentIndex + 1; i < statusList.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n statusList[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n return statusList[i].id;\n }\n }\n return currentId;\n });\n };\n\n function findPhrase(id, phrases) {\n return _.find(phrases, function(phrase) {\n return phrase.id === id;\n });\n }\n\n function getIds(resources, states) {\n if(states) {\n resources = FilterUtil.filterResources(resources, ['status'], states);\n }\n return _.map(resources, function (item) {\n return item.id;\n });\n }\n\n // Does not appear to be used anywhere. Removing until phrase-caching code\n // is added.\n // phraseService.findById = function(phraseId) {\n // var deferred = $q.defer();\n // var phrase = phrases[phraseId];\n // deferred.resolve(phrase);\n // return deferred.promise;\n // };\n\n return phraseService;\n }\n\n angular\n .module('app')\n .factory('PhraseService', PhraseService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name progressbar\n * @description progressbar container\n * @ngInject\n */\n function progressbar() {\n return {\n restrict: 'E',\n required: 'progressbarStatistic',\n scope: {\n statistic: '=progressbarStatistic',\n size: '@' //large, full, or empty\n },\n templateUrl: 'components/progressbar/progressbar.html',\n controller: function($scope) {\n /**\n * Need to set to true for complex object watch. Performance issue.\n * https://docs.angularjs.org/api/ng/type/$rootScope.Scope\n */\n $scope.$watch('statistic', function(statistic) {\n if (statistic) {\n $scope.style = getStyle(statistic);\n }\n }, true);\n }\n };\n }\n\n function getStyle(statistic) {\n var total = statistic.total,\n widthApproved = getWidthPercent(statistic.approved, total),\n widthTranslated = getWidthPercent(statistic.translated, total),\n marginLeftTranslated = widthApproved,\n widthNeedsWork = getWidthPercent(statistic.needswork, total),\n marginLeftNeedsWork = widthApproved + widthTranslated,\n widthUntranslated = getWidthPercent(statistic.untranslated, total),\n marginLeftUntranslated = widthApproved +\n widthTranslated + widthNeedsWork,\n style = {};\n\n style.approved = {\n 'width': widthApproved + '%',\n 'marginLeft': 0\n };\n style.translated = {\n 'width': widthTranslated + '%',\n 'marginLeft': marginLeftTranslated + '%'\n };\n style.needsWork = {\n 'width': widthNeedsWork + '%',\n 'marginLeft': marginLeftNeedsWork + '%'\n };\n style.untranslated = {\n 'width': widthUntranslated + '%',\n 'marginLeft': marginLeftUntranslated + '%'\n };\n return style;\n }\n\n function getWidthPercent(value, total) {\n var percent = 0;\n if (value) {\n percent = value / total * 100;\n }\n return percent;\n }\n\n angular\n .module('app')\n .directive('progressbar', progressbar);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle communication with server on Project related information.\n * ProjectService.js\n * @ngInject\n */\n\n function ProjectService(UrlService, $resource) {\n\n /**\n * Get project's information\n *\n * @param projectSlug\n * @returns {$promise|*|N.$promise}\n */\n function getProjectInfo(projectSlug) {\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug\n }\n }\n };\n\n var Locales = $resource(UrlService.PROJECT_URL, {}, methods);\n return Locales.query().$promise;\n }\n\n return {\n getProjectInfo: getProjectInfo\n };\n }\n angular\n .module('app')\n .factory('ProjectService', ProjectService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name display-character\n * @description display whitespace character with symbol(HTML),\n * *NOTE*, need to wrap around
 tag\n   * @ngInject\n   */\n  function renderWhitespaceCharacters() {\n    var WHITESPACES = {\n      'space' : {\n        'regex' : / /g,\n        'template' : ' '\n      },\n      'newline' : {\n        'regex' : /\\n/g,\n        'template' : '\\n'\n      },\n      'tab' : {\n        'regex' : /\\t/g,\n        'template' : '\\t'\n      }\n    };\n\n    return {\n      restrict: 'A',\n      required: ['ngBind'],\n      scope: {\n        ngBind: '='\n      },\n\n      link: function compile(scope, element) {\n        scope.$watch('ngBind', function (value) {\n          value = replaceChar(value, WHITESPACES.space);\n          value = replaceChar(value, WHITESPACES.newline);\n          value = replaceChar(value, WHITESPACES.tab);\n          element.html(value);\n        });\n      }\n    };\n\n    function replaceChar(value, whitespaceChar) {\n      return value.replace(whitespaceChar.regex, whitespaceChar.template);\n    }\n  }\n\n  angular\n    .module('app')\n    .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * @name ScrollbarWidthCtrl\n   *\n   * @description\n   * Handle dropdown events between directives\n   *\n   * @ngInject\n   */\n  function ScrollbarWidthCtrl() {\n    var scrollbarWidthCtrl = this;\n\n    scrollbarWidthCtrl.init = function() {\n      var container = scrollbarWidthCtrl.container[0],\n          child = scrollbarWidthCtrl.child[0],\n          scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n      scrollbarWidthCtrl.width = scrollbarWidth / 2;\n    };\n\n  }\n\n  angular\n    .module('app')\n    .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * @name scrollbarWidth\n   *\n   * @description\n   * Scrollbar width container\n   * Needed for the controller to reference all properties\n   */\n  function scrollbarWidth() {\n    return {\n      restrict: 'A',\n      controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n      link: function(scope, element, attrs, scrollbarWidthCtrl) {\n        scrollbarWidthCtrl.init(element);\n      }\n    };\n  }\n\n  /**\n   * @name scrollbarWidthElement\n   *\n   * @description\n   * The element to add the scrollbar width to\n   */\n  function scrollbarWidthElement() {\n    return {\n      restrict: 'A',\n      require: '?^scrollbarWidth',\n      link: function(scope, element, attrs, scrollbarWidthCtrl) {\n        if (!scrollbarWidthCtrl) {\n          return;\n        }\n        // Use the attribute to decide which property to set\n        element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n      }\n    };\n  }\n\n  /**\n   * @name scrollbarWidthContainer\n   *\n   * @description\n   * Get the scrollbar container width\n   */\n  function scrollbarWidthContainer() {\n    return {\n      restrict: 'A',\n      require: '?^scrollbarWidth',\n      link: function(scope, element, attrs, scrollbarWidthCtrl) {\n        if (!scrollbarWidthCtrl) {\n          return;\n        }\n        scrollbarWidthCtrl.container = element;\n      }\n    };\n  }\n\n  /**\n   * @name scrollbarWidthChild\n   *\n   * @description\n   * Get the scrollbar child width\n   */\n  function scrollbarWidthChild() {\n    return {\n      restrict: 'A',\n      require: '?^scrollbarWidth',\n      link: function(scope, element, attrs, scrollbarWidthCtrl) {\n        if (!scrollbarWidthCtrl) {\n          return;\n        }\n        scrollbarWidthCtrl.child = element;\n      }\n    };\n  }\n\n  angular\n    .module('app')\n    .directive('scrollbarWidth', scrollbarWidth)\n    .directive('scrollbarWidthElement', scrollbarWidthElement)\n    .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n    .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * @name toggle-checkbox\n   * @description Add an extra element to a checkbox to\n   * so we can style it differently\n   * @ngInject\n   */\n  function toggleCheckbox() {\n    return {\n      restrict: 'A',\n      link: function(scope, element) {\n        element.after('');\n      }\n    };\n  }\n\n  angular\n    .module('app')\n    .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n  'use strict';\n\n  /**\n   * @typedef {Object} StatusInfo\n   * @property {string} ID lower case translation status (content state)\n   * @property {string} NAME capitalized representation\n   * @property {string} CSSCLASS css class to use for this status\n   *\n   */\n  /**\n   * TransStatusService.js\n   *\n   * @ngInject\n   */\n  function TransStatusService(_) {\n    var transStatusService = this,\n        STATUSES = {\n          'UNTRANSLATED': {\n            'ID': 'untranslated',\n            'NAME': 'Untranslated',\n            'CSSCLASS': 'neutral'\n          },\n          'NEEDSWORK': {\n            'ID': 'needswork',\n            'NAME': 'Needs Work',\n            'CSSCLASS': 'unsure'\n          },\n          'TRANSLATED' : {\n            'ID': 'translated',\n            'NAME': 'Translated',\n            'CSSCLASS': 'success'\n          },\n          'APPROVED': {\n            'ID': 'approved',\n            'NAME': 'Approved',\n            'CSSCLASS': 'highlight'\n          }\n        };\n\n    transStatusService.getAll = function() {\n      return STATUSES;\n    };\n\n    transStatusService.getAllAsArray = function() {\n      return _.values(STATUSES);\n    };\n\n    /**\n     *\n     * @param {string} statusKey string representation of the status.\n     * @returns {StatusInfo}\n     */\n    transStatusService.getStatusInfo = function(statusKey) {\n      return STATUSES[conformStatus(statusKey)];\n    };\n\n    transStatusService.getId = function(statusKey) {\n      return STATUSES[conformStatus(statusKey)].ID;\n    };\n\n    transStatusService.getServerId = function(statusId) {\n      return serverStatusId(statusId);\n    };\n\n    transStatusService.getName = function(statusKey) {\n      return STATUSES[conformStatus(statusKey)].NAME;\n    };\n\n    transStatusService.getCSSClass = function(statusKey) {\n      return STATUSES[conformStatus(statusKey)].CSSCLASS;\n    };\n\n    /**\n     * Conform it to uppercase for lookups and\n     * temporary fix for server sending \"needReview\"\n     * instead of needswork status\n     * @param  {string} status\n     * @return {string}        new value to use\n     */\n    function conformStatus(statusKey) {\n      statusKey = angular.uppercase(statusKey);\n      if (!statusKey || statusKey === 'NEW') {\n        statusKey = 'UNTRANSLATED';\n      } else if (statusKey === 'NEEDREVIEW') {\n        statusKey = 'NEEDSWORK';\n      }\n      return statusKey;\n    }\n\n    /**\n     * Conform it to PascalCase for lookups and\n     * temporary fix for server receiving \"needReview\"\n     * instead of needswork status\n     * @param  {string} status\n     * @return {string}        new value to use\n     */\n    function serverStatusId(statusId) {\n      statusId = angular.lowercase(statusId);\n      if (!statusId || statusId === 'untranslated') {\n        return 'New';\n      } else if (statusId === 'needswork') {\n        return 'NeedReview';\n      }\n      return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n    }\n\n    return transStatusService;\n  }\n\n  angular\n    .module('app')\n    .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n  'use strict';\n\n  /**\n   * TransUnitCtrl.js\n   * @ngInject\n   */\n  function TransUnitCtrl($scope, $element, $stateParams, _,\n                         TransUnitService, EventService, LocaleService, focus,\n                         EditorShortcuts, PhraseUtil) {\n\n    var transUnitCtrl = this;\n\n    transUnitCtrl.selected = false;\n    transUnitCtrl.focused = false;\n    transUnitCtrl.focusedTranslationIndex = 0;\n\n    transUnitCtrl.hasTranslationChanged =\n      PhraseUtil.hasTranslationChanged;\n\n    transUnitCtrl.focusTranslation = function() {\n      if(transUnitCtrl.selected) {\n        focus('phrase-' + $scope.phrase.id + '-' +\n        transUnitCtrl.focusedTranslationIndex);\n      }\n    };\n\n    // when user clicked on TU or using tab to nav\n    transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n      transUnitCtrl.focused = true;\n      if (!_.isUndefined(index)) {\n        transUnitCtrl.focusedTranslationIndex = index;\n      }\n      if(!transUnitCtrl.selected) {\n        EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n          {'id': phrase.id,\n            'updateURL': true,\n            'focus': true\n          }, $scope);\n      }\n    };\n\n    transUnitCtrl.translationTextModified = function(phrase) {\n      EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n          phrase);\n    };\n\n    transUnitCtrl.getPhrase = function() {\n      return $scope.phrase;\n    };\n\n    transUnitCtrl.init = function() {\n      TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n      if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n        EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n          {'id': $stateParams.id,\n            'updateURL': false,\n            'focus' : $stateParams.selected});\n      }\n    };\n\n    transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n      $event.stopPropagation(); //prevent click event of TU\n      EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n        {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n    };\n\n    transUnitCtrl.undoEdit = function($event, phrase) {\n      $event.stopPropagation(); //prevent click event of TU\n      EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n        phrase, $scope);\n    };\n\n    transUnitCtrl.cancelEdit = function($event, phrase) {\n      $event.stopPropagation(); //prevent click event of TU\n      EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n        phrase, $scope);\n    };\n\n    transUnitCtrl.saveAs = function($event, phrase, status) {\n      EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n    };\n\n    transUnitCtrl.getLocaleName = function(localeId) {\n      return LocaleService.getName(localeId);\n    };\n\n    transUnitCtrl.toggleSaveAsOptions = function(open) {\n      EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n        {}, $scope);\n      if (open) {\n        // focus on the first dropdown option\n        focus($scope.phrase.id + '-saveAsOption-0');\n      }\n    };\n\n    transUnitCtrl.cancelSaveAsMode = function() {\n      EditorShortcuts.cancelSaveAsModeIfOn();\n    };\n\n    $scope.$on('$destroy', function () {\n      $element.unbind('click', onTransUnitClick);\n      $element.unbind('focus', onTransUnitClick);\n    });\n\n    transUnitCtrl.updateSaveButton = function (phrase) {\n      transUnitCtrl.saveButtonStatus =\n        PhraseUtil.getSaveButtonStatus($scope.phrase);\n      transUnitCtrl.saveButtonOptions =\n        TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n          $scope.phrase);\n      transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n      transUnitCtrl.saveButtonDisabled =\n        !PhraseUtil.hasTranslationChanged(phrase);\n      transUnitCtrl.loadingClass = '';\n      transUnitCtrl.savingStatus = '';\n    };\n\n    transUnitCtrl.phraseSaving = function (data) {\n      transUnitCtrl.loadingClass = 'is-loading';\n      transUnitCtrl.saveButtonStatus =\n        transUnitCtrl.savingStatus = data.status;\n      transUnitCtrl.saveButtonOptions =\n        TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n          data.phrase);\n      transUnitCtrl.saveButtonText = 'Saving…';\n      transUnitCtrl.saveButtonDisabled = true;\n    };\n\n    transUnitCtrl.saveButtonOptionsAvailable = function() {\n      return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n    };\n\n    transUnitCtrl.selectTransUnit = function(phrase) {\n      if (!transUnitCtrl.selected) {\n        EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n                               {'id': phrase.id,\n                                 'updateURL': true,\n                                 'focus': true\n                               }, $scope);\n      }\n    };\n\n    function onTransUnitClick() {\n      if(!transUnitCtrl.selected) {\n        $scope.$apply(function () {\n          EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n            {'id': $scope.phrase.id,\n              'updateURL': true,\n              'focus': true}, $scope);\n        });\n      }\n    }\n\n    return transUnitCtrl;\n  }\n\n  angular\n    .module('app')\n    .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n  'use strict';\n\n  /**\n   * TransUnitService\n   *\n   * See PhraseService.transformToPhrases function for phrase definition.\n   *\n   * @ngInject\n   */\n  function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n    $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n    EditorShortcuts, PhraseUtil, $timeout) {\n    var transUnitService = this,\n        controllerList = {},\n        selectedTUId;\n\n    transUnitService.addController = function(id, controller) {\n      controllerList[id] = controller;\n    };\n\n    transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n      return filterSaveButtonOptions(saveButtonStatus, phrase);\n    };\n\n    $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n      function(event, data) {\n        var transUnitCtrl = controllerList[data.id];\n        if (transUnitCtrl) {\n          transUnitCtrl.toggleSaveAsOptions(data.open);\n        }\n    });\n\n    /**\n     * EventService.EVENT.SELECT_TRANS_UNIT listener\n     * - Select and focus a trans-unit.\n     * - Perform implicit save on previous selected TU if changed\n     * - Update url with TU id without reload state\n     */\n    $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n      function (event, data) {\n        var newTuController = controllerList[data.id],\n            oldTUController = controllerList[selectedTUId],\n            updateURL = data.updateURL;\n\n        if(newTuController) {\n          EditorShortcuts.selectedTUCtrl = newTuController;\n\n          if (selectedTUId && selectedTUId !== data.id) {\n            setSelected(oldTUController, false);\n\n            //perform implicit save if changed\n            if(PhraseUtil.hasTranslationChanged(\n              oldTUController.getPhrase())) {\n              EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n                {\n                  'phrase' : oldTUController.getPhrase(),\n                  'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n                  'locale' : $stateParams.localeId,\n                  'docId'  : $stateParams.docId\n                });\n            }\n          }\n\n          updateSaveButton(event, newTuController.getPhrase());\n          selectedTUId = data.id;\n          setSelected(newTuController, true);\n\n          EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n          //Update url without reload state\n          if(updateURL) {\n            if($state.current.name !== 'editor.selectedContext.tu') {\n              $state.go('editor.selectedContext.tu', {\n                'id': data.id,\n                'selected': data.focus.toString()\n              });\n            } else {\n              $location.search('id', data.id);\n              $location.search('selected', data.focus.toString());\n            }\n          }\n        } else {\n          MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n        }\n      });\n\n    /**\n     * EventService.EVENT.COPY_FROM_SOURCE listener\n     * Copy translation from source\n     */\n    $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n      function (event, data) {\n        var sourceIndex = 0;\n        if(data.phrase.plural) {\n          //clicked copy source button\n          sourceIndex = data.sourceIndex;\n          if(_.isUndefined(sourceIndex)) {\n            //copy source key shortcut, copy corresponding source to target\n            var transUnitCtrl = controllerList[data.phrase.id];\n            sourceIndex = transUnitCtrl.focusedTranslationIndex;\n            if(data.phrase.sources.length <\n              transUnitCtrl.focusedTranslationIndex + 1) {\n              sourceIndex = data.phrase.sources.length - 1;\n            }\n          }\n        }\n        setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n      });\n\n    /**\n     * EventService.EVENT.UNDO_EDIT listener\n     * Cancel edit and restore translation\n     */\n    $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n      function (event, phrase) {\n        if (PhraseUtil.hasTranslationChanged(phrase)) {\n          setAllTranslations(phrase, phrase.translations);\n        }\n      });\n\n    /**\n     * EventService.EVENT.CANCEL_EDIT listener\n     * Cancel edit and restore translation\n     */\n    $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n      function (event, phrase) {\n        if(selectedTUId) {\n          setSelected(controllerList[selectedTUId], false);\n          selectedTUId = false;\n          EditorShortcuts.selectedTUCtrl = null;\n        }\n\n        $location.search('selected', null);\n        if(!phrase) {\n          $location.search('id', null);\n        }\n\n        // EditorContentCtrl#changePage doesn't provide a phrase object\n        if (phrase) {\n          $timeout(function() {\n            return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n          });\n        }\n      });\n\n    /**\n     * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n     *\n     */\n    $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n       updateSaveButton);\n\n    /**\n     * EventService.EVENT.FOCUS_TRANSLATION listener\n     *\n     */\n    $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n       setFocus);\n\n    /**\n      * EventService.EVENT.SAVE_COMPLETED listener\n      *\n      */\n    $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n       phraseSaving);\n\n    /**\n      * EventService.EVENT.SAVE_COMPLETED listener\n      *\n      */\n    $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n       updateSaveButton);\n\n    function setTranslationText(phrase, newText) {\n      var index = 0;\n      if (phrase.plural) {\n        var transUnitCtrl = controllerList[phrase.id];\n        index = transUnitCtrl.focusedTranslationIndex;\n      }\n      phrase.newTranslations[index] = newText;\n      EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n        phrase);\n      EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n        phrase);\n    }\n\n    function setAllTranslations(phrase, newTexts) {\n      //need slice() for new instance of array\n      phrase.newTranslations = newTexts.slice();\n\n      EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n        phrase);\n      EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n        phrase);\n    }\n\n    function updateSaveButton(event, phrase) {\n       var transUnitCtrl = controllerList[phrase.id];\n       transUnitCtrl.updateSaveButton(phrase);\n    }\n\n    function phraseSaving(event, data) {\n      var transUnitCtrl = controllerList[data.phrase.id];\n      transUnitCtrl.phraseSaving(data);\n      EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n        data.phrase);\n    }\n\n    function setSelected(transUnitCtrl, isSelected) {\n      //This check is to prevent selected event being triggered repeatedly.\n      if(transUnitCtrl.selected !== isSelected) {\n        transUnitCtrl.selected = isSelected || false;\n      }\n    }\n\n    function setFocus(event, phrase) {\n      var transUnitCtrl = controllerList[phrase.id];\n      transUnitCtrl.focusTranslation();\n    }\n\n    /**\n     * Filters the dropdown options for saving a translation\n     * Unless the translation is empty, remove untranslated as an option\n     * Filter the current default save state out of the list and show remaining\n     *\n     * @param  {Object} saveStatus The current default translation *save* status\n     * @return {Array}             Is used to construct the dropdown list\n     */\n    function filterSaveButtonOptions(saveStatus, phrase) {\n      var filteredOptions = [];\n      if (saveStatus.ID === 'untranslated') {\n        return filteredOptions;\n      }\n      filteredOptions = $filter('filter')\n      (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n      if(phrase.plural) {\n        if(PhraseUtil.hasNoTranslation(phrase)) {\n          filteredOptions = $filter('filter')\n          (filteredOptions, {ID: '!needswork'});\n        } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n            filteredOptions = $filter('filter')\n            (filteredOptions, {ID: '!translated'});\n        }\n      }\n\n      if (PRODUCTION) {\n        filteredOptions = $filter('filter')\n        (filteredOptions, {ID: '!approved'});\n      }\n\n      return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n    }\n\n    return transUnitService;\n  }\n\n  angular\n    .module('app')\n    .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n  'use strict';\n\n  /**\n   * @name trans-unit\n   * @description transUnit container\n   * @ngInject\n   */\n  function transUnit() {\n    return {\n      restrict: 'E',\n      required: ['phrase', 'editorContext'],\n      scope: {\n        phrase: '=',\n        firstPhrase: '=',\n        editorContext: '='\n      },\n      controller: 'TransUnitCtrl as transUnitCtrl',\n      templateUrl: 'components/transUnit/trans-unit.html',\n      link: function(scope, element, attr, TransUnitCtrl) {\n        TransUnitCtrl.init();\n      }\n    };\n  }\n\n  angular\n    .module('app')\n    .directive('transUnit', transUnit);\n\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * @name trans-unit\n   * @description transUnit container\n   * @ngInject\n   */\n  function transUnitFilter() {\n    return {\n      restrict: 'E',\n      required: ['editor'],\n      scope: {\n        editor: '='\n      },\n      templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n    };\n  }\n\n  angular\n    .module('app')\n    .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * UserService.js\n   *\n   * @ngInject\n   */\n  function UserService($resource, UrlService) {\n\n    function getUserInfo(username) {\n      var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n        query: {\n          method: 'GET',\n          params: {\n            username: username\n          }\n        }\n      });\n      return UserInfo.query().$promise;\n    }\n\n    function getMyInfo() {\n      var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n        query: {\n          method: 'GET'\n        }\n      });\n      return MyInfo.query().$promise;\n    }\n\n    return {\n      settings: {\n        editor: {\n          hideMainNav: false\n        }\n      },\n      getUserInfo: getUserInfo,\n      getMyInfo: getMyInfo\n    };\n  }\n  angular\n    .module('app')\n    .factory('UserService', UserService);\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * FilterUtil.js\n   *\n   * @ngInject\n   */\n  function FilterUtil(StringUtil, _) {\n\n    /**\n     * Filter in resources on given fields with matched terms\n     *\n     * @param resources - list of resources\n     * @param fields - list of fields to check\n     * @param terms - list of term to check\n     * @returns {*}\n     */\n    function filterResources(resources, fields, terms) {\n      if(!resources || !fields || !terms) {\n        return resources;\n      }\n      return _.filter(resources, function (resource) {\n        return isInclude(resource, fields, terms);\n      });\n    }\n\n    /**\n     * Filter out properties starting with $ (added by promise)\n     * @param resources\n     */\n    function cleanResourceMap(resources) {\n      var filteredList = {};\n      var ids = Object.keys(resources).filter(function (id) {\n        return id.indexOf('$') === -1;\n      });\n      ids.forEach(function(id) {\n        filteredList[id] = (resources[id]);\n      });\n      return filteredList;\n    }\n\n    function cleanResourceList(resources) {\n      var filteredList = [];\n      var ids = Object.keys(resources).filter(function (id) {\n        return id.indexOf('$') === -1;\n      });\n      ids.forEach(function(id) {\n        filteredList.push(resources[id]);\n      });\n      return filteredList;\n    }\n\n\n    function isInclude(resource, fields, terms) {\n      if(!resource || !fields || !terms) {\n        return false;\n      }\n      return _.any(fields, function(field) {\n        return _.any(terms, function(term) {\n          return StringUtil.equals(resource[field], term, true);\n        });\n      });\n    }\n\n    return {\n      filterResources  : filterResources,\n      cleanResourceList:cleanResourceList,\n      cleanResourceMap   : cleanResourceMap\n    };\n  }\n  angular\n    .module('app')\n    .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * PhraseUtil.js\n   *\n   * @ngInject\n   */\n  function PhraseUtil(TransStatusService, _) {\n\n    function getSaveButtonStatus(phrase) {\n      if (hasNoTranslation(phrase)) {\n        return TransStatusService.getStatusInfo('untranslated');\n      }\n      else if (hasEmptyTranslation(phrase)) {\n        return TransStatusService.getStatusInfo('needswork');\n      }\n      else if (hasTranslationChanged(phrase)) {\n        return TransStatusService.getStatusInfo('translated');\n      }\n      else {\n        return phrase.status;\n      }\n    }\n\n    function hasTranslationChanged(phrase) {\n      // on Firefox with input method turned on,\n      // when hitting tab it seems to turn undefined value into ''\n      var allSame = _.every(phrase.translations,\n        function(translation, index) {\n          return nullToEmpty(translation) ===\n            nullToEmpty(phrase.newTranslations[index]);\n        });\n      return !allSame;\n    }\n\n    function hasNoTranslation(phrase) {\n      return _.isEmpty(_.compact(phrase.newTranslations));\n    }\n\n    function hasEmptyTranslation(phrase) {\n      return _.compact(phrase.newTranslations).length !==\n        phrase.newTranslations.length;\n    }\n\n    function nullToEmpty(value) {\n      return value || '';\n    }\n\n    return {\n      getSaveButtonStatus  : getSaveButtonStatus,\n      hasTranslationChanged : hasTranslationChanged,\n      hasNoTranslation : hasNoTranslation,\n      hasEmptyTranslation : hasEmptyTranslation\n    };\n  }\n  angular\n    .module('app')\n    .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * Utility method for handling $resource.statistic\n   *\n   * StatisticUtil.js\n   * @ngInject\n   *\n   */\n\n  function StatisticUtil() {\n    return {\n      getWordStatistic: function(statistics) {\n        return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n      },\n      getMsgStatistic: function(statistics) {\n        return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n      }\n    };\n  }\n  angular\n    .module('app')\n    .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * StringUtil\n   *\n   * @ngInject\n   */\n\n  function StringUtil() {\n    function startsWith(str, prefix, ignoreCase) {\n      if (ignoreCase && str && prefix) {\n        str = str.toUpperCase();\n        prefix = prefix.toUpperCase();\n      }\n      return str.lastIndexOf(prefix, 0) === 0;\n    }\n\n    function endsWith(str, suffix, ignoreCase) {\n      if (ignoreCase && str && suffix) {\n        str = str.toUpperCase();\n        suffix = suffix.toUpperCase();\n      }\n      return str.indexOf(suffix, str.length - suffix.length) !== -1;\n    }\n\n    function equals(from, to, ignoreCase) {\n      if (ignoreCase && from && to) {\n        from = from.toUpperCase();\n        to = to.toUpperCase();\n      }\n      return from === to;\n    }\n\n    return {\n      startsWith : startsWith,\n      endsWith   : endsWith,\n      equals     : equals\n    };\n  }\n  angular\n    .module('app')\n    .factory('StringUtil', StringUtil);\n})();\n","(function() {\n  'use strict';\n\n  /**\n   * Utility to handles URL related request.\n   *\n   * UrlService.js\n   * @ngInject\n   */\n  function UrlService($location, $http, $q, $stateParams, _) {\n    //IE doesn't support location.origin\n    if (!location.origin) {\n      location.origin =\n        window.location.protocol + '//' + window.location.hostname +\n        (window.location.port ? (':' + window.location.port) : '');\n    }\n\n    var urlService = this,\n      gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n      configFile = 'config.json',\n      baseUrl = '',\n      urls = {},\n      uiTranslationsURL = location.origin + location.pathname +\n        'translations';\n\n    urlService.serverContextPath = '';\n\n    urlService.init = function () {\n      if (baseUrl) {\n        return $q.when(baseUrl);\n      }\n      else {\n        /**\n         * Temporary solution to handle dynamic context path deployed for\n         * Zanata server in JBOSS (/ or /zanata).\n         *\n         * If config.baseUrl exist and not empty,\n         * baseUrl = config.baseUrl\n         *\n         * ELSE\n         * baseUrl = full.url - appPath onwards\n         */\n        return $http.get(configFile).then(function (response) {\n          var config = response.data;\n          if (config.baseUrl) {\n            baseUrl = config.baseUrl;\n          } else {\n            var deployPath = config.appPath.replace(/^\\//g, ''),\n                index = location.href.indexOf(deployPath);\n\n            urlService.serverContextPath = location.origin + location.pathname;\n            if(index >= 0) {\n              urlService.serverContextPath = location.href.substring(0, index);\n            }\n            urlService.serverContextPath = urlService.serverContextPath.\n              replace(/\\/?$/, '/');\n            baseUrl = urlService.serverContextPath + 'rest';\n          }\n\n          /* jshint -W101 */\n          // URLs over multiple lines are hard to read, allowing long lines here.\n          // Warnings for jshint are turned off/on with -/+ before the warning code.\n          // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n          urls = _.mapValues({\n            project: '/project/:projectSlug',\n            docs: '/project/:projectSlug/version/:versionSlug/docs',\n            locales: '/project/:projectSlug/version/:versionSlug/locales',\n            status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n            textFlows: '/source+trans/:localeId',\n            docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n            myInfo: '/user',\n            userInfo: '/user/:username',\n            translation: '/trans/:localeId',\n            allLocales: '/locales'\n          }, unary(restUrl));\n          /* jshint +W101 */\n\n          urlService.PROJECT_URL = urls.project;\n          urlService.LOCALE_LIST_URL = urls.locales;\n          urlService.DOCUMENT_LIST_URL = urls.docs;\n          urlService.TRANSLATION_STATUS_URL = urls.status;\n          urlService.TEXT_FLOWS_URL = urls.textFlows;\n          urlService.DOC_STATISTIC_URL = urls.docStats;\n          urlService.MY_INFO_URL = urls.myInfo;\n          urlService.USER_INFO_URL = urls.userInfo;\n          urlService.TRANSLATION_URL = urls.translation;\n          urlService.ALL_LOCALE_URL = urls.allLocales;\n\n          urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n            return urlService.serverContextPath + 'iteration/view/' +\n              projectSlug + '/' +  versionSlug;\n          };\n\n          urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n            'dashboard';\n        });\n      }\n    };\n\n    /**\n     * Get the value of a query string parameter.\n     */\n    urlService.readValue = function (key) {\n      return $location.search()[key];\n    };\n\n    urlService.gravatarUrl = function (gravatarHash, size) {\n      return gravatarBaseUrl + '/' + gravatarHash +\n        '?d=mm&r=g&s=' + size;\n    };\n\n    urlService.uiTranslationURL = function (locale) {\n      return uiTranslationsURL + '/' + locale + '.json';\n    };\n\n    urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n    return urlService;\n\n    /**\n     * Create a REST URL by appending all the given URL part arguments to the\n     * base URL.\n     *\n     * No separators will be added or removed, so all parts should include\n     * leading / and exclude trailing / to avoid problems.\n     */\n    function restUrl() {\n      return baseUrl + Array.prototype.join.call(arguments, '');\n    }\n\n    /**\n     * Decorate a function to ignore all but the first argument.\n     */\n    function unary(fun) {\n      return function(arg) {\n        return fun(arg);\n      };\n    }\n  }\n\n  angular\n    .module('app')\n    .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"}
\ No newline at end of file
diff --git a/zanata-war/src/main/webapp/app/maps/libs.js.map b/zanata-war/src/main/webapp/app/maps/libs.js.map
old mode 100755
new mode 100644
index 009af5a406..f4fba3f2a8
--- a/zanata-war/src/main/webapp/app/maps/libs.js.map
+++ b/zanata-war/src/main/webapp/app/maps/libs.js.map
@@ -1 +1 @@
-{"version":3,"sources":["angular/angular.js","angular-animate/angular-animate.js","angular-elastic/elastic.js","angular-resource/angular-resource.js","highlightjs/highlight.pack.js","modernizr/modernizr-custom.js","mousetrap/mousetrap.js","ng-focus-on/ng-focus-on.js","angular-gettext/dist/angular-gettext.js","angular-hotkeys/src/hotkeys.js","angular-ui-router/release/angular-ui-router.js","lodash/dist/lodash.compat.js","underscore.string/lib/underscore.string.js"],"names":[],"mappings":"AAAA;CACC;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;MACA;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;;IAEF;MACE;;MAEA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;IACF;MACE;QACE;IACJ;IACA;EACF;AACF;;AAEA;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;EACE;EACA;MACI;MACA;AACN;AACA;EACE;EACA;MACI;MACA;AACN;;;AAGA;AACA;AACA;AACA;EACE;EACA;AACF;;;AAGA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;AACD;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;SACO;AACT;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;OACE;KACF;KACA;GACF;CACF;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;MACE;MACA;QACE;UACE;QACF;MACF;IACF;QACI;IACJ;MACE;QACE;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;MACE;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;EACA;AACF;;AAEA;EACE;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;KACF;GACF;CACF;AACD;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;GACF;CACF;AACD;AACA;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;AACJ;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;EACF;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;IACE;MACE;QACE;EACN;;EAEA;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;EACC;IACE;MACE;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;EACJ;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;MACF;QACE;QACA;MACF;IACF;EACF;IACE;MACE;;IAEF;IACA;;IAEA;MACE;MACA;;MAEA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;MACA;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;EAEF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;;IAEA;MACE;IACF;EACF;IACE;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;UACA;QACF;MACF;QACE;QACA;MACF;QACE;MACF;QACE;QACA;QACA;UACE;UACA;UACA;QACF;QACA;UACE;cACI;cACA;cACA;QACN;QACA;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;kBACgB;;EAEhB;IACE;MACE;MACA;MACA;IACF;MACE;IACF;EACF;;EAEA;AACF;;;;AAIA;EACE;AACF;;AAEA;EACE;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;IACE;MACE;UACI;YACE;YACA;QACJ;MACF;UACI;YACE;YACA;QACJ;EACN;IACE;IACA;EACF;AACF;;;AAGA;EACE;;EAEA;IACE;EACF;IACE;EACF;IACE;EACF;IACE;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;AACN;;;AAGA;CACC;CACA;AACD;EACE;EACA;IACE;IACA;IACA;EACF;EACA;EACA;EACA;EACA;IACE;QACI;UACE;UACA;EACR;IACE;EACF;;AAEF;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;MACE;MACA;MACA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;QACE;mBACW;MACb;IACF;IACA;eACW;IACX;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;AACb;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;aACA;aACA;aACA;AACb;;AAEA;;AAEA;EACE;EACA;EACA;IACE;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;GACA;KACE;GACF;GACA;GACA;GACA;KACE;KACA;GACF;GACA;CACF;CACA;CACA;CACA;CACA;GACE;GACA;OACI;WACI;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;WACA;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;;WAEA;cACG;cACA;cACA;WACH;OACJ;GACJ;GACA;GACA;GACA;KACE;KACA;KACA;OACE;OACA;KACF;KACA;KACA;KACA;OACE;OACA;KACF;KACA;KACA;OACE;KACF;KACA;GACF;GACA;GACA;OACI;OACA;OACA;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;OACA;GACJ;GACA;CACF;CACA;AACD;EACE;MACI;MACA;;EAEJ;EACA;IACE;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;EACF;EACA;EACA;IACE;;IAEA;MACE;MACA;MACA;UACI;UACA;UACA;IACN;;IAEA;IACA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;OACG;QACC;UACE;UACA;QACF;MACF;IACF;IACA;EACF;;EAEA;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;EACA;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;AACA;EACE;EACA;IACE;EACF;AACF;;AAEA;AACA;AACA;EACE;;EAEA;IACE;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;EACF;IACE;EACF;;EAEA;;EAEA;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;EACJ;;EAEA;MACI;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;MACE;IACF;EACF;EACA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;EACA;;EAEA;IACE;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;MAEA;MACA;QACE;MACF;MACA;QACE;UACE;aACG;aACA;QACL;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;;UAGA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;AAEF;;AAEA;EACE;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;AACF;;;AAGA;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;MACA,mBAAmB,QAAQ;QACzB;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;QACA;UACE;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;IACI;IACA;MACE;IACF;IACA;MACE;IACF;;AAEJ;CACC;CACA;AACD;EACE;EACA;AACF;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;IACA;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;IACE;IACA;EACF;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;;IAEA;;IAEA;IACA;EACF;;EAEA;EACA;EACA;EACA;IACE;EACF;;EAEA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;EACF;;EAEA;;EAEA;IACE;IACA;EACF;EACA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;EACF;IACE;EACF;AACF;;AAEA;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;MACE;IACF;EACF;AACF;;AAEA;EACE;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;EACF;IACE;MACE;QACE;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;IACE;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;IACA;IACA;EACF;AACF;;;AAGA;EACE;MACI;;EAEJ;IACE;IACA;EACF;;EAEA;AACF;;;AAGA;EACE;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;MACI;AACN;;AAEA;EACE;IACE;MACE;UACI;UACA;UACA;MACJ;IACF;EACF;AACF;;AAEA;EACE;IACE;4BACwB;;IAExB;MACE;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;EACE;;EAEA;;IAEE;IACA;MACE;IACF;MACE;;MAEA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;IACE;EACF;EACA;;EAEA;IACE;MACE;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;EACE;IACE;;IAEA;MACE;MACA;MACA;IACF;;IAEA;IACA;MACE;IACF;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;EACA;IACE;IACA;IACA;EACF;;EAEA;MACI;EACJ;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF;AACA;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;;EAEA;EACA;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;AACF;EACE;AACF;;AAEA;EACE;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;UACE;UACA;QACF;MACF;QACE;iBACS;eACF;eACA;MACT;IACF;MACE;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;EACF;;EAEA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;IACA;EACF;;EAEA;AACF;EACE;GACC;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;IACA;QACI;MACF;;QAEE;QACA;UACE;YACE;YACA;UACF;YACE;cACE;YACF;UACF;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;MACE;IACF;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;;UAEA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;;QAEF;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;;EAEA;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;MACF;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;IACJ;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;QACA;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;;EAEA;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;EACE;GACC;GACA;EACD;IACE;;IAEA;MACE;QACE;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;IACA;MACE;IACF;EACF;EACA;AACF;AACA;EACE;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;AACA;AACA;AACA;AACA;;AAEA;EACE;EACA;EACA;MACI;EACJ;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;MACA;MACA;;EAEJ;IACE;MACE;MACA;QACE;UACE;YACE;UACF;UACA;YACE;QACJ;QACA;QACA;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;EACF;IACE;IACA;IACA;EACF;IACE;EACF;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAKD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;wBACuB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;EACE;EACA;MACI;MACA;MACA;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;UACF;MACJ;MACA;UACI;YACE;UACF;MACJ;MACA;UACI;YACE;YACA;UACF;;;EAGR;;EAEA;;EAEA;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;;UAEJ;QACF;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;YACI;QACJ;YACI;QACJ;UACE;QACF;MACF;QACE;UACE;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;kBACU;MACZ;IACF;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;IAEE;MACE;QACE;UACE;oBACU;QACZ;QACA;MACF;QACE;UACE;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;;MAEA;UACI;UACA;UACA;;MAEJ;QACE;QACA;UACE;kBACQ;QACV;QACA;UACE;UACA;UACA;QACF;MACF;MACA;QACE;MACF;;MAEA;MACA;MACA;IACF;;IAEA;MACE;UACI;;MAEJ;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;aACE;eACE;eACA;eACA;;eAEA;eACA;aACF;WACF;KACN;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;GACF;CACF;AACD;;EAEE;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;IACF;;IAEA;IACA;IACA;MACE;QACE;UACE;QACF;IACJ;;IAEA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;EAGE;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;GACF;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;IACJ;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;cACM;QACN;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;MACA;QACE;MACF;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;IACF;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;MACI;;EAEJ;IACE;IACA;;IAEA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;QACE;gCACwB;MAC1B;QACE;UACE;gCACsB;;UAEtB;UACA;UACA;UACA;UACA;YACE;cACE;cACA;UACJ;QACF;MACF;IACF;MACE;QACE;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;YACA;cACE;YACF;UACF;QACF;MACF;MACA;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;IACF;IACA;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;IACA;EACF;;AAEF;;AAEA;EACE;MACI;QACE;MACF;AACN;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;SACA;;SAEA;SACA;WACE;WACA;WACA;SACF;;SAEA;SACA;WACE;WACA;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;WACA;WACA;aACE;eACE;aACF;aACA;WACF;SACF;KACJ;KACA;OACE;SACE;OACF;KACF;GACF;CACF;AACD;;EAEE;IACE;;IAEA;MACE;QACE;MACF;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;UACF;;UAEA;UACA;UACA;;UAEA;YACE;UACF;;UAEA;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;UACF;;UAEA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;YACA;YACA;;YAEA;UACF;;UAEA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;YACE;UACF;YACE;UACF;;UAEA;UACA;UACA;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;UACA;QACF;MACF;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;MACA;QACE;MACF;MACA;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;IACF;;;IAGA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;IACC;MACE;QACE;QACA;QACA;UACE;UACA;YACE;cACE;iBACG;gBACD;cACF;cACA;gBACE;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;QACF;MACF;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;GACD;GACA;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;KACF;GACF;CACF;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;AACA;EACE;MACI;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;;EAEA;IACE;;IAEA;;IAEA;MACE;;MAEA;QACE;YACI;YACA;YACA;MACN;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;IACA;MACE;MACA;QACE;QACA;UACE;YACE;YACA;cACE;gBACE;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;gBACE;cACF;YACF;YACA;UACF;MACJ;MACA;IACF;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;YACU;YACA;IACR;aACS;;IAET;MACE;QACE;QACA;;QAEA;UACE;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;;QAEA;QACA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;;QAEA;QACA;UACE;QACF;UACE;UACA;YACE;UACF;QACF;;QAEA;;QAEA;QACA;YACI;UACF;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;gBACS;OACT;OACA;OACA;MACD;QACE;YACI;YACA;;QAEJ;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;;IAGA;QACI;QACA;YACI;YACA;cACE;QACN;QACA;;IAEJ;MACE;;MAEA;QACE;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;wBACoB;MAClB;QACE;QACA;QACA;MACF;MACA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;cACQ;2BACa;MACrB;MACA;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;QACA;QACA;;QAEA;QACA;QACA;UACE;UACA;;QAEF;UACE;YACE;UACF;QACF;;QAEA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;4BACwB;MACtB;UACI;;MAEJ;QACE;;QAEA;QACA;wCACgC;;QAEhC;YACI;sCAC0B;YAC1B;;QAEJ;UACE;QACF;;QAEA;sBACc;sBACA;YACV;YACA;iBACK;kBACC;qBACG;;QAEb;UACE;UACA;UACA;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;;QAGA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;;YAEA;cACE;kBACI;kBACA;;YAEN;cACE;;YAEF;cACE;;YAEF;cACE;YACF;;YAEA;;UAEF;YACE;UACF;QACF;MACF;IACF;;IAEA;;MAEE;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;QACA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;UACA;cACI;;UAEJ;UACA;mBACS;YACP;YACA;;YAEA;YACA;cACE;cACA;;cAEA;cACA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;kBACE;kBACA;kBACA;gBACF;cACF;;cAEA;cACA;cACA;kBACI;kBACA;oBACE;kBACF;cACJ;cACA;cACA;4BACc;YAChB;UACF;;UAEA;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;UACF;YACE;YACA;YACA;UACF;UACA;MACJ;;MAEA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;sBACU;sBACA;UACZ;UACA;YACE;YACA;UACF;UACA;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;mCAC+B;mCACA;MAC7B;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;;QAEA;QACA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;;UAEE;UACA;UACA;YACE;cACE;cACA;cACA;gCACkB;cAClB;YACF;cACE;cACA;cACA;gCACkB;YACpB;UACF;;UAEA;QACF;;QAEA;;QAEA;UACE;UACA;UACA;cACI;UACJ;QACF;;QAEA;UACE;;UAEA;UACA;UACA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;gBACI;8CAC8B;YAClC;YACA;;YAEA;wCAC4B;0CACE;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;wCACF;UAC9B;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;cACI;cACA;;UAEJ;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;;YAEA;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;cACI;gBACE;gBACA;gBACA;gBACA;cACF;UACJ;QACF;UACE;YACE;YACA;cACE;YACF;cACE;YACF;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;QACF;;MAEF;;MAEA;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;MACF;;;MAGA;QACE;QACA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;UACA;;UAEA;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;UACN;UACA;QACF;UACE;UACA;YACE;UACF;QACF;QACA;MACF;;;MAGA;QACE;YACI;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;YACA;cACE;YACF;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;UACF;QACF;;QAEA;UACE;;UAEA;cACI;UACJ;;UAEA;UACA;UACA;cACI;YACF;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;;cAEE;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;kBACA;gBACF;gBACA;;cAEF;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;kBACE;kBACA;kBACA;sBACI;sBACA;gBACN;gBACA;gBACA;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;sBACE;sBACA;oBACF;kBACF;kBACA;gBACF;gBACA;gBACA;gBACA;gBACA;;cAEF;gBACE;gBACA;kBACE;gBACF;gBACA;YACJ;UACF;QACF;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;UACE;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;0BACsB;MACpB;MACA;MACA;QACE;YACI;UACF;YACE;YACA;iBACK;cACH;gBACE;cACF;cACA;cACA;YACF;UACF;QACF;MACF;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;UACF;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;UACE;UACA;QACF;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;QACF;MACF;IACF;;;IAGA;QACI;MACF;UACI;UACA;UACA;UACA;UACA;UACA;YACE;UACF;UACA;cACI;cACA;UACJ;;MAEJ;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;UACF;YACE;YACA;UACF;;UAEA;;UAEA;cACI;cACA;UACJ;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;;cAEA;kBACI;gBACF;gBACA;cACF;cACA;;cAEA;cACA;YACF;YACA;cACE;YACF;cACE;YACF;YACA;cACE;UACJ;UACA;QACF;;MAEF;QACE;QACA;UACE;UACA;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;MACF;IACF;;;IAGA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;;IAGA;MACE;QACE;YACI;MACN;IACF;;;IAGA;MACE;MACA;QACE;UACE;UACA;YACE;gBACI;;YAEJ;YACA;YACA;;YAEA;cACE;cACA;cACA;cACA;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;MACF;IACF;;;IAGA;MACE;QACE;MACF;MACA;MACA;MACA;UACI;UACA;4BACkB;QACpB;MACF;IACF;;;IAGA;MACE;;MAEA;MACA;;;MAGA;QACE;YACI;YACA;MACN;;MAEA;QACE;QACA;YACI;cACE;gBACE;;gBAEA;kBACE;sBACI;0BACI;gBACV;;gBAEA;gBACA;gBACA;oBACI;;gBAEJ;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;;gBAEA;gBACA;kBACE;oBACE;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;sBACE;oBACF;sBACE;oBACF;kBACF;cACJ;YACF;UACF;MACJ;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;YACE;YACA;qBACS;iBACJ;cACH;gBACE;cACF;gBACE;cACF;YACF;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;MACF;;MAEA;MACA;IACF;;;IAGA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAID;CACC;CACA;;AAED;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;IACF;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;;EAGA;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;;MAEA;QACE;QACA;QACA;QACA;YACI;YACA;gBACI;;QAER;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;UACE;UACA;QACF;MACF;;MAEA;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;UACA;MACJ;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;SACF;KACJ;GACF;CACF;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;;EAEF;IACE;EACF;;EAEA;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;QACA;UACE;MACJ;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;IACA;EACF;;EAEA;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;EACD;;EAEA;MACI;;IAEF;;IAEA;KACC;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;IACN;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;AACL;AACA;EACE;IACE;MACE;MACA;IACF;IACA;IACA;IACA;IACA;MACE;oBACc;MACd;IACF;IACA;MACE;QACE;MACF;IACF;IACA;EACF;AACF;AACA;EACE;IACE;MACE;QACE;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;YACA;cACE;cACA;UACJ;QACF;;QAEA;UACE;UACA;QACF;MACF;AACN;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;EACF;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;EAEE;MACI;IACF;IACA;IACA;IACA;EACF;AACF;AACA;KACK;IACD;MACE;QACE;QACA;QACA;MACF;MACA;;MAEA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;QACA;UACE;YACE;gBACI;YACJ;UACF;QACF;;QAEA;UACE;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;MACJ;;MAEA;QACE;YACI;YACA;;QAEJ;;QAEA;QACA;QACA;UACE;;UAEA;YACE;cACE;YACF;UACF;;UAEA;QACF;;QAEA;QACA;QACA;;QAEA;UACE;;UAEA;YACE;cACE;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;IACL;;;IAGA;;;IAGA;MACE;QACE;UACE;YACE;YACA;UACF;QACF;MACF;IACF;;;IAGA;MACE;QACE;UACE;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;MACA;;;MAGA;UACI;QACF;cACM;cACA;MACR;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;UACF;YACE;YACA;cACE;YACF;cACE;YACF;UACF;QACF;UACE;UACA;QACF;MACF;;;MAGA;MACA;MACA;QACE;YACI;YACA;QACJ;UACE;QACF;;QAEA;YACI;MACN;;MAEA;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;;MAGA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;QACE;QACA;;QAEA;UACE;YACE;cACE;YACF;cACE;YACF;UACF;UACA;qBACW;QACb;MACF;MACA;QACE;MACF;MACA;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;MACE;MACA;IACF;MACE;IACF;;IAEA;AACJ;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;UACI;QACF;QACA;MACF;IACF;;MAEE;;MAEA;MACA;QACE;YACI;QACJ;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;cACI;cACA;;UAEJ;YACE;;YAEA;YACA;YACA;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;cACI;cACA;cACA;cACA;QACN;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;MACE;IACF;MACE;IACF;;;IAGA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;QACF;QACA;QACA;MACF;;MAEA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;;EAEA;IACE;IACA;EACF;;;EAGA;MACI;EACJ;AACF;AACA;IACI;AACJ;AACA;AACA;EACE;IACE;EACF;AACF;AACA;CACC;AACD;EACE;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;IACE;QACI;QACA;QACA;;IAEJ;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;aACK;UACH;YACE;UACF;UACA;UACA;UACA;UACA;UACA;UACA;QACF;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;UACI;cACI;cACA;cACA;MACR;;MAEA;QACE;UACE;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;UACE;YACE;UACF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;YACA;cACE;YACF;UACF;;UAEA;QACF;;QAEA;YACI;YACA;YACA;;YAEA;cACE;gBACE;cACF;;cAEA;YACF;cACE;kBACI;cACJ;YACF;;UAEF;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;MACJ;;MAEA;QACE;UACE;QACF;UACE;YACE;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;;MAEA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;;MAEF;;MAEA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;;MAEA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;QACA;MACF;;MAEA;QACE;YACI;YACA;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA;IACI;AACJ;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;IACE;EACF;;EAEA;AACF;;AAEA;EACE;;EAEA;EACA;EACA;AACF;;;AAGA;EACE;EACA;IACE;EACF;EACA;EACA;MACI;EACJ;EACA;;EAEA;EACA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;EACE;EACA;AACF;;;AAGA;EACE;AACF;;AAEA;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;MACE;UACI;IACN;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;UACE;UACA;;IAEN;MACE;UACI;IACN;IACA;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;EAEA;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;MACE;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;IACA;IACA;EACF;;AAEF;;;AAGA;EACE;EACA;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;;IAEF;IACA;IACA;IACA;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;UACA;YACE;UACF;;UAEA;QACF;UACE;cACI;QACN;QACA;MACF;QACE;UACE;QACF;UACE;QACF;IACJ;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;AACF;;AAEA;EACE;IACE;EACF;AACF;;;AAGA;EACE;IACE;MACE;;IAEF;IACA;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;QACE;QACA;MACF;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;UACI;UACA;MACJ;UACI;UACA;MACJ;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;MACI;IACF;QACI;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;MACJ;MACA;MACA;IACF;MACE;MACA;IACF;IACA;IACA;;IAEA;;IAEA;MACE;MACA;;MAEA;;MAEA;;MAEA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;UACE;;UAEA;UACA;oCAC0B;YACxB;YACA;UACF;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;YACF;UACF;YACE;YACA;UACF;QACF;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;IACF;AACJ;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;WACA;SACF;KACJ;KACA;OACE;SACE;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;cACI;cACA;QACN;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;EACE;MACI;MACA;IACF;QACI;QACA;EACN;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;EACF;EACA;AACF;;AAEA;AACA;AACA;;AAEA;EACE;IACE;MACE;QACE;QACA;IACJ;MACE;QACE;QACA;IACJ;EACF;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;EACA;AACF;EACE;EACA;AACF;;AAEA;AACA;IACI;IACA;MACE;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;UACM;UACA;QACF;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACJ;AACA;AACA;;;AAGA;;;AAGA;CACC;CACA;AACD;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;QACE;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;YACA;UACF;UACA;QACF;UACE;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;EACV;;EAEA;IACE;YACQ;YACA;EACV;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;YACA;IACR;QACI;EACN;;EAEA;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;YACI;YACA;UACF;QACF;YACI;YACA;UACF;QACF;UACE;QACF;MACF;MACA;IACF;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;MACF;QACE;MACF;MACA;IACF;IACA;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA;EACE;AACF;EACE;EACA;AACF;;AAEA;EACE;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;MACE;IACF;MACE;IACF;MACE;MACA;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;MACF;QACE;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;QACI;UACE;EACR;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;UACI;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;QACA;QACA;YACI;YACA;gBACI;gBACA;kBACE;gBACF;gBACA;cACF;MACR;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;QACE;MACF;IACF;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;QACE;YACI;MACN;MACA;MACA;QACE;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;;MAEF;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;IACF;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;QACA;UACE;QACF;MACF;;MAEA;MACA;;MAEA;MACA;YACM;YACA;;MAEN;IACF;EACF;;EAEA;EACA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;QACA;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;AACF;;;AAGA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;;IAEA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;EACF;AACF;;AAEA;EACE;;EAEA;;EAEA;MACI;;EAEJ;EACA;IACE;MACE;IACF;MACE;QACE;QACA;UACE;gCACsB;;UAEtB;UACA;QACF;QACA;MACF;IACF;EACF;IACE;IACA;MACE;MACA;cACQ;sBACQ;sBACA;sBACA;sBACA;IAClB;IACA;;IAEA;IACA;IACA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;;;EAGA;IACE;;IAEA;MACE;;MAEA;QACE;UACE;QACF;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;cACA;YACF;;YAEA;YACA;YACA;;YAEA;cACE;YACF;cACE;cACA;cACA;cACA;gBACE;YACJ;cACE;YACF;;YAEA;UACF;UACA;;QAEF;UACE;;QAEF;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;;MAEE;QACE;MACF;;MAEA;;QAEE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;;MAEA;MACA;IACF;;IAEA;MACE;oBACc;;MAEd;;MAEA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;;MAEA;QACE;;QAEA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;UACE;YACE;cACE;YACF;UACF;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;UACI;QACF;MACF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;IACA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;MACF;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;MACE;MACA;QACE;UACE;UACA;UACA;MACJ;MACA;QACE;MACF;;IAEF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;UACA;QACF;UACE;UACA;UACA;QACF;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;UACA;YACE;YACA;YACA;cACE;YACF;cACE;YACF;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;MACE;QACE;MACF;QACE;MACF;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;;EAGD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;EACF;;EAEA;EACA;EACA;EACA;;EAEA;AACF;;AAEA;EACE;IACE;gCAC4B;gCACA;;IAE5B;+BAC2B;+BACA;+BACA;;IAE3B;IACA;MACE;UACI;UACA;YACE;UACF;QACF;MACF;UACI;UACA;YACE;UACF;QACF;;IAEJ;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;MACI;;IAEF;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;SACI;SACA;;SAEA;SACA;SACA;;SAEA;SACA;SACA;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;qBACe;qBACA;MACf;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;;IAEH;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;UACA;YACE;cACE;kBACI;cACJ;cACA;cACA;cACA;YACF;YACA;UACF;UACA;QACF;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;WACA;aACE;aACA;aACA;aACA;eACE;iBACE;iBACA;eACF;aACF;WACF;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;;OAEJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;QACF;QACA;YACI;YACA;cACE;cACA;cACA;cACA;cACA;YACF;;QAEJ;;QAEA;UACE;QACF;;QAEA;UACE;QACF;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;cACA;YACF;UACF;UACA;QACF;;QAEA;UACE;;UAEA;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;UACE;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;UACG;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;OACH;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;;YAEA;cACE;cACA;cACA;YACF;YACA;YACA;cACE;cACA;;cAEA;cACA;gBACE;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;YACA;YACA;YACA;cACE;gBACE;gBACA;gBACA;;gBAEA;kBACE;kBACA;oBACE;oBACA;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;cACE;cACA;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;UACF;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;YACF;cACE;cACA;gBACE;cACF;YACF;cACE;cACA;gBACE;kBACE;gBACF;cACF;YACF;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;OACJ;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;YACA;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;oBACE;wBACI;4BACI;4BACA;+BACG;sBACT;sBACA;sBACA;sBACA;sBACA;wBACE;wBACA;wBACA;4BACI;4BACA;wBACJ;wBACA;sBACF;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;gBACF;cACF;YACF;;YAEA;YACA;YACA;YACA;gBACI;cACF;gBACE;cACF;YACF;UACF;;UAEA;;UAEA;YACE;YACA;gBACI;gBACA;gBACA;UACN;;QAEF;;QAEA;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;MAED;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;;QAGA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;UACE;YACE;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;aACE;eACE;aACF;eACE;aACF;eACE;aACF;WACF;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;QACF;UACE;QACF;UACE;UACA;YACE;UACF;YACE;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;cACE;cACA;cACA;cACA;gBACE;cACF;cACA;YACF;YACA;YACA;;QAEJ;UACE;UACA;UACA;;YAEE;YACA;cACE;cACA;cACA;cACA;YACF;YACA;cACE;cACA;YACF;cACE;YACF;UACF;UACA;UACA;YACE;YACA;UACF;UACA;UACA;QACF;;QAEA;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;cACA;YACF;;QAEJ;;QAEA;YACI;;QAEJ;QACA;UACE;UACA;UACA;YACE;YACA;cACE;cACA;cACA;cACA;YACF;;YAEA;cACE;YACF;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;cACI;YACF;cACE;YACF;UACF;QACF;;QAEA;QACA;MACF;IACF;;IAEA;;IAEA;;;IAGA;MACE;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;;QAEA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;;IAEA;MACE;MACA;QACE;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;IACE;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;EACF;AACF;;AAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;AACA;AACA;AACA;EACE;WACS;AACX;;;AAGA;EACE;IACE;EACF;IACE;IACA;IACA;IACA;IACA;MACE;UACI;IACN;IACA;kBACc;kBACA;IACd;EACF;IACE;IACA;IACA;IACA;EACF;IACE;QACI;EACN;AACF;;;AAGA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;;EAEA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;QACE;QACA;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;QACI;;IAEJ;IACA;IACA;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;MACN;MACA;QACE;MACF;MACA;MACA;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;QACE;UACE;QACF;UACE;cACI;cACA;QACN;MACF;QACE;MACF;MACA;IACF;;IAEA;aACS;aACA;EACX;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;gBACc;IACZ;IACA;IACA;MACE;QACE;QACA;QACA;IACJ;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;IACA;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;IACA;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;QACI;UACE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;kBACY;kBACA;MACZ;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;;MAEA;QACE;UACE;UACA;YACE;UACF;;UAEA;UACA;UACA;QACF;;MAEF;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;;IAEA;EACF;AACF;;AAEA;EACE;OACK;;IAEH;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;cACF;YACF;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;QACF;UACE;UACA;QACF;QACA;UACE;QACF;;QAEA;MACF;;MAEA;MACA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;IACA;EACF;;EAEA;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;UACQ;AACV;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;eACE;aACF;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;MACC;OACC;OACA;OACA;MACD;KACD;GACF;CACF;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;QACC;QACA;OACD;KACF;;KAEA;MACC;MACA;QACE;QACA;MACF;KACD;GACF;EACD;AACF;AACA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;IACF;MACE;IACF;EACF;EACA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;gCACyB;gCACA;gCACA;gCACA;gCACA;;OAEzB;OACA;SACE;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;OACA;OACA;OACA;SACE;SACA;WACE;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;OAEA;SACE;SACA;SACA;SACA;;SAEA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;;IAEA;QACI;;IAEJ;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;cACE;kBACI;gBACF;cACF;YACF;YACA;UACF;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;QACA;QACA;UACE;QACF;UACE;YACE;cACE;YACF;cACE;gBACE;kBACE;gBACF;cACF;cACA;UACJ;UACA;QACF;UACE;YACE;cACE;YACF;UACF;UACA;QACF;UACE;MACJ;IACF;IACA;MACE;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;UACE;YACE;YACA;cACE;YACF;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;IACJ;IACA;IACA;MACE;MACA;QACE;MACF;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;OACF;OACA;SACE;WACE;WACA;WACA;SACF;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;AACA;EACE;EACA;IACE;;IAEA;IACA;QACI;QACA;YACI;EACV;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;MACH;KACD;GACF;CACF;;;AAGD;AACA;EACE;EACA;;IAEE;IACA;QACI;QACA;uBACe;EACrB;AACF;;AAEA;AACA;EACE;;EAEA;EACA;EACA;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;EACF;;IAEE;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;IACA;EACF;EACA;EACA;EACA;IACE;EACF;AACF;;;AAGA;EACE;EACA;IACE;IACA;MACE;IACF;IACA;EACF;AACF;;AAEA;EACE;IACE;IACA;;IAEA;EACF;AACF;;AAEA;EACE;EACA;;EAEA;gBACc;;EAEd;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;AACJ;;AAEA;IACI;MACE;MACA;AACN;;AAEA;GACG;MACG;SACG;;MAEH;SACG;;MAEH;GACH;AACH;;AAEA;EACE;AACF;;AAEA;EACE;IACE;KACC;EACH;GACC;IACC;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;KACA;KACA;GACF;EACD;GACC;KACE;KACA;IACD;KACC;AACL;;AAEA;IACI;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;WACI;OACJ;UACG;OACH;UACG;OACH;UACG;KACL;KACA;OACE;SACE;YACG;SACH;YACG;SACH;YACG;SACH;YACG;OACL;KACF;GACF;CACF;AACD;AACA;;;EAGE;qBACmB;EACnB;IACE;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;;EAGA;IACE;QACI;QACA;;IAEJ;IACA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;IACA;MACE;MACA;iBACW;IACb;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;KACA;OACE;SACE;OACF;KACF;GACF;CACF;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;aACA;aACA;aACA;aACA;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;KACA;OACE;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;AACH;AACA;EACE;IACE;IACA;;IAEA;MACE;IACF;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;MACE;;IAEF;IACA;MACE;IACF;MACE;;IAEF;MACE;MACA;IACF;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;iBACI;kBACC;kBACA;kBACA;kBACA;aACL;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;WACE;aACE;iBACI;aACJ;aACA;WACF;WACA;aACE;aACA;aACA;WACF;SACF;OACF;KACF;GACF;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;UACE;YACE;cACE;YACF;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;UACA;QACF;IACJ;AACJ;CACC;AACD;AACA;EACE;IACE;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;QACF;QACA;QACA;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;MACF;IACF;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;IACA;MACE;UACI;UACA;IACN;IACA;MACE;MACA;MACA;QACE;UACE;UACA;QACF;QACA;WACG;WACA;QACH;QACA;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;IAEE;;MAEE;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;mBACW;QACX;UACE;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;;UAEA;;UAEA;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;;UAEA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;IACF;CACH;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;SACA;YACG;SACH;OACF;OACA;SACE;WACE;WACA;WACA;SACF;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;;AAED;;;AAGA;AACA;EACE;EACA;;EAEA;EACA;IACE;MACE;MACA;MACA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;EACA;IACE;MACE;MACA;QACE;YACI;;QAEJ;YACI;UACF;UACA;UACA;QACF;;QAEA;UACE;YACE;cACE;YACF;YACA;UACF;;UAEA;;UAEA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;AACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACA;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;MACI;;EAEJ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;EACA;IACE;;IAEA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;;IAEA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;CACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;SACE;WACE;aACE;WACF;OACJ;OACA;QACC;UACE;UACA;UACA;QACF;QACA;UACE;QACF;OACD;OACA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;QACD;MACF;MACA;QACE;UACE;UACA;;UAEA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;YACE;cACE;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;kBACE;kBACA;gBACF;;gBAEA;kBACE;kBACA;cACJ;;cAEA;;cAEA;cACA;cACA;gBACE;kBACE;gBACF;cACF;YACF;;YAEA;gBACI;;YAEJ;cACE;cACA;gBACE;gBACA;gBACA;gBACA;gBACA;cACF;YACF;YACA;cACE;gBACE;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;EACF;AACF;;AAEA;AACA;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;+BACoB;WACpB;aACE;WACF;aACE;;WAEF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;OACE;UACG;YACE;cACE;YACF;OACL;OACA;UACG;UACA;cACI;UACJ;cACI;UACJ;cACI;WACH;WACA;WACA;WACA;WACA;OACJ;KACF;KACA;QACG;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;KACH;KACA;KACA;EACH;SACO;SACA;;GAEN;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;UACE;YACE;UACF;MACJ;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;QACG;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;KACH;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;MACI;KACD;;GAEF;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;OACE;OACA;UACG;OACH;UACG;OACH;UACG;OACH;OACA;OACA;OACA;OACA;KACF;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;KACG;KACA;;EAEH;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;0BACe;WACf;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;WACA;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;WACE;aACE;aACA;eACE;aACF;eACE;aACF;aACA;aACA;aACA;aACA;aACA;WACF;SACF;QACD;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;iBACE;iBACA;eACF;aACF;SACJ;SACA;WACE;WACA;WACA;WACA;UACD;UACA;QACF;QACA;UACE;YACE;;YAEA;;YAEA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;WACA;0BACe;WACf;WACA;UACD;QACF;QACA;UACE;YACE;YACA;;YAEA;YACA;;YAEA;YACA;;YAEA;YACA;UACF;QACF;MACF;GACH;EACD;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;IACE;EACF;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;EACA;;EAEA;EACA;EACA;EACA;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;QACI;;IAEJ;IACA;IACA;IACA;IACA;MACE;MACA;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;IACE;EACF;IACE;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;;EAEA;IACE;EACF;AACF;;AAEA;EACE;IACE;EACF;;EAEA;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;AACF;;AAEA;EACE;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;EACE;EACA;IACE;IACA;MACE;mCAC6B;IAC/B;IACA;EACF;EACA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;EACA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;YACF;OACL;OACA;SACE;WACE;WACA;aACE;WACF;aACE;WACF;aACE;WACF;aACE;SACJ;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;MACD;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;IACI;EACF;IACE;IACA;IACA;MACE;QACE;4DACoD;MACtD;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;OACM;OACA;OACA;OACA;OACA;OACA;;CAEN;CACA;OACM;OACA;CACN;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;MACF;;IAEF;IACA;MACE;QACE;UACE;YACE;YACA;YACA;cACE;;cAEA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;cACF;cACA;;cAEA;cACA;gBACE;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;IACJ;IACA;MACE;OACC;YACK;YACA;YACA;QACJ;OACD;OACA;MACD;IACF;IACA;IACA;MACE;QACE;QACA;QACA;MACF;MACA;MACA;;MAEA;;MAEA;MACA;MACA;MACA;IACF;IACA;CACH;CACA;CACA;CACA;AACD;IACI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;EAGA;MACI;MACA;;EAEJ;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;QACI;;MAEF;IACF;MACE;IACF;EACF;;EAEA;IACE;;IAEA;MACE;UACI;IACN;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;MACI;;EAEJ;EACA;IACE;IACA;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;YACE;QACJ;QACA;QACA;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;;QAEE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;;IAEA;IACA;IACA;IACA;MACE;IACF;IACA;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;EAEA;IACE;QACI;QACA;IACJ;MACE;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;IACF;IACA;IACA;IACA;MACE;MACA;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;MACE;IACF;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;;IAEA;IACA;IACA;MACE;;MAEA;UACI;;MAEJ;MACA;QACE;MACF;MACA;QACE;QACA;;QAEA;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;QACC;UACE;YACE;UACF;OACH;OACA;SACE;WACE;WACA;WACA;SACF;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;SACE;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;WACE;WACA;kBACO;kBACA;SACT;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;aACE;eACE;iBACE;eACF;eACA;aACF;WACF;SACF;KACJ;CACJ;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;QACE;YACI;;QAEJ;;QAEA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;YACE;UACF;QACF;;QAEA;UACE;;UAEA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;IACE;MACE;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;UACE;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;QACA;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;MACF;;MAEA;MACA;QACE;UACE;QACF;;QAEA;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;cACA;YACF;OACL;QACC;UACE;YACE;cACE;cACA;qBACO;qBACA;qBACA;qBACA;YACT;UACF;QACF;MACF;MACA;QACE;;QAEA;UACE;QACF;QACA;UACE;UACA;QACF;MACF;IACF;CACH;AACD;EACE;IACE;IACA;IACA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;OACM;CACN;CACA;CACA;CACA;CACA;;EAEC;EACA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;iBACA;;UAEP;UACA;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;;UAEA;YACE;cACE;YACF;UACF;QACF;IACJ;IACA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;UACP;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;QACF;IACJ;EACF;;EAEA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;QACT;QACA;MACF;IACF;IACA;MACE;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;IACJ;EACF;CACD;AACD;EACE;IACE;IACA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;;EAEA;IACE;MACE;IACF;MACE;IACF;IACA;MACE;MACA;IACF;MACE;QACE;QACA;MACF;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;IACA;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;;SAEA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;WACF;OACJ;OACA;QACC;QACA;QACA;OACD;KACF;KACA;OACE;SACE;SACA;SACA;;SAEA;;SAEA;SACA;SACA;SACA;;SAEA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;OACE;QACC;OACD;KACF;;KAEA;OACE;SACE;WACE;cACG;cACA;SACL;KACJ;;KAEA;OACE;SACE;aACI;OACN;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;MACF;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;;QAEA;;QAEA;UACE;QACF;;;QAGA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;YACJ;UACF;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;YACF;UACF;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;KACF;KACA;OACE;SACE;OACF;OACA;WACI;OACJ;OACA;WACI;OACJ;KACF;KACA;OACE;;OAEA;;SAEE;SACA;;SAEA;SACA;;SAEA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;;GAEA;;GAEA;;GAEA;KACE;MACC;MACA;MACA;MACA;KACD;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;;SAEF;;SAEA;WACE;;SAEF;;SAEA;WACE;OACJ;KACF;GACF;;;GAGA;GACA;GACA;GACA;GACA;GACA;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;KACH;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;CACA;AACD;EACE;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;AACD;EACE;IACE;IACA;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;KACA;KACA;GACF;CACF;;AAED;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;QACE;MACF;KACD;KACA;OACE;SACE;SACA;SACA;OACF;KACF;GACF;CACF;AACD;CACC;CACA;CACA;CACA;CACA;AACD;;AAEA;AACA;AACA;AACA;EACE;EACA;AACF;AACA;EACE;EACA;IACE;IACA;MACE;QACE;QACA;UACE;UACA;YACE;cACE;gBACE;cACF;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;;OAEA;OACA;OACA;OACA;KACF;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;UACE;YACE;YACA;YACA;cACE;gBACE;gBACA;cACF;YACF;UACF;MACJ;MACA;QACE;QACA;QACA;QACA;MACF;KACD;KACA;OACE;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;QACD;KACH;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;MACA;QACE;MACF;IACF;IACA;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;QACI;QACA;;UAEE;YACE;cACE;gBACE;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;YACF;YACA;cACE;cACA;YACF;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;IACJ;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;KACC;OACE;QACC;OACD;OACA;OACA;OACA;SACE;OACF;KACF;IACD;IACA;MACE;QACE;UACE;YACE;cACE;UACJ;QACF;KACH;IACD;MACE;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;QACF;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;QACA;QACA;MACF;IACF;EACF;CACD;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;kBACkB;EAChB;IACE;IACA;IACA;IACA;IACA;IACA;MACE;UACI;UACA;;MAEJ;QACE;YACI;YACA;YACA;;QAEJ;UACE;YACE;YACA;UACF;UACA;YACE;YACA;UACF;UACA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;YACA;YACA;cACE;cACA;cACA;;cAEA;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;gBACA;cACF;;cAEA;cACA;;cAEA;cACA;YACF;cACE;gBACE;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;UACA;UACA;UACA;UACA;cACI;YACF;UACF;UACA;QACF;;QAEA;QACA;MACF;IACF;EACF;;AAEF;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;GACF;KACE;OACE;SACE;OACF;GACJ;GACA;KACE;OACE;UACG;OACH;KACF;GACF;KACE;KACA;OACE;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;EACA;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;OACC;SACE;SACA;OACF;MACD;IACF;CACH;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;iBACgB;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;UACE;YACE;cACE;cACA;cACA;YACF;QACJ;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;UACrB;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;+BACA;+BACA;UACrB;QACF;MACF;MACA;QACE;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;EACE;EACA;IACE;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;UACE;YACE;QACJ;MACF;MACA;QACE;UACE;YACE;MACN;;MAEA;QACE;;QAEA;UACE;UACA;UACA;WACC;QACH;UACE;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;YACI;MACN;;OAEC;SACE;;SAEA;;SAEA;SACA;SACA;OACF;MACD;IACF;CACH;AACD;EACE;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;;EAGA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;;MAEA;;MAEA;QACE;YACI;MACN;;MAEA;MACA;MACA;MACA;;MAEA;;MAEA;QACE;YACI;MACN;MACA;MACA;;MAEA;UACI;QACF;UACE;MACJ;;MAEA;MACA;;MAEA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;;QAEE;UACE;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;UACE;cACI;8CACgC;cAChC;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;UAEJ;YACE;UACF;;UAEA;YACE;YACA;UACF;YACE;YACA;YACA;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;cACA;cACA;YACF;cACE;cACA;gBACE;cACF;cACA;kBACI;kBACA;YACN;cACE;cACA;cACA;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;cACE;cACA;;cAEA;;cAEA;cACA;gBACE;cACF;;cAEA;gBACE;gBACA;cACF;cACA;cACA;YACF;cACE;cACA;gBACE;gBACA;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;QACA;QACA;QACA;QACA;KACH;KACA;OACE;SACE;OACF;KACF;KACA;OACE;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;UACE;YACE;YACA;YACA;QACJ;MACF;IACF;IACA;MACE;QACE;UACE;UACA;QACF;IACJ;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;;IAEA;IACA;KACC;IACD;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;UACI;MACJ;;MAEA;QACE;QACA;UACE;QACF;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;cACE;cACA;cACA;cACA;;cAEA;cACA;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;GACD;AACH;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;UACC;aACG;eACE;eACA;eACA;eACA;2BACY;2BACA;yBACF;aACZ;SACJ;SACA;WACE;WACA;SACF;OACF;OACA;SACE;SACA;SACA;OACF;KACF;KACA;QACG;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;KACH;GACF;CACF;CACA;AACD;EACE;EACA;IACE;MACE;OACC;OACA;OACA;OACA;IACH;;IAEA;MACE;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;MACF;;MAEA;MACA;IACF;IACA;MACE;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;YACI;YACA;;QAEJ;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;YACE;cACE;cACA;cACA;cACA;cACA;YACF;YACA;UACF;QACF;QACA;UACE;YACE;cACE;cACA;YACF;YACA;cACE;YACF;UACF;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;YACF;UACF;;UAEA;UACA;UACA;;;UAGA;UACA;UACA;UACA;eACK;UACL;QACF;MACF;MACA;SACG;WACE;WACA;WACA;WACA;WACA;WACA;WACA;SACF;MACH;IACF;CACH;;AAED;EACE;EACA;AACF;;AAEA;AACA;yBACyB;EACvB;MACI;AACN;;EAEE;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;;;MAGJ;;;MAGA;QACE;QACA;QACA;MACF;;;MAGA;QACE;QACA;;QAEA;UACE;UACA;QACF;QACA;QACA;QACA;QACA;UACE;QACF;MACF;;;MAGA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;MACF;;;MAGA;QACE;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;UACE;UACA;QACF;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;MACF;;MAEA;MACA;MACA;;;MAGA;;;;MAIA;QACE;UACE;;UAEA;YACE;YACA;YACA;UACF;YACE;cACE;YACF;cACE;YACF;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;;UAEA;UACA;UACA;;UAEA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;gBACI;gBACA;gBACA;;YAEJ;cACE;cACA;mBACK;mBACA;gBACH;gBACA;;gBAEA;kBACE;oBACE;oBACA;oBACA;sBACE;wBACE;wBACA;sBACF;oBACF;sBACE;oBACF;oBACA;kBACF;gBACF;cACF;YACF;cACE;cACA;gBACE;cACF;gBACE;cACF;gBACE;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;YACA;UACF;QACF;;QAEA;;QAEA;QACA;UACE;cACI;UACJ;YACE;YACA;cACE;cACA;YACF;YACA;UACF;QACF;;QAEA;UACE;QACF;;;QAGA;UACE;UACA;YACE;YACA;cACE;cACA;cACA;gBACE;gBACA;cACF;YACF;cACE;YACF;UACF;UACA;QACF;;;QAGA;UACE;YACE;YACA;UACF;QACF;;;QAGA;UACE;;cAEI;UACJ;cACI;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;UAGJ;UACA;;YAEE;YACA;cACE;cACA;cACA;YACF;;YAEA;;YAEA;YACA;cACE;cACA;YACF;YACA;cACE;gBACE;cACF;YACF;cACE;gBACE;gBACA;gBACA;cACF;gBACE;cACF;cACA;YACF;YACA;;YAEA;YACA;YACA;cACE;cACA;cACA;cACA;YACF;UACF;UACA;YACE;cACE;cACA;YACF;cACE;cACA;YACF;UACF;;UAEA;UACA;eACK;eACA;YACH;YACA;;YAEA;YACA;;YAEA;cACE;cACA;gBACE;gBACA;cACF;cACA;cACA;cACA;YACF;cACE;cACA;;cAEA;cACA;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;gBACE;gBACA;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;oBACE;oBACA;oBACA;oBACA;kBACF;gBACF;cACF;gBACE;;gBAEA;gBACA;kBACE;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;sBACI;sBACA;sBACA;sBACA;gBACN;;gBAEA;oBACI;oBACA;oBACA;oBACA;gBACJ;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;cACF;YACF;YACA;YACA;YACA;cACE;YACF;UACF;UACA;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;QACA;UACE;QACF;MACF;;MAEA;QACE;YACI;YACA;cACE;;QAEN;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;AACF;;EAEE;IACE;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;AAEF;;AAEA;AC5nwBA;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,YAAY,iBAAiB;IAC3B;IACA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA,UAAU,eAAe;IACvB;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA,oBAAoB,QAAQ;QACxB;CACP;;MAEK;;MAEA;MACA;MACA;MACA;MACA;QACE;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;MACA;MACA;cACQ;cACA;gBACE;cACF;;MAER;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;;QAEA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;YACE;YACA;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;UACE;cACI;cACA;;UAEJ;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;;UAEA;YACE;gBACI;YACJ;cACE;cACA;YACF;UACF;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;YACE;YACA;UACF;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;QACA;2BACmB;2BACA;;QAEnB;QACA;QACA;UACE;QACF;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;cACE;YACF;YACA;cACE;YACF;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;UACF;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;YACA;cACE;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;YACJ;UACF;;UAEA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;;YAEA;YACA;UACF;YACE;cACE;cACA;YACF;UACF;;UAEA;YACE;YACA;;YAEA;YACA;YACA;cACE;cACA;kBACI;gBACF;UACN;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;YACE;cACE;gBACE;cACF;gBACE;gBACA;gBACA;cACF;YACF;;YAEA;cACE;YACF;;YAEA;cACE;YACF;UACF;UACA;SACD;MACH;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;MACA;;QAEE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;cACA;gBACE;cACF;cACA;cACA;YACF;UACF;YACE;YACA;UACF;UACA;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;wBACc;wBACA;;UAEd;UACA;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;;QAEA;UACE;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;iBACG;iBACA;iBACA;cACH;gBACE;cACF;gBACE;kBACE;kBACA;oBACE;kBACF;gBACF;gBACA;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;YACA;YACA;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;YACE;YACA;UACF;QACF;UACE;;UAEA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;;UAEA;mCACyB;mCACA;QAC3B;QACA;;QAEA;MACF;IACF;;IAEA;2BACuB;MACrB;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;YACE;UACF;;UAEA;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;;cAEA;cACA;;cAEA;cACA;;cAEA;cACA;;cAEA;;cAEA;gBACE;cACF;cACA;YACF;UACF;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;;QAEA;QACA;QACA;;QAEA;QACA;UACE;UACA;UACA;;UAEA;;UAEA;;UAEA;QACF;;QAEA;;QAEA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;QACA;6BACqB;6BACA;;QAErB;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;UACF;;UAEA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;QACA;UACE;UACA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;QACF;;QAEA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;WACC;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;UACD;YACE;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;0BACgB;UAChB;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;EACF;;;AAGF;;ACv1DA;CACC;CACA;CACA;CACA;;AAED;;EAEE;IACE;EACF;;EAEA,YAAY,UAAU;IACpB;IACA;MACE;;MAEA;QACE;QACA;QACA;;UAEE;UACA;cACI;;UAEJ;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;UACA;UACA;UACA;;UAEA;cACI;cACA;4BACc;4BACA;4BACA;4BACA;cACd;wCAC0B;cAC1B;cACA;cACA;cACA;0BACY;0BACA;cACZ;4BACc;oCACQ;oCACA;oCACA;4BACR;oCACQ;oCACA;oCACA;0BACV;cACZ;cACA;cACA;cACA;cACA;cACA;cACA;2BACa;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;;UAEjB;UACA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;YACE;UACF;;UAEA;WACC;WACA;;UAED;YACE;YACA;YACA;YACA;cACE;YACF;YACA;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;YACF;;YAEA;YACA;cACE;;cAEA;cACA;;cAEA;;cAEA;;cAEA;cACA;gBACE;gBACA;gBACA;cACF;;cAEA;;cAEA;gBACE;gBACA;cACF;gBACE;cACF;cACA;;cAEA;;cAEA;gBACE;gBACA;cACF;;cAEA;cACA;gBACE;cACF;;YAEF;UACF;;UAEA;YACE;YACA;UACF;;UAEA;WACC;WACA;;UAED;UACA;YACE;YACA;UACF;YACE;UACF;;UAEA;;UAEA;YACE;UACF;YACE;UACF;;UAEA;YACE;UACF;;UAEA;;UAEA;WACC;WACA;;UAED;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;ACpNF;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;EACE;MACI;AACN;;AAEA;EACE;IACE;EACF;EACA;EACA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;OACA;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;KACA;MACC;OACC;MACD;;KAED;KACA;OACE;OACA;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;OACA;OACA;KACF;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;KACA;OACE;OACA;KACF;GACF;CACF;CACA;CACA;CACA;CACA;GACE;KACE;KACA;OACE;OACA;SACE;SACA;OACF;KACF;GACF;CACF;CACA;CACA;GACE;KACE;KACA;SACI;WACE;SACF;GACN;;CAEF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;sCACqC;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE,UAAU,SAAS;IACjB;;IAEA;MACE;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;MAEE;QACE;QACA;QACA;QACA;;MAEF;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;MACJ;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;MACJ;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;UACE;YACE;YACA;YACA;;UAEF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;UACF;UACA;;UAEA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;cACE;kBACI;gBACF;kBACE;gBACF;kBACE;gBACF;cACF;YACF;UACF;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;UACA;UACA;;;UAGA;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;;;MAGA;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;;UAEA;YACE;;YAEA;YACA;cACE;gBACE;gBACA;cACF;cACA;cACA;gBACE;kBACE;oBACE;oBACA;oBACA;kBACF;;kBAEA;kBACA;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;gBACF;cACF;gBACE;gBACA;gBACA;gBACA;cACF;cACA;gBACE;kBACE;kBACA;YACN;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;cACE;;YAEF;cACE;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;;YAEF;cACE;gBACE;;cAEF;gBACE;gBACA;gBACA;kBACE;sBACI;sBACA;oBACF;gBACJ;gBACA;gBACA;kBACE;kBACA;oBACE;sBACE;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;gBACF;cACF;;cAEA;;cAEA;;cAEA;YACF;cACE;;cAEA;;cAEA;YACF;;YAEA;cACE;gBACE;gBACA;gBACA;cACF;cACA;;YAEF;cACE;cACA;cACA;cACA;cACA;;cAEA;YACF;;YAEA;YACA;UACF;;;UAGA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;EACF;;;AAGF;;AC1pBA;;;;;ACIA;;IAEI;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;;IAGA;;IAEA;;;;IAIA;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;IAEA;;IAEA;;;IAGA;;MAEE;UACI;gBACM;gBACA;;MAEV;sBACgB;cACR;cACA;cACA;UACJ;MACJ;;gBAEU;MACV;UACI;MACJ;MACA;gBACU;gBACA;UACN;UACA;UACA;MACJ;;MAEA;QACE;UACE;UACA;MACJ;UACI;MACJ;;MAEA;;IAEF;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;MACE;QACE;MACF;IACF;;;IAGA;MACE;;QAEE;;QAEA;YACI;QACJ;;QAEA;YACI;;YAEA;;cAEE;cACA;cACA;;cAEA;kBACI;kBACA;cACJ;cACA;kBACI;cACJ;cACA;;YAEF;;cAEE;kBACI;kBACA;cACJ;;YAEF;;QAEJ;;QAEA;MACF;IACF;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;YACI;YACA;gBACI;YACJ;QACJ;QACA;IACJ;;IAEA;QACI;YACI;YACA;;4BAEgB;;4BAEA;gCACI;gBAChB;;4BAEY;YAChB;QACJ;QACA;IACJ;;IAEA;;QAEI;YACI;;YAEA;UACF;;YAEE;UACF;UACA;QACF;IACJ;QACI;;QAEA;UACE;QACF;UACE;YACE;UACF;QACF;;QAEA;IACJ;;;;IAIA;QACI;IACJ;;;IAGA;;QAEI;;wBAEgB;;sBAEF;YACV;UACF;QACF;QACA;IACJ;IACA;QACI;IACJ;IACA;QACI;oCAC4B;YACxB;;YAEA;QACJ;IACJ;;;;KAIC;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;SAEE;;SAEA;8CACqC;SACrC;;SAEA;;SAEA;WACE;SACF;SACA;;OAEF;;OAEA;KACF;;;IAGD;IACA;;;IAGA;;IAEA;IACA;IACA;;;;IAIA;QACI;IACJ;;IAEA;;;IAGA;;oDAEgD;;IAEhD;;AAEJ;;ACvSA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;IAEI;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;YACQ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;IAEJ;KACC;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;;QAEA;QACA;QACA;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;;QAEJ;YACI;gBACI;gBACA;YACJ;YACA;QACJ;;QAEA;YACI;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;YACI;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;YACJ;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;QACJ;;QAEA;YACI;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;YACA;;QAEJ;QACA;YACI;gBACI;YACJ;QACJ;;QAEA;QACA;;YAEI;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;;gBAEA;gBACA;gBACA;gBACA;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;;gBAEI;gBACA;gBACA;oBACI;gBACJ;;gBAEA;oBACI;gBACJ;YACJ;QACJ;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;gBACA;gBACA;YACJ;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;;YAEA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;YACI;;YAEA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;gBACI;gBACA;YACJ;;YAEA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;;QAEA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;;QAEA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;YACI;YACA;QACJ;;QAEA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;YACA;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;IACJ;;IAEA;IACA;IACA;IACA;;IAEA;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;YACJ;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;OAED;QACC;QACA;QACA;QACA;QACA;QACA;QACA;;YAEI;YACA;gBACI;YACJ;;YAEA;YACA;QACJ;;QAEA;SACC;SACA;QACD;IACJ;;IAEA;IACA;;IAEA;IACA;QACI;IACJ;AACJ;;ACx7BA;AACA;AACA;;AAEA;;AAEA,eAAe,OAAO;EACpB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,aAAa,KAAK;EAChB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;AC3BA;;AAEA;IACI;KACC;KACA;KACA;KACA;KACA;IACD;AACJ;;AAEA,mCAAmC,cAAc;IAC7C;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;QACA;QACA;QACA;QACA;;QAEA;YACI;YACA;QACJ;;QAEA;YACI;gBACI;YACJ;;YAEA;gBACI;gBACA;oBACI;gBACJ;oBACI;gBACJ;YACJ;;YAEA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;gBACI;gBACA;gBACA;YACJ;gBACI;oBACI;gBACJ;YACJ;QACJ;IACJ;;IAEA;AACJ;;AAEA,qCAAqC,SAAS;IAC1C;IACA;IACA;QACI;YACI;gBACI;YACJ;QACJ;QACA;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;IACJ;;IAEA;QACI;QACA;QACA;YACI;YACA;YACA;;YAEA;YACA;;YAEA;gBACI;oBACI;oBACA;;oBAEA;wBACI;wBACA;wBACA;4BACI;4BACA;4BACA;wBACJ;4BACI;wBACJ;;wBAEA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;oBACJ;;oBAEA;wBACI;oBACJ;;oBAEA;;oBAEA;gBACJ;YACJ;QACJ;IACJ;AACJ;;AAEA,kCAAkC,SAAS;IACvC;QACI;IACJ;IACA;IACA;AACJ;;AAEA;AACA,mCAAmC,cAAc;IAC7C;QACI;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;QACR;IACJ;AACJ;;ACvRA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;;EAEA,4CAA4C,OAAO;;IAEjD;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;;IAED;;IAEA;KACC;KACA;KACA;IACD;sBACkB;sBACA;wBACE;0BACE;4BACE;0BACF;0BACA;wBACF;sBACF;sBACA;oBACF;;IAEhB;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;IACD;;IAEA,YAAY,mEAAA;;MAEV;MACA;MACA;MACA;QACE;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;YACF;UACF;;UAEA;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;MACD;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;;MAGA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;YACA;YACA;YACA;UACF;QACF;MACF;;;MAGA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;MACD;;MAEA;QACE;;QAEA;QACA;QACA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;UACE;;UAEA;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;;UAEE;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;YACA;cACE;YACF;cACE;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;;YAEA;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;UACE;QACF;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;QACF;UACE;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;UACF;QACF;;QAEA;;MAEF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;;QAEA;UACE;;UAEA;YACE;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;;UAEA;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;QACA;UACE;YACE;;YAEA;cACE;YACF;cACE;YACF;;YAEA;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;YACE;YACA;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;;IAEF,CAAC,CAAA;EACH;;EAEA,YAAY,MAAM,GAAG,YAAA;IACnB;MACE;MACA;QACE;;QAEA;UACE;UACA;;UAEA;;UAEA;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;UACE;QACF;MACF;IACF;EACF,CAAC,CAAA;;EAED,KAAK,YAAA;IACH;IACA;EACF,CAAC,CAAA;;AAEH;;ACljBA;CACC;CACA;CACA;CACA;CACA;;AAED;AACA;EACE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;AAEJ;EACE;AACF;;AAEA;EACE;IACE;MACE;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;EACA;;EAEA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;EACA;AACF;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;MACI;MACA;MACA;MACA;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;MACF;;MAEA;MACA;IACF;IACA;IACA;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;UACE;QACF;QACA;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;QACA;QACA;UACE;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;UACE;UACA;YACE;YACA;cACE;cACA;YACF;UACF;YACE;UACF;QACF;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,QAAQ;;;AAGlD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;EACN;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,gBAAgB;;AAE1D;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;MACI;MACA;MACA;;EAEJ;GACC;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;;EAEA;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;;IAEA;;IAEA;IACA;IACA;IACA;EACF;EACA;;EAEA;EACA;;EAEA;IACE;IACA;IACA;;IAEA;IACA;MACE;IACF;EACF;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;IACA;;EAEF;;EAEA;IACE;IACA;IACA;EACF;EACA;IACE;IACA;IACA;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;IACE;;EAEF;;EAEA;IACE;IACA;IACA;;IAEA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;IACA;EACF;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;EACE;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;;EAEA;IACE;MACE;QACE;MACF;MACA;QACE;QACA;MACF;MACA;IACF;IACA;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;IACA;MACE;IACF;IACA;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;GACC;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;EACA;EACA;EACA;IACE;MACE;QACE;MACF;MACA;MACA;IACF;EACF;AACF;;AAEA;AACA,2CAA2C,kBAAkB;;AAE7D;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;IACA;IACA;EACF;;;EAGA;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;;IAEF;MACE;QACE;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;MACA;QACE;;QAEA;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;YACS;GACT;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;;MAEA;QACE;;QAEA;QACA;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;;QAEA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;QACA;;QAEA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;QACA;;QAEA;MACF;IACF;EACF;AACF;;AAEA,6CAA6C,UAAU;;AAEvD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;;EAEA;EACA;;IAEE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;;MAEA;UACI;MACJ;MACA;;MAEA;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;;MAEA;QACE;UACE;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;MACA;MACA;IACF;;IAEA;IACA;IACA;;IAEA;IACA;QACI;QACA;;IAEJ;IACA;MACE;IACF;;IAEA;MACE;IACF;IACA;;IAEA;IACA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;;IAEA;EACF;;EAEA;EACA;IACE;EACF;;EAEA;EACA;IACE;QACI;;IAEJ;IACA;OACG;OACA;IACH;IACA;IACA;OACG;OACA;IACH;;IAEA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;;IAEA;EACF;;;EAGA;EACA;IACE;IACA;IACA;IACA;EACF;EACA;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;QACA;QACA;MACF;QACE;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;MACA;MACA;MACA;;MAEA;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;QACE;;QAEA;;QAEA;QACA;UACE;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;;QAEA;MACF;QACE;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;YACI;QACJ;;QAEA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;MACA;;MAEA;MACA;QACE;QACA;UACE;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;YACE;UACF;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA,WAAW,MAAM;;;AAGnB;AACA;;EAEE;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;QACA;;QAEA;UACE;QACF;QACA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,KAAK;;AAEjD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,aAAa;;AAEzD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;IACE;MACE;IACF;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;MACI;MACA;;EAEJ;EACA;EACA;IACE;MACE;QACE;QACA;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;QACF;QACA;UACE;QACF;;QAEA;;QAEA;UACE;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;;UAEA;YACE;cACE;YACF;;YAEA;YACA;UACF;QACF;;QAEA;UACE;cACI;cACA;;UAEJ;UACA;UACA;;UAEA;YACE;cACE;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;UACA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;UACA;QACF;MACF;IACF;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;IACA;IACA;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;QACF;;QAEA;QACA;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;UACA;QACF;;QAEA;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA,6CAA6C,MAAM;AACnD,6CAA6C,MAAM;;AAEnD;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;;MAEA;MACA;;MAEA;QACE;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;UACA;;UAEA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;IACA;MACE;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE,YAAY,MAAM;EAClB,YAAY,YAAY;EACxB,YAAY,cAAc;;AAE5B;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;AACF;;AAEA;EACE,SAAS,OAAO;EAChB,SAAS,eAAe;AAC1B;;ACzkHA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;EACA;;EAEA;EACA;MACI;;EAEJ;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;;IAEA;IACA;;IAEA;IACA;EACF;;EAEA;EACA;MACI;MACA;;EAEJ;GACC;GACA;GACA;EACD;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;IACE;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;EACJ;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;IACF;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;;IAEJ;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;UACE;QACF;MACF;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;QACA;;IAEJ;QACI;MACF;IACF;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;QACI;QACA;;IAEJ;MACE;IACF;IACA;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;KACC;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;QACI;QACA;;IAEJ;IACA;;IAEA;IACA;;IAEA;IACA;MACE;QACE;QACA;IACJ;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;MACE;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;OACC;OACA;IACH;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;QACD;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;MACA;MACA;MACA;MACA;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;MACA;MACA;OACC;MACD;MACA;MACA;OACC;;OAEA;MACD;OACC;;OAEA;MACD;OACC;;UAEG;;OAEH;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;OACC;MACD;MACA;MACA;cACQ;MACR;OACC;MACD;MACA;MACA;OACC;MACD;OACC;;OAEA;;OAEA;MACD;OACC;MACD;MACA;MACA;;MAEA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;QACA;QACA;UACE;UACA;cACI;UACJ;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;QACA;UACE;UACA;YACE;;UAEF;UACA;YACE;;UAEF;YACE;YACA;YACA;QACJ;MACF;QACE;MACF;MACA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;MACF;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;QACA;UACE;YACE;YACA;YACA;UACF;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;MACA;MACA;QACE;MACF;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;UACF;QACF;QACA;QACA;UACE;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;;QAEA;YACI;UACF;UACA;YACE;UACF;UACA;cACI;cACA;;UAEJ;UACA;YACE;UACF;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;QACE;QACA;MACF;MACA;UACI;;MAEJ;MACA;UACI;UACA;QACF;MACF;MACA;MACA;MACA;QACE;MACF;MACA;MACA;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;UACA;UACA;;QAEF;UACE;UACA;YACE;YACA;YACA;;QAEJ;QACA;UACE;UACA;UACA;MACJ;MACA;MACA;QACE;QACA;YACI;;QAEJ;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;YACI;;QAEJ;QACA;cACM;cACA;YACF;UACF;QACF;MACF;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;gBACI;;YAEJ;cACE;gBACE;kBACE;gBACF;cACF;YACF;cACE;YACF;UACF;QACF;MACF;MACA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;MACA;MACA;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;UACA;UACA;YACE;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;YACA;cACE;gBACE;gBACA;YACJ;YACA;YACA;YACA;;YAEA;YACA;cACE;YACF;UACF;QACF;QACA;UACE;YACE;YACA;cACE;YACF;UACF;UACA;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;UACI;;MAEJ;QACE;QACA;QACA;MACF;MACA;QACE;YACI;;QAEJ;cACM;cACA;YACF;UACF;YACE;UACF;UACA;QACF;MACF;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;;QAEA;UACE;cACI;;UAEJ;YACE;YACA;UACF;QACF;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;UACI;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;UACI;UACA;UACA;QACF;MACF;MACA;MACA;MACA;MACA;QACE;UACE;UACA;QACF;QACA;MACF;MACA;MACA;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;IACA;IACA;MACE;QACE;UACE;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;QACF;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;IACA;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;MACF;;MAEA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;UACI;;MAEJ;UACI;UACA;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;QACA;;QAEA;YACI;;QAEJ;UACE;UACA;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;UACE;cACI;;UAEJ;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;MACA;QACE;MACF;QACE;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;YACA;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;UACE;UACA;QACF;UACE;QACF;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;QACF;QACA;UACE;QACF;MACF;QACE;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;MACA;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;YACE;QACJ;MACF;MACA;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;YACF;UACF;UACA;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;YACI;QACJ;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;QACA;MACF;MACA;MACA;MACA;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;;MAEA;QACE;QACA;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;QACA;QACA;MACF;MACA;QACE;QACA;UACE;YACE;UACF;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;;QAEA;UACE;QACF;UACE;YACE;UACF;UACA;cACI;;UAEJ;YACE;cACE;YACF;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;UACE;QACF;QACA;QACA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;QACE;QACA;MACF;MACA;MACA;MACA;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;MACA;UACI;UACA;;MAEJ;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;QACA;QACA;QACA;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;UACE;YACE;gBACI;gBACA;;YAEJ;YACA;YACA;cACE;gBACE;cACF;cACA;cACA;YACF;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;MACF;MACA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;UACI;UACA;;MAEJ;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;;QAEA;QACA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;;QAEA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;MACA;UACI;;MAEJ;QACE;QACA;MACF;MACA;MACA;QACE;QACA;;MAEF;MACA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;QACA;;MAEF;MACA;MACA;;MAEA;QACE;MACF;QACE;QACA;MACF;MACA;QACE;MACF;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;;MAEJ;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;cACI;;UAEJ;YACE;YACA;QACJ;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;MACE;QACE;YACI;;QAEJ;UACE;cACI;cACA;;UAEJ;YACE;UACF;UACA;YACE;YACA;QACJ;MACF;IACF;;IAEA;EACF;;EAEA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;EACF;EACA;EACA;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;ACp/NA;AACA;AACA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;MACE;IACF;MACE;EACJ;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;;IAEA;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;YACE;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;YACE;UACF;UACA;YACE;UACF;;UAEA;YACE;UACF;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;UACA;UACA;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;;IAEA;MACE;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;cACF;YACF;YACA;cACE;YACF;YACA;UACF;UACA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;EACF;;;;EAIA;;EAEA;;IAEE;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;QACA;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;;MAEF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;;MAEA;MACA;;MAEA;;MAEA;QACE;;MAEF;QACE;MACF;QACE;;MAEF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;;MAEA;;MAEA;QACE;MACF;QACE;;MAEF;QACE;UACE;UACA;QACF;UACE;UACA;kBACQ;QACV;UACE;UACA;QACF;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;UACI;UACA;;MAEJ;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;;MAEA;MACA;;MAEA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;;MAEF;QACE;;QAEA;UACE;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;MACF;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;;MAEA;QACE;UACE;YACE;cACE;YACF;cACE;UACJ;YACE;;UAEF;UACA;QACF;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;IACE;MACE;;IAEF;EACF;;EAEA;EACA;IACE;;;EAGF;EACA;EACA;EACA;AACF","file":"libs.js","sourcesContent":["/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one.  The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n *   error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n  ErrorConstructor = ErrorConstructor || Error;\n  return function () {\n    var code = arguments[0],\n      prefix = '[' + (module ? module + ':' : '') + code + '] ',\n      template = arguments[1],\n      templateArgs = arguments,\n      stringify = function (obj) {\n        if (typeof obj === 'function') {\n          return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n        } else if (typeof obj === 'undefined') {\n          return 'undefined';\n        } else if (typeof obj !== 'string') {\n          return JSON.stringify(obj);\n        }\n        return obj;\n      },\n      message, i;\n\n    message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n      var index = +match.slice(1, -1), arg;\n\n      if (index + 2 < templateArgs.length) {\n        arg = templateArgs[index + 2];\n        if (typeof arg === 'function') {\n          return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n        } else if (typeof arg === 'undefined') {\n          return 'undefined';\n        } else if (typeof arg !== 'string') {\n          return toJson(arg);\n        }\n        return arg;\n      }\n      return match;\n    });\n\n    message = message + '\\nhttp://errors.angularjs.org/1.3.0-rc.3/' +\n      (module ? module + '/' : '') + code;\n    for (i = 2; i < arguments.length; i++) {\n      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n        encodeURIComponent(stringify(arguments[i]));\n    }\n    return new ErrorConstructor(message);\n  };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n  msie: true,\n  jqLite: true,\n  jQuery: true,\n  slice: true,\n  push: true,\n  toString: true,\n  ngMinErr: true,\n  angularModule: true,\n  uid: true,\n  REGEX_STRING_REGEXP: true,\n  VALIDITY_STATE_PROPERTY: true,\n\n  lowercase: true,\n  uppercase: true,\n  manualLowercase: true,\n  manualUppercase: true,\n  nodeName_: true,\n  isArrayLike: true,\n  forEach: true,\n  sortedKeys: true,\n  forEachSorted: true,\n  reverseParams: true,\n  nextUid: true,\n  setHashKey: true,\n  extend: true,\n  int: true,\n  inherit: true,\n  noop: true,\n  identity: true,\n  valueFn: true,\n  isUndefined: true,\n  isDefined: true,\n  isObject: true,\n  isString: true,\n  isNumber: true,\n  isDate: true,\n  isArray: true,\n  isFunction: true,\n  isRegExp: true,\n  isWindow: true,\n  isScope: true,\n  isFile: true,\n  isBlob: true,\n  isBoolean: true,\n  isPromiseLike: true,\n  trim: true,\n  isElement: true,\n  makeMap: true,\n  size: true,\n  includes: true,\n  arrayRemove: true,\n  isLeafNode: true,\n  copy: true,\n  shallowCopy: true,\n  equals: true,\n  csp: true,\n  concat: true,\n  sliceArgs: true,\n  bind: true,\n  toJsonReplacer: true,\n  toJson: true,\n  fromJson: true,\n  startingTag: true,\n  tryDecodeURIComponent: true,\n  parseKeyValue: true,\n  toKeyValue: true,\n  encodeUriSegment: true,\n  encodeUriQuery: true,\n  angularInit: true,\n  bootstrap: true,\n  getTestability: true,\n  snake_case: true,\n  bindJQuery: true,\n  assertArg: true,\n  assertArgFn: true,\n  assertNotHasOwnProperty: true,\n  getter: true,\n  getBlockNodes: true,\n  hasOwnProperty: true,\n  createMap: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * 
\n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n : s;\n};\nvar manualUppercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n lowercase = manualLowercase;\n uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n msie,\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n push = [].push,\n toString = Object.prototype.toString,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n if (obj == null || isWindow(obj)) {\n return false;\n }\n\n var length = obj.length;\n\n if (obj.nodeType === 1 && length) {\n return true;\n }\n\n return isString(obj) || isArray(obj) || length === 0 ||\n typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n // Need to check if hasOwnProperty exists,\n // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else {\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction sortedKeys(obj) {\n var keys = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = sortedKeys(obj);\n for ( var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n var h = dst.$$hashKey;\n\n for (var i = 1, ii = arguments.length; i < ii; i++) {\n var obj = arguments[i];\n if (obj) {\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n dst[key] = obj[key];\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\nfunction int(str) {\n return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n ```\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // we are a direct element\n || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(\",\"), i;\n for ( i = 0; i < items.length; i++ )\n obj[ items[i] ] = true;\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || element[0].nodeName);\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n var count = 0, key;\n\n if (isArray(obj) || isString(obj)) {\n return obj.length;\n } else if (isObject(obj)) {\n for (key in obj)\n if (!ownPropsOnly || obj.hasOwnProperty(key))\n count++;\n }\n\n return count;\n}\n\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >=0)\n array.splice(index, 1);\n return value;\n}\n\nfunction isLeafNode (node) {\n if (node) {\n switch (nodeName_(node)) {\n case \"option\":\n case \"pre\":\n case \"title\":\n return true;\n }\n }\n return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n * Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n * provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n \n \n
\n
\n Name:
\n E-mail:
\n Gender: male\n female
\n \n \n
\n
form = {{user | json}}
\n
master = {{master | json}}
\n
\n\n \n
\n
\n */\nfunction copy(source, destination, stackSource, stackDest) {\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n }\n\n if (!destination) {\n destination = source;\n if (source) {\n if (isArray(source)) {\n destination = copy(source, [], stackSource, stackDest);\n } else if (isDate(source)) {\n destination = new Date(source.getTime());\n } else if (isRegExp(source)) {\n destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n destination.lastIndex = source.lastIndex;\n } else if (isObject(source)) {\n var emptyObject = Object.create(Object.getPrototypeOf(source));\n destination = copy(source, emptyObject, stackSource, stackDest);\n }\n }\n } else {\n if (source === destination) throw ngMinErr('cpi',\n \"Can't copy! Source and destination are identical.\");\n\n stackSource = stackSource || [];\n stackDest = stackDest || [];\n\n if (isObject(source)) {\n var index = stackSource.indexOf(source);\n if (index !== -1) return stackDest[index];\n\n stackSource.push(source);\n stackDest.push(destination);\n }\n\n var result;\n if (isArray(source)) {\n destination.length = 0;\n for ( var i = 0; i < source.length; i++) {\n result = copy(source[i], null, stackSource, stackDest);\n if (isObject(source[i])) {\n stackSource.push(source[i]);\n stackDest.push(result);\n }\n destination.push(result);\n }\n } else {\n var h = destination.$$hashKey;\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n delete destination[key];\n });\n }\n for ( var key in source) {\n if(source.hasOwnProperty(key)) {\n result = copy(source[key], null, stackSource, stackDest);\n if (isObject(source[key])) {\n stackSource.push(source[key]);\n stackDest.push(result);\n }\n destination[key] = result;\n }\n }\n setHashKey(destination,h);\n }\n\n }\n return destination;\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2) {\n if (t1 == 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) == o2.length) {\n for(key=0; key 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n if (typeof obj === 'undefined') return undefined;\n return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone();\n try {\n // turns out IE does not let you set .html() on elements which\n // are not allowed to have children. So we just ignore it.\n element.empty();\n } catch(e) {}\n // As Per DOM Standards\n var TEXT_NODE = 3;\n var elemHtml = jqLite('
').append(element).html();\n try {\n return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n } catch(e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch(e) {\n // Ignore any invalid uri component\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {}, key_value, key;\n forEach((keyValue || \"\").split('&'), function(keyValue) {\n if ( keyValue ) {\n key_value = keyValue.replace(/\\+/g,'%20').split('=');\n key = tryDecodeURIComponent(key_value[0]);\n if ( isDefined(key) ) {\n var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if(isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n element = jqLite(element);\n for (i=0; i` or `` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n \n \n
\n I can add: {{a}} + {{b}} = {{ a+b }}\n
\n
\n \n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n \n
\n *\n * Using `ngStrictDi`, you would see something like this:\n *\n \n \n
\n
\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n

This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n

\n
\n\n
\n Name:
\n Hello, {{name}}!\n\n

This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n

\n
\n\n
\n I can add: {{a}} + {{b}} = {{ a+b }}\n\n

The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n

\n
\n
\n
\n \n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = \"World\";\n }\n GoodController2.$inject = ['$scope'];\n \n \n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n \n
\n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * ```html\n * \n * \n * \n *
\n * {{greeting}}\n *
\n *\n * \n * \n * \n * \n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a run block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * - `strictDi`: disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === document) ? 'document' : startingTag(element);\n //Encode angle brackets to prevent input from being sanitized to empty string #8683\n throw ngMinErr(\n 'btstrpd',\n \"App Already Bootstrapped with this Element '{0}'\",\n tag.replace(//,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n doBootstrap();\n };\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n return angular.element(rootElement).injector().get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nvar skipDestroyOnNextJQueryCleanData;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n jQuery = window.jQuery;\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: JQLitePrototype.controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n\n // All nodes removed from the DOM via various jQuery APIs like .remove()\n // are passed through jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jQuery.cleanData;\n jQuery.cleanData = function(elems) {\n var events;\n if (!skipDestroyOnNextJQueryCleanData) {\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jQuery._data(elem, \"events\");\n if (events && events.$destroy) {\n jQuery(elem).triggerHandler('$destroy');\n }\n }\n } else {\n skipDestroyOnNextJQueryCleanData = false;\n }\n originalCleanData(elems);\n };\n } else {\n jqLite = JQLite;\n }\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {jqLite} jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original\n // collection, otherwise update the original collection.\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes = [node];\n\n do {\n node = node.nextSibling;\n if (!node) break;\n blockNodes.push(node);\n } while (node !== endNode);\n\n return jqLite(blockNodes);\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving Angular\n * modules.\n * All modules (angular core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * When passed two or more arguments, a new module is created. If passed only one argument, an\n * existing module (the name passed as the first argument to `module`) is retrieved.\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n \"the module name or forgot to load it. If registering a module ensure that you \" +\n \"specify the dependencies as the second argument.\", name);\n }\n\n /** @type {!Array.>} */\n var invokeQueue = [];\n\n /** @type {!Array.} */\n var configBlocks = [];\n\n /** @type {!Array.} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLater('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLater('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLater('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constant are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link ngAnimate.$animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLater('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name.\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n */\n filter: invokeLater('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLater('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLater('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to register work which needs to be performed on module loading.\n * For more about how to configure services, see\n * {@link providers#providers_provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global angularModule: true,\n version: true,\n\n $LocaleProvider,\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n styleDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCspDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DocumentProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpBackendProvider,\n $LocationProvider,\n $LogProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $$AsyncCallbackProvider,\n $WindowProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n full: '1.3.0-rc.3', // all of these placeholder strings will be replaced by grunt's\n major: 1, // package task\n minor: 3,\n dot: 0,\n codeName: 'aggressive-pacifism'\n};\n\n\nfunction publishExternalAPI(angular){\n extend(angular, {\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'lowercase': lowercase,\n 'uppercase': uppercase,\n 'callbacks': {counter: 0},\n 'getTestability': getTestability,\n '$$minErr': minErr,\n '$$csp': csp,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n '$$hasClass': jqLiteHasClass\n });\n\n angularModule = setupModuleLoader(window);\n try {\n angularModule('ngLocale');\n } catch (e) {\n angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n }\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n style: styleDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpBackend: $HttpBackendProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$asyncCallback : $$AsyncCallbackProvider\n });\n }\n ]);\n}\n\n/* global JQLitePrototype: true,\n addEventListenerFn: true,\n removeEventListenerFn: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n *
jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.
\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n *
**Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.
\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1,\n addEventListenerFn = function(element, type, fn) {\n element.addEventListener(type, fn, false);\n },\n removeEventListenerFn = function(element, type, fn) {\n element.removeEventListener(type, fn, false);\n };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n return name.\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).\n replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, ''],\n\n 'thead': [1, '', '
'],\n 'col': [2, '', '
'],\n 'tr': [2, '', '
'],\n 'td': [3, '', '
'],\n '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === 1 || !nodeType || nodeType === 9;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1>\") + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = \"\";\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n fragment.innerHTML = \"\"; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) != '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants){\n if (!onlyDescendants) jqLiteRemoveData(element);\n\n if (element.querySelectorAll) {\n var descendants = element.querySelectorAll('*');\n for (var i = 0, l = descendants.length; i < l; i++) {\n jqLiteRemoveData(descendants[i]);\n }\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n removeEventListenerFn(element, type, events[type]);\n }\n delete events[type];\n }\n } else {\n forEach(type.split(' '), function(type) {\n if (isUndefined(fn)) {\n removeEventListenerFn(element, type, events[type]);\n delete events[type];\n } else {\n arrayRemove(events[type] || [], fn);\n }\n });\n }\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n return;\n }\n\n if (expandoStore.handle) {\n if (expandoStore.events.$destroy) {\n expandoStore.handle({}, '$destroy');\n }\n jqLiteOff(element);\n }\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[key] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[key];\n } else { // mass-setter: data({key1: val1, key2: val2})\n extend(data, key);\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n forEach(cssClasses.split(' '), function(cssClass) {\n element.setAttribute('class', trim(\n (\" \" + (element.getAttribute('class') || '') + \" \")\n .replace(/[\\n\\t]/g, \" \")\n .replace(\" \" + trim(cssClass) + \" \", \" \"))\n );\n });\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, \" \");\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n existingClasses += cssClass + ' ';\n }\n });\n\n element.setAttribute('class', trim(existingClasses));\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if(element.nodeType == 9) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if ((value = jqLite.data(element, names[i])) !== undefined) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === 11 && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: function(fn) {\n var fired = false;\n\n function trigger() {\n if (fired) return;\n fired = true;\n fn();\n }\n\n // check if document is already loaded\n if (document.readyState === 'complete'){\n setTimeout(trigger);\n } else {\n this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n // jshint -W064\n JQLite(window).on('load', trigger); // fallback to window.onload for others\n // jshint +W064\n this.on('DOMContentLoaded', trigger);\n }\n },\n toString: function() {\n var value = [];\n forEach(this, function(e){ value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength' : 'minlength',\n 'ngMaxlength' : 'maxlength',\n 'ngMin' : 'min',\n 'ngMax' : 'max',\n 'ngPattern' : 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(element, name) {\n var nodeName = element.nodeName;\n return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = camelCase(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value){\n var lowercasedName = lowercase(name);\n if (BOOLEAN_ATTR[lowercasedName]) {\n if (isDefined(value)) {\n if (!!value) {\n element[name] = true;\n element.setAttribute(name, lowercasedName);\n } else {\n element[name] = false;\n element.removeAttribute(lowercasedName);\n }\n } else {\n return (element[name] ||\n (element.attributes.getNamedItem(name)|| noop).specified)\n ? lowercasedName\n : undefined;\n }\n } else if (isDefined(value)) {\n element.setAttribute(name, value);\n } else if (element.getAttribute) {\n // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n // some elements (e.g. Document) don't have get attribute, so return undefined\n var ret = element.getAttribute(name, 2);\n // normalize non-existing attributes to undefined (as jQuery)\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === 1 || nodeType === 3) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function (option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result.length === 0 ? null : result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name){\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function (event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n eventFns[i].call(element, event);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported){\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n while (i--) {\n type = types[i];\n var eventFns = events[type];\n\n if (!eventFns) {\n events[type] = [];\n\n if (type === 'mouseenter' || type === 'mouseleave') {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n\n jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) {\n var target = this, related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if ( !related || (related !== target && !target.contains(related)) ){\n handle(event, type);\n }\n });\n\n } else {\n if (type !== '$destroy') {\n addEventListenerFn(element, type, handle);\n }\n }\n eventFns = events[type];\n }\n eventFns.push(fn);\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node){\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element){\n if (element.nodeType === 1)\n children.push(element);\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== 1 && nodeType !== 11) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === 1) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child){\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n wrapNode = jqLite(wrapNode).eq(0).clone()[0];\n var parent = element.parentNode;\n if (parent) {\n parent.replaceChild(wrapNode, element);\n }\n wrapNode.appendChild(element);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className){\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name){\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for(var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n\n // bind legacy bind/unbind to on/off\n JQLite.prototype.bind = JQLite.prototype.on;\n JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType == 'function' || (objType == 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n if (isolatedUid) {\n var uid = 0;\n this.nextUid = function() {\n return ++uid;\n };\n }\n forEach(array, this.put, this);\n}\nHashMap.prototype = {\n /**\n * Store key value pair\n * @param key key to store can be any type\n * @param value value to store can be any type\n */\n put: function(key, value) {\n this[hashKey(key, this.nextUid)] = value;\n },\n\n /**\n * @param key\n * @returns {Object} the value for the key\n */\n get: function(key) {\n return this[hashKey(key, this.nextUid)];\n },\n\n /**\n * Remove the key/value pair\n * @param key\n */\n remove: function(key) {\n var value = this[key = hashKey(key, this.nextUid)];\n delete this[key];\n return value;\n }\n};\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('
{{content.label}}
');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n args = fnText.match(FN_ARGS);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n fnText,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n fnText = fn.toString().replace(STRIP_COMMENTS, '');\n argDecl = fnText.match(FN_ARGS);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n * @kind function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * }).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!Function} fn The function to invoke. Function parameters are injected according to the\n * {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n * for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new HashMap([], true),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function() {\n throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n })),\n instanceCache = {},\n instanceInjector = (instanceCache.$injector =\n createInternalInjector(instanceCache, function(servicename) {\n var provider = providerInjector.get(servicename + providerSuffix);\n return instanceInjector.invoke(provider.$get, provider, undefined, servicename);\n }));\n\n\n forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n }\n return providerCache[name + providerSuffix] = provider_;\n }\n\n function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val)); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad){\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.put(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for(i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n /* jshint -W022 */\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n return cache[serviceName] = factory(serviceName);\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = [],\n $inject = annotate(fn, strictDi, serviceName),\n length, i,\n key;\n\n for(i = 0, length = $inject.length; i < length; i++) {\n key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(\n locals && locals.hasOwnProperty(key)\n ? locals[key]\n : getService(key)\n );\n }\n if (isArray(fn)) {\n fn = fn[length];\n }\n\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n }\n\n function instantiate(Type, locals, serviceName) {\n var Constructor = function() {},\n instance, returnedValue;\n\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n instance = new Constructor();\n returnedValue = invoke(Type, instance, locals, serviceName);\n\n return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n }\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scrolls to the related element,\n * according to rules specified in\n * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n *\n * @example\n \n \n
\n Go to bottom\n You're at the bottom!\n
\n
\n \n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function ($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n \n \n #scrollArea {\n height: 350px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n \n
\n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // helper function to get first anchor from a NodeList\n // can't use filter.filter, as it accepts only instances of Array\n // and IE can't convert NodeList to an array using [].slice\n // TODO(vojta): use filter if we change it to accept lists as well\n function getFirstAnchor(list) {\n var result = null;\n forEach(list, function(element) {\n if (!result && nodeName_(element) === 'a') result = element;\n });\n return result;\n }\n\n function scroll() {\n var hash = $location.hash(), elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) $window.scrollTo(0, 0);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n // no element and hash == 'top', scroll to the top of the page\n else if (hash === 'top') $window.scrollTo(0, 0);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction() {\n $rootScope.$evalAsync(scroll);\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n\n this.$$selectors = {};\n\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n * must be called once the element animation is complete. If a function is returned then the\n * animation service will use this function to cancel the animation whenever a cancel event is\n * triggered.\n *\n *\n * ```js\n * return {\n * eventFn : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction() {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation.\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n var key = name + '-animation';\n if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n \"Expecting class selector starting with '.' got '{0}'.\", name);\n this.$$selectors[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element.\n * When setting the classNameFilter value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if(arguments.length === 1) {\n this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n }\n return this.$$classNameFilter;\n };\n\n this.$get = ['$$q', '$$asyncCallback', function($$q, $$asyncCallback) {\n\n var currentDefer;\n function asyncPromise() {\n // only serve one instance of a promise in order to save CPU cycles\n if (!currentDefer) {\n currentDefer = $$q.defer();\n $$asyncCallback(function() {\n currentDefer.resolve();\n currentDefer = null;\n });\n }\n return currentDefer.promise;\n }\n\n /**\n *\n * @ngdoc service\n * @name $animate\n * @description The $animate service provides rudimentary DOM manipulation functions to\n * insert, remove and move elements within the DOM, as well as adding and removing classes.\n * This service is the core service used by the ngAnimate $animator service which provides\n * high-level animation hooks for CSS and JavaScript.\n *\n * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n * manipulation operations.\n *\n * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n * page}.\n */\n return {\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element or\n * as the first child within the `parent` element. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (if the after element is not present)\n * @param {DOMElement} after the sibling element which will append the element\n * after itself\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parent, after) {\n after ? after.after(element)\n : parent.prepend(element);\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Removes the element from the DOM. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be removed from the DOM\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element.remove();\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Moves the position of the provided element within the DOM to be placed\n * either after the `after` element or inside of the `parent` element. When the function\n * is called a promise is returned that will be resolved at a later time.\n *\n * @param {DOMElement} element the element which will be moved around within the\n * DOM\n * @param {DOMElement} parent the parent element where the element will be\n * inserted into (if the after element is not present)\n * @param {DOMElement} after the sibling element where the element will be\n * positioned next to\n * @return {Promise} the animation callback promise\n */\n move : function(element, parent, after) {\n // Do not remove element before insert. Removing will cause data associated with the\n // element to be dropped. Insert will implicitly do the remove.\n return this.enter(element, parent, after);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n * @description Adds the provided className CSS class value to the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * added to it\n * @param {string} className the CSS class which will be added to the element\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteAddClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n * @description Removes the provided className CSS class value from the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * removed from it\n * @param {string} className the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteRemoveClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n * @description Adds and/or removes the given CSS classes to and from the element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n this.addClass(element, add);\n this.removeClass(element, remove);\n return asyncPromise();\n },\n\n enabled : noop,\n cancel : noop\n };\n }];\n}];\n\nfunction $$AsyncCallbackProvider(){\n this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {\n return $$rAF.supported\n ? function(fn) { return $$rAF(fn); }\n : function(fn) {\n return $timeout(fn, 0, false);\n };\n }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n rawDocument = document[0],\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while(outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n /**\n * @private\n * Note: this method is used only by scenario runner\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n // regular poller would result in flaky tests.\n forEach(pollFns, function(pollFn){ pollFn(); });\n\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // Poll Watcher API\n //////////////////////////////////////////////////////////////\n var pollFns = [],\n pollTimeout;\n\n /**\n * @name $browser#addPollFn\n *\n * @param {function()} fn Poll function to add\n *\n * @description\n * Adds a function to the list of functions that poller periodically executes,\n * and starts polling if not started yet.\n *\n * @returns {function()} the added function\n */\n self.addPollFn = function(fn) {\n if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n pollFns.push(fn);\n return fn;\n };\n\n /**\n * @param {number} interval How often should browser call poll functions (ms)\n * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n *\n * @description\n * Configures the poller to run in the specified intervals, using the specified\n * setTimeout fn and kicks it off.\n */\n function startPoller(interval, setTimeout) {\n (function check() {\n forEach(pollFns, function(pollFn){ pollFn(); });\n pollTimeout = setTimeout(check, interval);\n })();\n }\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n newLocation = null;\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record ?\n */\n self.url = function(url, replace) {\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n if (lastBrowserUrl == url) return;\n lastBrowserUrl = url;\n if ($sniffer.history) {\n if (replace) history.replaceState(null, '', url);\n else {\n history.pushState(null, '', url);\n // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n baseElement.attr('href', baseElement.attr('href'));\n }\n } else {\n newLocation = url;\n if (replace) {\n location.replace(url);\n } else {\n location.href = url;\n }\n }\n return self;\n // getter\n } else {\n // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n // methods not updating location.href synchronously.\n // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n return newLocation || location.href.replace(/%27/g,\"'\");\n }\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function fireUrlChange() {\n newLocation = null;\n if (lastBrowserUrl == self.url()) return;\n\n lastBrowserUrl = self.url();\n forEach(urlChangeListeners, function(listener) {\n listener(self.url());\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of angular:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in angular apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n // don't fire popstate when user change the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n // hashchange event\n if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n // polling\n else self.addPollFn(fireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * Checks whether the url has changed outside of Angular.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current \n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n };\n\n //////////////////////////////////////////////////////////////\n // Cookies API\n //////////////////////////////////////////////////////////////\n var lastCookies = {};\n var lastCookieString = '';\n var cookiePath = self.baseHref();\n\n /**\n * @name $browser#cookies\n *\n * @param {string=} name Cookie name\n * @param {string=} value Cookie value\n *\n * @description\n * The cookies method provides a 'private' low level access to browser cookies.\n * It is not meant to be used directly, use the $cookie service instead.\n *\n * The return values vary depending on the arguments that the method was called with as follows:\n *\n * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n * it\n * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n * way)\n *\n * @returns {Object} Hash of all cookies (if called without any parameter)\n */\n self.cookies = function(name, value) {\n var cookieLength, cookieArray, cookie, i, index;\n\n if (name) {\n if (value === undefined) {\n rawDocument.cookie = encodeURIComponent(name) + \"=;path=\" + cookiePath +\n \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n } else {\n if (isString(value)) {\n cookieLength = (rawDocument.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) +\n ';path=' + cookiePath).length + 1;\n\n // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n // - 300 cookies\n // - 20 cookies per unique domain\n // - 4096 bytes per cookie\n if (cookieLength > 4096) {\n $log.warn(\"Cookie '\"+ name +\n \"' possibly not set or overflowed because it was too large (\"+\n cookieLength + \" > 4096 bytes)!\");\n }\n }\n }\n } else {\n if (rawDocument.cookie !== lastCookieString) {\n lastCookieString = rawDocument.cookie;\n cookieArray = lastCookieString.split(\"; \");\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = decodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (lastCookies[name] === undefined) {\n lastCookies[name] = decodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n }\n };\n\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\nfunction $BrowserProvider(){\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function( $window, $log, $sniffer, $document){\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n \n \n
\n \n \n \n\n

Cached Values

\n
\n \n : \n \n
\n\n

Cache Info

\n
\n \n : \n \n
\n
\n
\n \n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if ($scope.cache.get(key) === undefined) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, value === undefined ? null : value);\n };\n }]);\n \n \n p {\n margin: 10px 0 3px;\n }\n \n
\n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = {},\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = {},\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n * templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (isUndefined(value)) return;\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = {};\n size = 0;\n lruHash = {};\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n *
    \n *
  • **id**: the id of the cache instance
  • \n *
  • **size**: the number of entries kept in the cache instance
  • \n *
  • **...**: any additional properties from the options object when creating the\n * cache.
  • \n *
\n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n };\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry != freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd == entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry != prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * \n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n *\n * Adding via the $templateCache service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n *
\n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n *
\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n *
\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n *
\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n *
\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * priority: 0,\n * template: '
', // or // function(tElement, tAttrs) { ... },\n * // or\n * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * transclude: false,\n * restrict: 'A',\n * scope: false,\n * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * controllerAs: 'stringAlias',\n * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * compile: function compile(tElement, tAttrs, transclude) {\n * return {\n * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // link: {\n * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // link: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n *
\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n *
\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recomended that this feature be used on directives\n * which are not strictly behavioural (such as {@link api/ng.directive:ngClick ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link api/ng.directive:ngInclude ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name.\n * Given `` and widget definition\n * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n * `localName` property on the widget scope. The `name` is read from the parent scope (not\n * component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n * parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n * name is specified then the attribute name is assumed to be the same as the local name.\n * Given `` and widget definition of\n * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the\n * local name. Given `` and widget definition of\n * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n * a function wrapper for the `count = count + value` expression. Often it's desirable to\n * pass data from the isolated scope via an expression to the parent scope, this can be\n * done by passing a map of local variable names and values into the expression wrapper fn.\n * For example, if the expression is `increment(amount)` then we can specify the amount value\n * by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n * #### `bindToController`\n * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController` will\n * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n * is instantiated, the initial values of the isolate scope bindings are already available.\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n * * `scope`: optional argument to override the scope.\n * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n * * `futureParentElement`:\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkinFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like ``).\n * * See also the `directive.templateNamespace` property.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): ``\n * * `A` - Attribute (default): `
`\n * * `C` - Class: `
`\n * * `M` - Comment: ``\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `` and ``.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `` or ``.\n * * `svg` - The root nodes in the template are SVG elements (excluding ``).\n * * `math` - The root nodes in the template are MathML elements (excluding ``).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `
{{delete_str}}
`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n *
\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n *
\n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n *
\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n *
\n\n *
\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and a\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n *
\n *\n *
\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n *
\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - a controller instance - A controller instance if at least one directive on the\n * element defines a controller. The controller is shared among all the directives, which allows\n * the directives to use the controllers as a communication channel.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude`\n * parameter of directive controllers, see there for details.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n * \n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n * the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * Below is an example using `$compileProvider`.\n *\n *
\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n *
\n *\n \n \n \n
\n
\n
\n
\n
\n
\n \n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello Angular'.\n expect(output.getText()).toBe('Hello Angular');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('Angular!');\n });\n \n
\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as:
`cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('

{{total}}

')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('

{{total}}

'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w_\\-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\d\\w_\\-]+)(?:\\:([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset');\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n function parseIsolateBindings(scope, directiveName) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n var bindings = {};\n\n forEach(scope, function(definition, scopeName) {\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n \"Invalid isolate scope definition for directive '{0}'.\" +\n \" Definition: {... {1}: '{2}' ...}\",\n directiveName, scopeName, definition);\n }\n\n bindings[scopeName] = {\n attrName: match[3] || scopeName,\n mode: match[1],\n optional: match[2] === '?'\n };\n });\n\n return bindings;\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which\n * will match as ng-bind), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See\n * {@link guide/directive} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = directive.require || (directive.controller && directive.name);\n directive.restrict = directive.restrict || 'EA';\n if (isObject(directive.scope)) {\n directive.$$isolateBindings = parseIsolateBindings(directive.scope, directive.name);\n }\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `$binding` data property containing an array of the binding expressions\n *\n * You may want to use this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if(isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {\n\n var Attributes = function(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n };\n\n Attributes.prototype = {\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass : function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n //is set through this function since it may cause $updateClass to\n //become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(node, key),\n observer = key,\n normalizedVal,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if(aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // sanitize a[href] and img[src] values\n if ((nodeName === 'a' && key === 'href') ||\n (nodeName === 'img' && key === 'src')) {\n this[key] = value = $$sanitizeUri(value, key === 'src');\n }\n\n if (writeAttr !== false) {\n if (value === null || value === undefined) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n $$observers && forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/directive#Attributes Directives} guide for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch(e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n // We can not compile top level text elements since text nodes can be merged and we will\n // not be able to attach scope data to them, so we will wrap them in \n forEach($compileNodes, function(node, index){\n if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n $compileNodes[index] = jqLite(node).wrap('').parent()[0];\n }\n });\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n var namespaceAdaptedCompileNodes = $compileNodes;\n var lastCompileNode;\n return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement){\n assertArg(scope, 'scope');\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n if (namespace !== 'html' && $compileNodes[0] !== lastCompileNode) {\n namespaceAdaptedCompileNodes = jqLite(\n wrapTemplate(namespace, jqLite('
').append($compileNodes).html())\n );\n }\n // When using a directive with replace:true and templateUrl the $compileNodes\n // might change, so we need to recreate the namespace adapted compileNodes.\n lastCompileNode = $compileNodes[0];\n\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n var $linkNode = cloneConnectFn\n ? JQLitePrototype.clone.call(namespaceAdaptedCompileNodes) // IMPORTANT!!!\n : namespaceAdaptedCompileNodes;\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg': 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i+=3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for(i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if ( nodeLinkFn.transcludeOnThisElement ) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn,\n nodeLinkFn.elementTranscludeOnThisElement);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn, elementTransclusion) {\n\n var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement) {\n var scopeCreated = false;\n\n if (!transcludedScope) {\n transcludedScope = scope.$new();\n transcludedScope.$$transcluded = true;\n scopeCreated = true;\n }\n\n var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);\n if (scopeCreated && !elementTransclusion) {\n clone.on('$destroy', function() { transcludedScope.$destroy(); });\n }\n return clone;\n };\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n className;\n\n switch(nodeType) {\n case 1: /* Element */\n // use the node name: \n addDirective(directives,\n directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n if (!msie || msie >= 8 || attr.specified) {\n name = attr.name;\n value = trim(attr.value);\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n name = snake_case(ngAttrName.substr(6), '-');\n }\n\n var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n if (directiveIsMultiElement(directiveNName)) {\n if (ngAttrName === directiveNName + 'Start') {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n }\n\n // use class as directive\n className = node.className;\n if (isString(className) && className !== '') {\n while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case 3: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case 8: /* Comment */\n try {\n match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n /**\n * Given a node with an directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n var startNode = node;\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n attrStart, attrEnd);\n }\n if (node.nodeType == 1 /** Element **/) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.} preLinkFns\n * @param {Array.} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n controllers,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n directiveValue;\n\n // executes all directives on the current element\n for(var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n if (directiveValue = directive.scope) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n if (!directive.templateUrl && directive.controller) {\n directiveValue = directive.controller;\n controllerDirectives = controllerDirectives || {};\n assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n if (directiveValue = directive.transclude) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue == 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(document.createComment(' ' + directiveName + ': ' +\n templateAttrs[directiveName] + ' '));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n $compileNode.empty(); // clear contents\n childTranscludeFn = compile($template, transcludeFn);\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = jqLite(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== 1) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective) {\n markDirectivesAsIsolate(templateDirectives);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n if (isFunction(linkFn)) {\n addLinkFns(null, linkFn, attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.elementTranscludeOnThisElement = hasElementTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value, retrievalMethod = 'data', optional = false;\n if (isString(require)) {\n while((value = require.charAt(0)) == '^' || value == '?') {\n require = require.substr(1);\n if (value == '^') {\n retrievalMethod = 'inheritedData';\n }\n optional = optional || value == '?';\n }\n value = null;\n\n if (elementControllers && retrievalMethod === 'data') {\n if (value = elementControllers[require]) {\n value = value.instance;\n }\n }\n value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n \"Controller '{0}', required by directive '{1}', can't be found!\",\n require, directiveName);\n }\n return value;\n } else if (isArray(require)) {\n value = [];\n forEach(require, function(require) {\n value.push(getControllers(directiveName, require, $element, elementControllers));\n });\n }\n return value;\n }\n\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element,\n attrs;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n }\n\n transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n if (controllerDirectives) {\n // TODO: merge `controllers` and `elementControllers` into single object.\n controllers = {};\n elementControllers = {};\n forEach(controllerDirectives, function(directive) {\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n }, controllerInstance;\n\n controller = directive.controller;\n if (controller == '@') {\n controller = attrs[directive.name];\n }\n\n controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment,\n // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n // clean up (http://bugs.jquery.com/ticket/8335).\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n if (!hasElementTranscludeDirective) {\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n\n controllers[directive.name] = controllerInstance;\n });\n }\n\n if (newIsolateScopeDirective) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n\n var isolateScopeController = controllers && controllers[newIsolateScopeDirective.name];\n var isolateBindingContext = isolateScope;\n if (isolateScopeController && isolateScopeController.identifier &&\n newIsolateScopeDirective.bindToController === true) {\n isolateBindingContext = isolateScopeController.instance;\n }\n\n forEach(isolateScope.$$isolateBindings = newIsolateScopeDirective.$$isolateBindings, function(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, or &\n lastValue,\n parentGet, parentSet, compare;\n\n switch (mode) {\n\n case '@':\n attrs.$observe(attrName, function(value) {\n isolateBindingContext[scopeName] = value;\n });\n attrs.$$observers[attrName].$$scope = scope;\n if( attrs[attrName] ) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n isolateBindingContext[scopeName] = $interpolate(attrs[attrName])(scope);\n }\n break;\n\n case '=':\n if (optional && !attrs[attrName]) {\n return;\n }\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = function(a,b) { return a === b || (a !== a && b !== b); };\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n attrs[attrName], newIsolateScopeDirective.name);\n };\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, isolateBindingContext[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n isolateBindingContext[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = isolateBindingContext[scopeName]);\n }\n }\n return lastValue = parentValue;\n };\n parentValueWatch.$stateful = true;\n var unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n isolateScope.$on('$destroy', unwatch);\n break;\n\n case '&':\n parentGet = $parse(attrs[attrName]);\n isolateBindingContext[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n }\n if (controllers) {\n forEach(controllers, function(controller) {\n controller();\n });\n controllers = null;\n }\n\n // PRELINKING\n for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n // POSTLINKING\n for(i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n var transcludeControllers;\n\n // No scope passed in:\n if (!isScope(scope)) {\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement);\n }\n }\n }\n\n function markDirectivesAsIsolate(directives) {\n // mark all directives as needing isolate scope.\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: true});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i directive.priority) &&\n directive.restrict.indexOf(location) != -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n tDirectives.push(directive);\n match = directive;\n }\n } catch(e) { $exceptionHandler(e); }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i'+template+'';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName == \"srcdoc\") {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // maction[xlink:href] can source SVG. It's not limited to .\n if (attrNormalizedName == \"xlinkHref\" ||\n (tag == \"form\" && attrNormalizedName == \"action\") ||\n (tag != \"img\" && (attrNormalizedName == \"src\" ||\n attrNormalizedName == \"ngSrc\"))) {\n return $sce.RESOURCE_URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n var interpolateFn = $interpolate(value, true);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n\n if (name === \"multiple\" && nodeName_(node) === \"select\") {\n throw $compileMinErr(\"selmulti\",\n \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n startingTag(node));\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n \"ng- versions (such as ng-click instead of onclick) instead.\");\n }\n\n // we need to interpolate again, in case the attribute value has been updated\n // (e.g. by another directive's compile function)\n interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),\n ALL_OR_NOTHING_ATTRS[name] || allOrNothing);\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if(name === 'class' && newValue != oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for(i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] == firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n var fragment = document.createDocumentFragment();\n fragment.appendChild(firstElementToRemove);\n\n // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite(newNode).data(jqLite(firstElementToRemove).data());\n\n // Remove data of the replaced element. We cannot just call .remove()\n // on the element it since that would deallocate scope that is needed\n // for the new node. Instead, remove the data \"manually\".\n if (!jQuery) {\n delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n } else {\n // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n // the replaced element. The cleanData version monkey-patched by Angular would cause\n // the scope to be trashed and we do need the very same scope to work with the new\n // element. However, we cannot just cache the non-patched version and use it here as\n // that would break if another library patches the method after Angular does (one\n // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n // skipped this one time.\n skipDestroyOnNextJQueryCleanData = true;\n jQuery.cleanData([firstElementToRemove]);\n }\n\n for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n var element = elementsToRemove[k];\n jqLite(element).remove(); // must do this way to clean up expando\n fragment.appendChild(element);\n delete elementsToRemove[k];\n }\n\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch(e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n * my:Directive\n * my-directive\n * x-my-directive\n * data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n * \n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {},\n globals = false,\n CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#allowGlobals\n * @description If called, allows `$controller` to find controller constructors on `window`\n */\n this.allowGlobals = function() {\n globals = true;\n };\n\n\n this.$get = ['$injector', '$window', function($injector, $window) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n * `window` object (not recommended)\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if(isString(expression)) {\n match = expression.match(CNTRL_REG),\n constructor = match[1],\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true) ||\n (globals ? getter($window, constructor, true) : undefined);\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n var Constructor = function() {};\n Constructor.prototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = new Constructor();\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function() {\n $injector.invoke(expression, instance, locals, constructor);\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n \n \n
\n

$document title:

\n

window.document title:

\n
\n
\n \n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n \n
\n */\nfunction $DocumentProvider(){\n this.$get = ['$window', function(window){\n return jqLite(window.document);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n * return function (exception, cause) {\n * exception.message += ' (caused by \"' + cause + '\")';\n * throw exception;\n * };\n * });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = lowercase(trim(line.substr(0, i)));\n val = trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with single an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj = isObject(headers) ? headers : undefined;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n return headersObj[lowercase(name)] || null;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(Function|Array.)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n if (isFunction(fns))\n return fns(data, headers);\n\n forEach(fns, function(fn) {\n data = fn(data, headers);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n JSON_END = /[\\}\\]]\\s*$/,\n PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n **/\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [function(data) {\n if (isString(data)) {\n // strip json vulnerability protection prefix\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data))\n data = fromJson(data);\n }\n return data;\n }],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope#applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specifed, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * Are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n */\n var interceptorFactories = this.interceptors = [];\n\n this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core Angular service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a configuration object —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise}\n * with two $http specific methods: `success` and `error`.\n *\n * ```js\n * $http({method: 'GET', url: '/someUrl'}).\n * success(function(data, status, headers, config) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }).\n * error(function(data, status, headers, config) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n * Since the returned value of calling the $http function is a `promise`, you can also use\n * the `then` method to register callbacks, and these callbacks will receive a single argument –\n * an object representing the response. See the API signature and type info below for more\n * details.\n *\n * A response status code between 200 and 299 is considered a success status and\n * will result in the success callback being called. Note that if the response is a redirect,\n * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n * called for such responses.\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests.\n *\n * ```js\n * $http.get('/someUrl').success(successCallback);\n * $http.post('/someUrl', data).success(successCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - `Accept: application/json, text/plain, * / *`\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * Angular provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If JSON response is detected, deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * To enable caching, set the request configuration `cache` property to `true` (to use default\n * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n * When the cache is enabled, `$http` stores the response from the server in the specified\n * cache. The next time the same request is made, the response is served from the cache without\n * sending a request to the server.\n *\n * Note that even if the response is served from cache, delivery of the data is asynchronous in\n * the same way that real requests are.\n *\n * If there are multiple GET requests for the same URL that should be cached using the same\n * cache, but the cache is not populated yet, only one request to the server will be made and\n * the remaining requests will be fulfilled using the response from the first request.\n *\n * You can change the default cache to a new object (built with\n * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n * their `cache` property to `true` will now use this cache object.\n *\n * If you set the default cache to `false` then only requests that specify their own custom\n * cache object will be cached.\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http `config` object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * Angular will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * Angular will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which\n * an unauthorized site can gain your user's private data. Angular provides a mechanism\n * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n * JavaScript that runs on your domain could read the cookie, your server can be assured that\n * the XHR came from JavaScript running on your domain. The header will not be set for\n * cross-domain requests.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n * that only JavaScript running on your domain could have sent the request. The token must be\n * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n * or the per-request config object.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n * - **params** – `{Object.}` – Map of strings or objects which will be turned\n * to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n * JSONified.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n *\n * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n * standard `then` method and two http specific methods: `success` and `error`. The `then`\n * method takes two arguments a success and an error callback which will be called with a\n * response object. The `success` and `error` methods take a single argument - a function that\n * will be called when the request succeeds or fails respectively. The arguments passed into\n * these functions are destructured representation of the response object passed into the\n * `then` method. The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with the transform\n * functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n *\n * @property {Array.} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n\n\n
\n \n \n
\n \n \n \n
http status code: {{status}}
\n
http response data: {{data}}
\n
\n
\n\n angular.module('httpExample', [])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n success(function(data, status) {\n $scope.status = status;\n $scope.data = data;\n }).\n error(function(data, status) {\n $scope.data = data || \"Request failed\";\n $scope.status = status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n\n\n Hello, $http!\n\n\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n\n
\n */\n function $http(requestConfig) {\n var config = {\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n };\n var headers = mergeHeaders(requestConfig);\n\n extend(config, requestConfig);\n config.headers = headers;\n config.method = uppercase(config.method);\n\n var serverRequest = function(config) {\n headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n };\n\n var chain = [serverRequest, undefined];\n var promise = $q.when(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n chain.push(interceptor.response, interceptor.responseError);\n }\n });\n\n while(chain.length) {\n var thenFn = chain.shift();\n var rejectFn = chain.shift();\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n return promise;\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response, {\n data: transformData(response.data, response.headers, config.transformResponse)\n });\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n execHeaders(reqHeaders);\n return reqHeaders;\n\n function execHeaders(headers) {\n var headerContent;\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn();\n if (headerContent != null) {\n headers[header] = headerContent;\n } else {\n delete headers[header];\n }\n }\n });\n }\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request.\n * The name of the callback should be the string `JSON_CALLBACK`.\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData, reqHeaders) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n url = buildUrl(config.url, config.params);\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(removePendingReq, removePendingReq);\n return cachedResp;\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsSameOrigin(config.url)\n ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType);\n }\n\n return promise;\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText) {\n // normalize internal statuses to 0\n status = Math.max(status, 0);\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText : statusText\n });\n }\n\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, params) {\n if (!params) return url;\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value)) return;\n if (!isArray(value)) value = [value];\n\n forEach(value, function(v) {\n if (isObject(v)) {\n if (isDate(v)){\n v = v.toISOString();\n } else {\n v = toJson(v);\n }\n }\n parts.push(encodeUriQuery(key) + '=' +\n encodeUriQuery(v));\n });\n });\n if(parts.length > 0) {\n url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n }\n return url;\n }\n }];\n}\n\nfunction createXhr(method) {\n //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n //if it is available\n if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n !window.XMLHttpRequest)) {\n return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n } else if (window.XMLHttpRequest) {\n return new window.XMLHttpRequest();\n }\n\n throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n var ABORTED = -1;\n\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n var status;\n $browser.$$incOutstandingRequestCount();\n url = url || $browser.url();\n\n if (lowercase(method) == 'jsonp') {\n var callbackId = '_' + (callbacks.counter++).toString(36);\n callbacks[callbackId] = function(data) {\n callbacks[callbackId].data = data;\n callbacks[callbackId].called = true;\n };\n\n var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n callbackId, function(status, text) {\n completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n callbacks[callbackId] = noop;\n });\n } else {\n\n var xhr = createXhr(method);\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n // response is in the cache. the promise api will ensure that to the app code the api is\n // always async\n xhr.onreadystatechange = function() {\n // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n // xhrs that are resolved while the app is in the background (see #5426).\n // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n // continuing\n //\n // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n // Safari respectively.\n if (xhr && xhr.readyState == 4) {\n var responseHeaders = null,\n response = null,\n statusText = '';\n\n if(status !== ABORTED) {\n responseHeaders = xhr.getAllResponseHeaders();\n\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n response = ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n\n // Accessing statusText on an aborted xhr object will\n // throw an 'c00c023f error' in IE9 and lower, don't touch it.\n if (!(status === ABORTED && msie < 10)) {\n statusText = xhr.statusText;\n }\n\n completeRequest(callback,\n status || xhr.status,\n response,\n responseHeaders,\n statusText);\n }\n };\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(post || null);\n }\n\n if (timeout > 0) {\n var timeoutId = $browserDefer(timeoutRequest, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(timeoutRequest);\n }\n\n\n function timeoutRequest() {\n status = ABORTED;\n jsonpDone && jsonpDone();\n xhr && xhr.abort();\n }\n\n function completeRequest(callback, status, response, headersString, statusText) {\n // cancel timeout and subsequent timeout promise resolution\n timeoutId && $browserDefer.cancel(timeoutId);\n jsonpDone = xhr = null;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n }\n\n // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n status = status === 1223 ? 204 : status;\n statusText = statusText || '';\n\n callback(status, response, headersString, statusText);\n $browser.$$completeOutstandingRequest(noop);\n }\n };\n\n function jsonpReq(url, callbackId, done) {\n // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = \"text/javascript\";\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n removeEventListenerFn(script, \"load\", callback);\n removeEventListenerFn(script, \"error\", callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = \"unknown\";\n\n if (event) {\n if (event.type === \"load\" && !callbacks[callbackId].called) {\n event = { type: \"error\" };\n }\n text = event.type;\n status = event.type === \"error\" ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n addEventListenerFn(script, \"load\", callback);\n addEventListenerFn(script, \"error\", callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n\n\n\n
\n //demo.label//\n
\n
\n\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n\n
\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value){\n if (value) {\n startSymbol = value;\n return this;\n } else {\n return startSymbol;\n }\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value){\n if (value) {\n endSymbol = value;\n return this;\n } else {\n return endSymbol;\n }\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'Angular';\n * expect(exp(context)).toEqual('Hello Angular!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * ####Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with &lt; and &gt; respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * \n * \n *
\n *

{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n *

\n *

{{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.

\n *

Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.

\n *
\n *
\n *
\n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns = [],\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [];\n\n while(index < textLength) {\n if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n parseFns.push($parse(exp, parseStringifyInterceptor));\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push('');\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for iframe[src], object[src], etc., we ensure that the value\n // that's used is assigned or constructed by some JS code somewhere that is more testable or\n // make it obvious that you bound the value to some user controlled value. This helps reduce\n // the load when auditing for XSS issues.\n if (trustedContext && concat.length > 1) {\n throw $interpolateMinErr('noconcat',\n \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n \"interpolations that concatenate multiple expressions when a trusted value is \" +\n \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n }\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for(var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n return concat.join('');\n };\n\n var getValue = function (value) {\n return trustedContext ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n };\n\n var stringify = function (value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string': {\n break;\n }\n case 'number': {\n value = '' + value;\n break;\n }\n default: {\n value = toJson(value);\n }\n }\n\n return value;\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function (scope, listener, objectEquality) {\n var lastValue;\n return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n if (isFunction(listener)) {\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n }\n lastValue = currValue;\n }, objectEquality);\n }\n });\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n function parseStringifyInterceptor(value) {\n try {\n return stringify(getValue(value));\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q',\n function($rootScope, $window, $q, $$q) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n *
\n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n *
\n *\n * @param {function()} fn A function that should be called repeatedly.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {promise} A promise which will be notified on each iteration.\n *\n * @example\n * \n * \n * \n *\n *
\n *
\n * Date format:
\n * Current time is: \n *
\n * Blood 1 : {{blood_1}}\n * Blood 2 : {{blood_2}}\n * \n * \n * \n *
\n *
\n *\n *
\n *
\n */\n function interval(fn, delay, count, invokeApply) {\n var setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.then(null, null, fn);\n\n promise.$$intervalId = setInterval(function tick() {\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {promise} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (promise && promise.$$intervalId in intervals) {\n intervals[promise.$$intervalId].reject('canceled');\n $window.clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n return true;\n }\n return false;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n this.$get = function() {\n return {\n id: 'en-us',\n\n NUMBER_FORMATS: {\n DECIMAL_SEP: '.',\n GROUP_SEP: ',',\n PATTERNS: [\n { // Decimal Pattern\n minInt: 1,\n minFrac: 0,\n maxFrac: 3,\n posPre: '',\n posSuf: '',\n negPre: '-',\n negSuf: '',\n gSize: 3,\n lgSize: 3\n },{ //Currency Pattern\n minInt: 1,\n minFrac: 2,\n maxFrac: 2,\n posPre: '\\u00A4',\n posSuf: '',\n negPre: '(\\u00A4',\n negSuf: ')',\n gSize: 3,\n lgSize: 3\n }\n ],\n CURRENCY_SYM: '$'\n },\n\n DATETIME_FORMATS: {\n MONTH:\n 'January,February,March,April,May,June,July,August,September,October,November,December'\n .split(','),\n SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n AMPMS: ['AM','PM'],\n medium: 'MMM d, y h:mm:ss a',\n short: 'M/d/yy h:mm a',\n fullDate: 'EEEE, MMMM d, y',\n longDate: 'MMMM d, y',\n mediumDate: 'MMM d, y',\n shortDate: 'M/d/yy',\n mediumTime: 'h:mm:ss a',\n shortTime: 'h:mm a'\n },\n\n pluralCat: function(num) {\n if (num === 1) {\n return 'one';\n }\n return 'other';\n }\n };\n };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = encodeUriSegment(segments[i]);\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n var prefixed = (relativeUrl.charAt(0) !== '/');\n if (prefixed) {\n relativeUrl = '/' + relativeUrl;\n }\n var match = urlResolve(relativeUrl, appBase);\n locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n match.pathname.substring(1) : match.pathname);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n * expected string.\n */\nfunction beginsWith(begin, whole) {\n if (whole.indexOf(begin) === 0) {\n return whole.substr(begin.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n var appBaseNoFile = stripFile(appBase);\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given html5 (regular) url string into properties\n * @param {string} newAbsoluteUrl HTML5 url\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = beginsWith(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, appBase);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n prevAppUrl = appUrl;\n if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile == url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n var appBaseNoFile = stripFile(appBase);\n\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given hashbang url into properties\n * @param {string} url Hashbang url\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n ? beginsWith(hashPrefix, withoutBaseUrl)\n : (this.$$html5)\n ? withoutBaseUrl\n : '';\n\n if (!isString(withoutHashUrl)) {\n throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n hashPrefix);\n }\n parseAppUrl(withoutHashUrl, this, appBase);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of Angular, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName (path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (url.indexOf(base) === 0) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if(stripHash(appBase) == stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n var appBaseNoFile = stripFile(appBase);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if ( appBase == stripHash(url) ) {\n rewrittenUrl = url;\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if ( appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n };\n\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n LocationHashbangUrl.prototype =\n LocationHtml5Url.prototype = {\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing ?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full url representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n * @return {string} full url\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url))\n return this.$$url;\n\n var match = PATH_MATCH.exec(url);\n if (match[1]) this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1]) this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current url.\n *\n * @return {string} protocol of current url\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current url.\n *\n * @return {string} host of current url.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current url.\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current url when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n * @param {(string|number)=} path New path\n * @return {string} path\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path ? path.toString() : '';\n return path.charAt(0) == '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current url when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // => $location\n * ```\n *\n * @param {string|Object.|Object.>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the url.\n *\n * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Return hash fragment when called without any parameter.\n *\n * Change hash fragment when called with parameter and return `$location`.\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during current `$digest` will be replacing current history\n * record, instead of adding new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nfunction locationGetter(property) {\n return function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return function(value) {\n if (isUndefined(value))\n return this[property];\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n var hashPrefix = '',\n html5Mode = {\n enabled: false,\n requireBase: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled` and `requireBase` to respective values.\n * - **enabled** – `{boolean}` – Sets `html5Mode.enabled`. If true, will rely on\n * `history.pushState` to change urls where supported. Will fall back to hash-prefixed paths\n * in browsers that do not support `pushState`.\n * - **requireBase** - `{boolean}` - Sets `html5Mode.requireBase` (default: `true`). When\n * html5Mode is enabled, specifies whether or not a tag is required to be present. If\n * `enabled` and `requireBase` are true, and a base tag is not present, an error will be\n * thrown when `$location` is injected. See the\n * {@link guide/$location $location guide for more information}\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n html5Mode.enabled = isBoolean(mode.enabled) ?\n mode.enabled :\n html5Mode.enabled;\n html5Mode.requireBase = isBoolean(mode.requireBase) ?\n mode.requireBase :\n html5Mode.requireBase;\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change. This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n function( $rootScope, $browser, $sniffer, $rootElement) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n \"$location in HTML5 mode requires a tag to be present!\");\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n $location = new LocationMode(appBase, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n $rootElement.on('click', function(event) {\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n event.preventDefault();\n // update location manually\n if ($location.absUrl() != $browser.url()) {\n $rootScope.$apply();\n // hack to work around FF6 bug 684208 when scenario runner clicks on links\n window.angular['ff-684208-preventDefault'] = true;\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if ($location.absUrl() != initialUrl) {\n $browser.url($location.absUrl(), true);\n }\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl) {\n if ($location.absUrl() != newUrl) {\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n\n $location.$$parse(newUrl);\n if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n oldUrl).defaultPrevented) {\n $location.$$parse(oldUrl);\n $browser.url(oldUrl);\n } else {\n afterLocationChange(oldUrl);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n }\n });\n\n // update browser\n var changeCounter = 0;\n $rootScope.$watch(function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n });\n\n return $location;\n\n function afterLocationChange(oldUrl) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n \n \n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n \n \n
\n

Reload this page with open console, enter text and hit the log button...

\n Message:\n \n \n \n \n \n
\n
\n
\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window){\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function () {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n }())\n };\n\n function formatError(arg) {\n if (arg instanceof Error) {\n if (arg.stack) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop,\n hasApply = false;\n\n // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n // The reason behind this is that console.log has type \"object\" in IE8...\n try {\n hasApply = !!logFn.apply;\n } catch (e) {}\n\n if (hasApply) {\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n return logFn.apply(console, args);\n };\n }\n\n // we are IE which either doesn't have window.console => this is noop and we do nothing,\n // or we are IE where console.log doesn't have apply so we log at least first 2 args\n return function(arg1, arg2) {\n logFn(arg1, arg2 == null ? '' : arg2);\n };\n }\n }];\n}\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n || name === \"__proto__\") {\n throw $parseMinErr('isecfld',\n 'Attempting to access a disallowed field in Angular expressions! '\n +'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n // nifty check if obj is Function that is fast and works across iframes and other contexts\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isWindow(obj)\n obj.window === obj) {\n throw $parseMinErr('isecwindow',\n 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isElement(obj)\n obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n throw $parseMinErr('isecdom',\n 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// block Object so that we can't get hold of dangerous Object.* methods\n obj === Object) {\n throw $parseMinErr('isecobj',\n 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (obj === CALL || obj === APPLY || obj === BIND) {\n throw $parseMinErr('isecff',\n 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n}\n\n//Keyword constants\nvar CONSTANTS = createMap();\nforEach({\n 'null': function() { return null; },\n 'true': function() { return true; },\n 'false': function() { return false; },\n 'undefined': function() {}\n}, function(constantGetter, name) {\n constantGetter.constant = constantGetter.literal = constantGetter.sharedGetter = true;\n CONSTANTS[name] = constantGetter;\n});\n\n//Operators - will be wrapped by binaryFn/unaryFn/assignment/filter\nvar OPERATORS = extend(createMap(), {\n /* jshint bitwise : false */\n '+':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n if (isDefined(a)) {\n if (isDefined(b)) {\n return a + b;\n }\n return a;\n }\n return isDefined(b)?b:undefined;},\n '-':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n },\n '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n '<':function(self, locals, a,b){return a(self, locals)':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n '!':function(self, locals, a){return !a(self, locals);},\n\n //Tokenized as operators but parsed as assignment/filters\n '=':true,\n '|':true\n});\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function (text) {\n this.text = text;\n this.index = 0;\n this.ch = undefined;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n this.ch = this.text.charAt(this.index);\n if (this.is('\"\\'')) {\n this.readString(this.ch);\n } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdent(this.ch)) {\n this.readIdent();\n } else if (this.is('(){}[].,;:?')) {\n this.tokens.push({\n index: this.index,\n text: this.ch\n });\n this.index++;\n } else if (this.isWhitespace(this.ch)) {\n this.index++;\n } else {\n var ch2 = this.ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var fn = OPERATORS[this.ch];\n var fn2 = OPERATORS[ch2];\n var fn3 = OPERATORS[ch3];\n if (fn3) {\n this.tokens.push({index: this.index, text: ch3, fn: fn3});\n this.index += 3;\n } else if (fn2) {\n this.tokens.push({index: this.index, text: ch2, fn: fn2});\n this.index += 2;\n } else if (fn) {\n this.tokens.push({\n index: this.index,\n text: this.ch,\n fn: fn\n });\n this.index += 1;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(chars) {\n return chars.indexOf(this.ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9');\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdent: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch == '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch == 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) == 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) == 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n number = 1 * number;\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n fn: function() { return number; }\n });\n },\n\n readIdent: function() {\n var expression = this.text;\n\n var ident = '';\n var start = this.index;\n\n var lastDot, peekIndex, methodName, ch;\n\n while (this.index < this.text.length) {\n ch = this.text.charAt(this.index);\n if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n if (ch === '.') lastDot = this.index;\n ident += ch;\n } else {\n break;\n }\n this.index++;\n }\n\n //check if the identifier ends with . and if so move back one char\n if (lastDot && ident[ident.length - 1] === '.') {\n this.index--;\n ident = ident.slice(0, -1);\n lastDot = ident.lastIndexOf('.');\n if (lastDot === -1) {\n lastDot = undefined;\n }\n }\n\n //check if this is not a method invocation and if it is back out to last dot\n if (lastDot) {\n peekIndex = this.index;\n while (peekIndex < this.text.length) {\n ch = this.text.charAt(peekIndex);\n if (ch === '(') {\n methodName = ident.substr(lastDot - start + 1);\n ident = ident.substr(0, lastDot - start);\n this.index = peekIndex;\n break;\n }\n if (this.isWhitespace(ch)) {\n peekIndex++;\n } else {\n break;\n }\n }\n }\n\n this.tokens.push({\n index: start,\n text: ident,\n fn: CONSTANTS[ident] || getterFn(ident, this.options, expression)\n });\n\n if (methodName) {\n this.tokens.push({\n index: lastDot,\n text: '.'\n });\n this.tokens.push({\n index: lastDot + 1,\n text: methodName\n });\n }\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i))\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n string: string,\n constant: true,\n fn: function() { return string; }\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\n\nfunction isConstant(exp) {\n return exp.constant;\n}\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n this.lexer = lexer;\n this.$filter = $filter;\n this.options = options;\n};\n\nParser.ZERO = extend(function () {\n return 0;\n}, {\n sharedGetter: true,\n constant: true\n});\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function (text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.statements();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n value.literal = !!value.literal;\n value.constant = !!value.constant;\n\n return value;\n },\n\n primary: function () {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else {\n var token = this.expect();\n primary = token.fn;\n if (!primary) {\n this.throwError('not a primary expression', token);\n }\n if (token.constant) {\n primary.constant = true;\n primary.literal = true;\n }\n }\n\n var next, context;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = this.functionCall(primary, context);\n context = null;\n } else if (next.text === '[') {\n context = primary;\n primary = this.objectIndex(primary);\n } else if (next.text === '.') {\n context = primary;\n primary = this.fieldAccess(primary);\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n peekToken: function() {\n if (this.tokens.length === 0)\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n if (this.tokens.length > 0) {\n var token = this.tokens[0];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4){\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n consume: function(e1){\n if (!this.expect(e1)) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n },\n\n unaryFn: function(fn, right) {\n return extend(function $parseUnaryFn(self, locals) {\n return fn(self, locals, right);\n }, {\n constant:right.constant,\n inputs: [right]\n });\n },\n\n binaryFn: function(left, fn, right, isBranching) {\n return extend(function $parseBinaryFn(self, locals) {\n return fn(self, locals, left, right);\n }, {\n constant: left.constant && right.constant,\n inputs: !isBranching && [left, right]\n });\n },\n\n statements: function() {\n var statements = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n statements.push(this.filterChain());\n if (!this.expect(';')) {\n // optimize for the common case where there is only one statement.\n // TODO(size): maybe we should not support multiple statements?\n return (statements.length === 1)\n ? statements[0]\n : function $parseStatements(self, locals) {\n var value;\n for (var i = 0, ii = statements.length; i < ii; i++) {\n value = statements[i](self, locals);\n }\n return value;\n };\n }\n }\n },\n\n filterChain: function() {\n var left = this.expression();\n var token;\n while ((token = this.expect('|'))) {\n left = this.filter(left);\n }\n return left;\n },\n\n filter: function(inputFn) {\n var token = this.expect();\n var fn = this.$filter(token.text);\n var argsFn;\n var args;\n\n if (this.peek(':')) {\n argsFn = [];\n args = []; // we can safely reuse the array\n while (this.expect(':')) {\n argsFn.push(this.expression());\n }\n }\n\n var inputs = [inputFn].concat(argsFn || []);\n\n return extend(function $parseFilter(self, locals) {\n var input = inputFn(self, locals);\n if (args) {\n args[0] = input;\n\n var i = argsFn.length;\n while (i--) {\n args[i + 1] = argsFn[i](self, locals);\n }\n\n return fn.apply(undefined, args);\n }\n\n return fn(input);\n }, {\n constant: !fn.$stateful && inputs.every(isConstant),\n inputs: !fn.$stateful && inputs\n });\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var left = this.ternary();\n var right;\n var token;\n if ((token = this.expect('='))) {\n if (!left.assign) {\n this.throwError('implies assignment but [' +\n this.text.substring(0, token.index) + '] can not be assigned to', token);\n }\n right = this.ternary();\n return extend(function $parseAssignment(scope, locals) {\n return left.assign(scope, right(scope, locals), locals);\n }, {\n inputs: [left, right]\n });\n }\n return left;\n },\n\n ternary: function() {\n var left = this.logicalOR();\n var middle;\n var token;\n if ((token = this.expect('?'))) {\n middle = this.assignment();\n if ((token = this.expect(':'))) {\n var right = this.assignment();\n\n return extend(function $parseTernary(self, locals){\n return left(self, locals) ? middle(self, locals) : right(self, locals);\n }, {\n constant: left.constant && middle.constant && right.constant\n });\n\n } else {\n this.throwError('expected :', token);\n }\n }\n\n return left;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n var token;\n while ((token = this.expect('||'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n var token;\n if ((token = this.expect('&&'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n if ((token = this.expect('==','!=','===','!=='))) {\n left = this.binaryFn(left, token.fn, this.equality());\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n if ((token = this.expect('<', '>', '<=', '>='))) {\n left = this.binaryFn(left, token.fn, this.relational());\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = this.binaryFn(left, token.fn, this.multiplicative());\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = this.binaryFn(left, token.fn, this.unary());\n }\n return left;\n },\n\n unary: function() {\n var token;\n if (this.expect('+')) {\n return this.primary();\n } else if ((token = this.expect('-'))) {\n return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n } else if ((token = this.expect('!'))) {\n return this.unaryFn(token.fn, this.unary());\n } else {\n return this.primary();\n }\n },\n\n fieldAccess: function(object) {\n var expression = this.text;\n var field = this.expect().text;\n var getter = getterFn(field, this.options, expression);\n\n return extend(function $parseFieldAccess(scope, locals, self) {\n return getter(self || object(scope, locals));\n }, {\n assign: function(scope, value, locals) {\n var o = object(scope, locals);\n if (!o) object.assign(scope, o = {});\n return setter(o, field, value, expression);\n }\n });\n },\n\n objectIndex: function(obj) {\n var expression = this.text;\n\n var indexFn = this.expression();\n this.consume(']');\n\n return extend(function $parseObjectIndex(self, locals) {\n var o = obj(self, locals),\n i = indexFn(self, locals),\n v;\n\n ensureSafeMemberName(i, expression);\n if (!o) return undefined;\n v = ensureSafeObject(o[i], expression);\n return v;\n }, {\n assign: function(self, value, locals) {\n var key = ensureSafeMemberName(indexFn(self, locals), expression);\n // prevent overwriting of Function.constructor which would break ensureSafeObject check\n var o = ensureSafeObject(obj(self, locals), expression);\n if (!o) obj.assign(self, o = {});\n return o[key] = value;\n }\n });\n },\n\n functionCall: function(fnGetter, contextGetter) {\n var argsFn = [];\n if (this.peekToken().text !== ')') {\n do {\n argsFn.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(')');\n\n var expressionText = this.text;\n // we can safely reuse the array across invocations\n var args = argsFn.length ? [] : null;\n\n return function $parseFunctionCall(scope, locals) {\n var context = contextGetter ? contextGetter(scope, locals) : scope;\n var fn = fnGetter(scope, locals, context) || noop;\n\n if (args) {\n var i = argsFn.length;\n while (i--) {\n args[i] = ensureSafeObject(argsFn[i](scope, locals), expressionText);\n }\n }\n\n ensureSafeObject(context, expressionText);\n ensureSafeFunction(fn, expressionText);\n\n // IE stupidity! (IE doesn't have apply for some native functions)\n var v = fn.apply\n ? fn.apply(context, args)\n : fn(args[0], args[1], args[2], args[3], args[4]);\n\n return ensureSafeObject(v, expressionText);\n };\n },\n\n // This is used with json array declaration\n arrayDeclaration: function () {\n var elementFns = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var elementFn = this.expression();\n elementFns.push(elementFn);\n } while (this.expect(','));\n }\n this.consume(']');\n\n return extend(function $parseArrayLiteral(self, locals) {\n var array = [];\n for (var i = 0, ii = elementFns.length; i < ii; i++) {\n array.push(elementFns[i](self, locals));\n }\n return array;\n }, {\n literal: true,\n constant: elementFns.every(isConstant),\n inputs: elementFns\n });\n },\n\n object: function () {\n var keys = [], valueFns = [];\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var token = this.expect();\n keys.push(token.string || token.text);\n this.consume(':');\n var value = this.expression();\n valueFns.push(value);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return extend(function $parseObjectLiteral(self, locals) {\n var object = {};\n for (var i = 0, ii = valueFns.length; i < ii; i++) {\n object[keys[i]] = valueFns[i](self, locals);\n }\n return object;\n }, {\n literal: true,\n constant: valueFns.every(isConstant),\n inputs: valueFns\n });\n }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp) {\n ensureSafeObject(obj, fullExp);\n\n var element = path.split('.'), key;\n for (var i = 0; element.length > 1; i++) {\n key = ensureSafeMemberName(element.shift(), fullExp);\n var propertyObj = ensureSafeObject(obj[key], fullExp);\n if (!propertyObj) {\n propertyObj = {};\n obj[key] = propertyObj;\n }\n obj = propertyObj;\n }\n key = ensureSafeMemberName(element.shift(), fullExp);\n ensureSafeObject(obj[key], fullExp);\n obj[key] = setValue;\n return setValue;\n}\n\nvar getterFnCache = createMap();\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp) {\n ensureSafeMemberName(key0, fullExp);\n ensureSafeMemberName(key1, fullExp);\n ensureSafeMemberName(key2, fullExp);\n ensureSafeMemberName(key3, fullExp);\n ensureSafeMemberName(key4, fullExp);\n\n return function cspSafeGetter(scope, locals) {\n var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n if (pathVal == null) return pathVal;\n pathVal = pathVal[key0];\n\n if (!key1) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key1];\n\n if (!key2) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key2];\n\n if (!key3) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key3];\n\n if (!key4) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key4];\n\n return pathVal;\n };\n}\n\nfunction getterFn(path, options, fullExp) {\n var fn = getterFnCache[path];\n\n if (fn) return fn;\n\n var pathKeys = path.split('.'),\n pathKeysLength = pathKeys.length;\n\n // http://jsperf.com/angularjs-parse-getter/6\n if (options.csp) {\n if (pathKeysLength < 6) {\n fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp);\n } else {\n fn = function cspSafeGetter(scope, locals) {\n var i = 0, val;\n do {\n val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n pathKeys[i++], fullExp)(scope, locals);\n\n locals = undefined; // clear after first iteration\n scope = val;\n } while (i < pathKeysLength);\n return val;\n };\n }\n } else {\n var code = '';\n forEach(pathKeys, function(key, index) {\n ensureSafeMemberName(key, fullExp);\n code += 'if(s == null) return undefined;\\n' +\n 's='+ (index\n // we simply dereference 's' on any .dot notation\n ? 's'\n // but if we are first then we check locals first, and if so read it first\n : '((l&&l.hasOwnProperty(\"' + key + '\"))?l:s)') + '.' + key + ';\\n';\n });\n code += 'return s;';\n\n /* jshint -W054 */\n var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals\n /* jshint +W054 */\n evaledFnGetter.toString = valueFn(code);\n\n fn = evaledFnGetter;\n }\n\n fn.sharedGetter = true;\n fn.assign = function(self, value) {\n return setter(self, path, value, path);\n };\n getterFnCache[path] = fn;\n return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'angular'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('angular');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n\n var $parseOptions = {\n csp: false\n };\n\n\n this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {\n $parseOptions.csp = $sniffer.csp;\n\n function wrapSharedExpression(exp) {\n var wrapped = exp;\n\n if (exp.sharedGetter) {\n wrapped = function $parseWrapper(self, locals) {\n return exp(self, locals);\n };\n wrapped.literal = exp.literal;\n wrapped.constant = exp.constant;\n wrapped.assign = exp.assign;\n }\n\n return wrapped;\n }\n\n return function $parse(exp, interceptorFn) {\n var parsedExpression, oneTime, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n cacheKey = exp = exp.trim();\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (oneTime) {\n //oneTime is not part of the exp passed to the Parser so we may have to\n //wrap the parsedExpression before adding a $$watchDelegate\n parsedExpression = wrapSharedExpression(parsedExpression);\n parsedExpression.$$watchDelegate = parsedExpression.literal ?\n oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n cache[cacheKey] = parsedExpression;\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n };\n\n function collectExpressionInputs(inputs, list) {\n for (var i = 0, ii = inputs.length; i < ii; i++) {\n var input = inputs[i];\n if (!input.constant) {\n if (input.inputs) {\n collectExpressionInputs(input.inputs, list);\n } else if (list.indexOf(input) === -1) { // TODO(perf) can we do better?\n list.push(input);\n }\n }\n }\n\n return list;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = newValue.valueOf();\n\n if (typeof newValue === 'object') {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var inputExpressions = parsedExpression.$$inputs ||\n (parsedExpression.$$inputs = collectExpressionInputs(parsedExpression.inputs, []));\n\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValue = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValue)) {\n lastResult = parsedExpression(scope);\n oldInputValue = newInputValue && newInputValue.valueOf();\n }\n return lastResult;\n }, listener, objectEquality);\n }\n\n var oldInputValueOfValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n oldInputValueOfValues[i] = newInputValue && newInputValue.valueOf();\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope);\n }\n\n return lastResult;\n }, listener, objectEquality);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n if (isDefined(value)) {\n scope.$$postDigest(function () {\n if (isDefined(lastValue)) {\n unwatch();\n }\n });\n }\n }, objectEquality);\n }\n\n function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.call(this, value, old, scope);\n }\n if (isAllDefined(value)) {\n scope.$$postDigest(function () {\n if(isAllDefined(value)) unwatch();\n });\n }\n }, objectEquality);\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function (val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function constantWatch(scope) {\n return parsedExpression(scope);\n }, function constantListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n unwatch();\n }, objectEquality);\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n var fn = function interceptedExpression(scope, locals) {\n var value = parsedExpression(scope, locals);\n var result = interceptorFn(value, scope, locals);\n // we only return the interceptor's result if the\n // initial value is defined (for bind-once)\n return isDefined(value) ? result : value;\n };\n\n // Propagate $$watchDelegates other then inputsWatchDelegate\n if (parsedExpression.$$watchDelegate &&\n parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n } else if (!interceptorFn.$stateful) {\n // If there is an interceptor, but no watchDelegate then treat the interceptor like\n // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n fn.$$watchDelegate = inputsWatchDelegate;\n fn.inputs = [parsedExpression];\n }\n\n return fn;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * return $q(function(resolve, reject) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * setInterval(function() {\n * if (pollStatus > 0) {\n * resolve(polledValue);\n * } else if (pollStatus < 0) {\n * reject(polledValue);\n * } else {\n * pollStatus = pollAgain(function(value) {\n * polledValue = value;\n * });\n * }\n * }, 10000);\n * }).\n * then(function(value) {\n * // handle success\n * }, function(reason) {\n * // handle failure\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback`. It also notifies via the return value of the\n * `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback\n * method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n * make your code IE8 and Android 2.x compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in angular, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler);\n }];\n}\n\nfunction $$QProvider() {\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler);\n }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n var $qMinErr = minErr('$q', TypeError);\n function callOnce(self, resolveFn, rejectFn) {\n var called = false;\n function wrap(fn) {\n return function(value) {\n if (called) return;\n called = true;\n fn.call(self, value);\n };\n }\n\n return [wrap(resolveFn), wrap(rejectFn)];\n }\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n var defer = function() {\n return new Deferred();\n };\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n Promise.prototype = {\n then: function(onFulfilled, onRejected, progressBack) {\n var result = new Deferred();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result.promise;\n },\n\n \"catch\": function(callback) {\n return this.then(null, callback);\n },\n\n \"finally\": function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, true, callback);\n }, function(error) {\n return handleCallback(error, false, callback);\n }, progressBack);\n }\n };\n\n //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n function simpleBind(context, fn) {\n return function(value) {\n fn.call(context, value);\n };\n }\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n promise.resolve(fn(state.value));\n } else if (state.status === 1) {\n promise.resolve(state.value);\n } else {\n promise.reject(state.value);\n }\n } catch(e) {\n promise.reject(e);\n exceptionHandler(e);\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n nextTick(function() { processQueue(state); });\n }\n\n function Deferred() {\n this.promise = new Promise();\n //Necessary to support unbound execution :/\n this.resolve = simpleBind(this, this.resolve);\n this.reject = simpleBind(this, this.reject);\n this.notify = simpleBind(this, this.notify);\n }\n\n Deferred.prototype = {\n resolve: function(val) {\n if (this.promise.$$state.status) return;\n if (val === this.promise) {\n this.$$reject($qMinErr(\n 'qcycle',\n \"Expected promise to be resolved with value other than itself '{0}'\",\n val));\n }\n else {\n this.$$resolve(val);\n }\n\n },\n\n $$resolve: function(val) {\n var then, fns;\n\n fns = callOnce(this, this.$$resolve, this.$$reject);\n try {\n if ((isObject(val) || isFunction(val))) then = val && val.then;\n if (isFunction(then)) {\n this.promise.$$state.status = -1;\n then.call(val, fns[0], fns[1], this.notify);\n } else {\n this.promise.$$state.value = val;\n this.promise.$$state.status = 1;\n scheduleProcessQueue(this.promise.$$state);\n }\n } catch(e) {\n fns[1](e);\n exceptionHandler(e);\n }\n },\n\n reject: function(reason) {\n if (this.promise.$$state.status) return;\n this.$$reject(reason);\n },\n\n $$reject: function(reason) {\n this.promise.$$state.value = reason;\n this.promise.$$state.status = 2;\n scheduleProcessQueue(this.promise.$$state);\n },\n\n notify: function(progress) {\n var callbacks = this.promise.$$state.pending;\n\n if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n result.notify(isFunction(callback) ? callback(progress) : progress);\n } catch(e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n var reject = function(reason) {\n var result = new Deferred();\n result.reject(reason);\n return result.promise;\n };\n\n var makePromise = function makePromise(value, resolved) {\n var result = new Deferred();\n if (resolved) {\n result.resolve(value);\n } else {\n result.reject(value);\n }\n return result.promise;\n };\n\n var handleCallback = function handleCallback(value, isResolved, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch(e) {\n return makePromise(e, false);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return makePromise(value, isResolved);\n }, function(error) {\n return makePromise(error, false);\n });\n } else {\n return makePromise(value, isResolved);\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n var when = function(value, callback, errback, progressBack) {\n var result = new Deferred();\n result.resolve(value);\n return result.promise.then(callback, errback, progressBack);\n };\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var deferred = new Deferred(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n if (results.hasOwnProperty(key)) return;\n results[key] = value;\n if (!(--counter)) deferred.resolve(results);\n }, function(reason) {\n if (results.hasOwnProperty(key)) return;\n deferred.reject(reason);\n });\n });\n\n if (counter === 0) {\n deferred.resolve(results);\n }\n\n return deferred.promise;\n }\n\n var $Q = function Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n }\n\n if (!(this instanceof Q)) {\n // More useful when $Q is the Promise itself.\n return new Q(resolver);\n }\n\n var deferred = new Deferred();\n\n function resolveFn(value) {\n deferred.resolve(value);\n }\n\n function rejectFn(reason) {\n deferred.reject(reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return deferred.promise;\n };\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.all = all;\n\n return $Q;\n}\n\nfunction $$RAFProvider(){ //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n $window.mozRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.mozCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - this means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n function( $injector, $exceptionHandler, $parse, $browser) {\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.)\n *\n * Here is a simple scope snippet to show how you can interact with the scope.\n * ```html\n * \n * ```\n *\n * # Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n child.name = \"World\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n *\n * @param {Object.=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this['this'] = this.$root = this;\n this.$$destroyed = false;\n this.$$asyncQueue = [];\n this.$$postDigestQueue = [];\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$isolateBindings = null;\n this.$$applyAsyncQueue = [];\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate) {\n var child;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n // ensure that there is just one async queue per $rootScope and its children\n child.$$asyncQueue = this.$$asyncQueue;\n child.$$postDigestQueue = this.$$postDigestQueue;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$id = nextUid();\n this.$$ChildScope = null;\n };\n this.$$ChildScope.prototype = this;\n }\n child = new this.$$ChildScope();\n }\n child['this'] = child;\n child.$parent = this;\n child.$$prevSibling = this.$$childTail;\n if (this.$$childHead) {\n this.$$childTail.$$nextSibling = child;\n this.$$childTail = child;\n } else {\n this.$$childHead = this.$$childTail = child;\n }\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (Since\n * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the\n * `watchExpression` can execute multiple times per\n * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a\n * change is detected, be prepared for multiple calls to your listener.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * # Example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality) {\n var get = $parse(watchExp);\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, listener, objectEquality, get);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: listener,\n last: initWatchVal,\n get: get,\n exp: watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!isFunction(listener)) {\n watcher.fn = noop;\n }\n\n if (!array) {\n array = scope.$$watchers = [];\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n\n return function deregisterWatch() {\n arrayRemove(array, watcher);\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n * call to $digest() to see if any items changes.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function () {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function (expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n newValues[i] = value;\n oldValues[i] = oldValue;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * # Example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n $watchCollectionInterceptor.$stateful = true;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (newValue.hasOwnProperty(key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for(key in oldValue) {\n if (!newValue.hasOwnProperty(key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * # Example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last,\n watchers,\n asyncQueue = this.$$asyncQueue,\n postDigestQueue = this.$$postDigestQueue,\n length,\n dirty, ttl = TTL,\n next, current, target = this,\n watchLog = [],\n logIdx, logMsg, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n while(asyncQueue.length) {\n try {\n asyncTask = asyncQueue.shift();\n asyncTask.scope.$eval(asyncTask.expression);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = current.$$watchers)) {\n // process our watches\n length = watchers.length;\n while (length--) {\n try {\n watch = watchers[length];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n if ((value = watch.get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (typeof value === 'number' && typeof last === 'number'\n && isNaN(value) && isNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n watch.fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n logMsg = (isFunction(watch.exp))\n ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n : watch.exp;\n logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n watchLog[logIdx].push(logMsg);\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n if (!(next = (current.$$childHead ||\n (current !== target && current.$$nextSibling)))) {\n while(current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, toJson(watchLog));\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n while(postDigestQueue.length) {\n try {\n postDigestQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n },\n\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // we can't destroy the root scope or a scope that has been already destroyed\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n if (this === $rootScope) return;\n\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n\n // All of the code below is bogus code that works around V8's memory leak via optimized code\n // and inline caches.\n //\n // see:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n this.$$childTail = this.$root = null;\n\n // don't reset these to null in case some async task tries to register a listener/watch/task\n this.$$listeners = {};\n this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];\n\n // prevent NPEs since these methods have references to properties we nulled out\n this.$destroy = this.$digest = this.$apply = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating Angular\n * expressions.\n *\n * # Example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n */\n $evalAsync: function(expr) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n $browser.defer(function() {\n if ($rootScope.$$asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n this.$$asyncQueue.push({scope: this, expression: expr});\n },\n\n $$postDigest : function(fn) {\n this.$$postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in angular from outside of the angular\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the angular framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * ## Life cycle\n *\n * # Pseudo-Code of `$apply()`\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n return this.$eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n clearPhase();\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invokation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n expr && $rootScope.$$applyAsyncQueue.push($applyAsyncExpression);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n namedListeners[namedListeners.indexOf(listener)] = null;\n decrementListenerCount(self, 1, name);\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i=0, length=namedListeners.length; i= 8 ) {\n normalizedVal = urlResolve(uri).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:'+normalizedVal;\n }\n }\n return uri;\n };\n };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n HTML: 'html',\n CSS: 'css',\n URL: 'url',\n // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n // url. (e.g. ng-include, script src, templateUrl)\n RESOURCE_URL: 'resourceUrl',\n JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:# -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace('\\\\*\\\\*', '.*').\n replace('\\\\*', '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe. Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. \n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * Note: **an empty whitelist array will block all URLs**!\n *\n * @return {Array} the currently set whitelist array.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n */\n this.resourceUrlWhitelist = function (value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} the currently set blacklist array.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n */\n\n this.resourceUrlBlacklist = function (value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', function($injector) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns an object that is trusted by angular for use in specified strict\n * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n * attribute interpolation, any dom event binding attribute interpolation\n * such as for onclick, etc.) that uses the provided value.\n * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n * returns the originally supplied value if the queried context type is a supertype of the\n * created type. If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call.\n * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n // If we get here, then we may only take one of two actions.\n // 1. sanitize the value for the requested type, or\n // 2. throw an exception.\n if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n return htmlSanitizer(maybeTrusted);\n }\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context. One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note: When enabled (the default), IE8 in quirks mode is not supported. In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n * to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding ``\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * \n *
\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings. (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this. Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `
implicitly trusted'\">
`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * \n * ## What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`
Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist}
\n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage.). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * if they as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. e.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * \n * \n *
\n *

\n * User comments
\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n *
\n *
\n * {{userComment.name}}:\n * \n *
\n *
\n *
\n *
\n *
\n *\n * \n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function($http, $templateCache, $sce) {\n * var self = this;\n * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n * self.userComments = userComments;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * 'Hover over this text.');\n * }]);\n * \n *\n * \n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"Is anyone reading this?\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"Yes! Am I the only other one?\"\n * }\n * ]\n * \n *\n * \n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n * .toBe('Is anyone reading this?');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n * 'Hover over this text.');\n * });\n * });\n * \n *
\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE.\n * @return {boolean} true if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function (value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the a value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we\n * may not use inheritance anymore. That is OK because no code outside of\n * sce.js and sceSpecs.js would need to be aware of this detail.\n */\n\n this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n $parse, $sniffer, $sceDelegate) {\n // Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n 'mode. You can fix this by adding the text to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function () {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The kind of SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function (value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n * returns an object that is trusted by angular for use in specified strict contextual\n * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n * escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resource_url, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the return\n * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n * originally supplied value if the queried context type is a supertype of the created type.\n * If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n * call.\n * @returns {*} The value the was originally provided to\n * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n * Otherwise, throws an exception.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function (enumValue, name) {\n var lName = lowercase(name);\n sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n return parse(enumValue, expr);\n };\n sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n return getTrusted(enumValue, value);\n };\n sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n android =\n int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n documentMode = document.documentMode,\n vendorPrefix,\n vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false,\n match;\n\n if (bodyStyle) {\n for(var prop in bodyStyle) {\n if(match = vendorRegex.exec(prop)) {\n vendorPrefix = match[0];\n vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n break;\n }\n }\n\n if(!vendorPrefix) {\n vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n }\n\n transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n if (android && (!transitions||!animations)) {\n transitions = isString(document.body.style.webkitTransition);\n animations = isString(document.body.style.webkitAnimation);\n }\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n // jshint -W018\n history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n // jshint +W018\n hashchange: 'onhashchange' in $window &&\n // IE8 compatible mode lies\n (!documentMode || documentMode > 7),\n hasEvent: function(event) {\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n if (event == 'input' && msie == 9) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n vendorPrefix: vendorPrefix,\n transitions : transitions,\n animations : animations,\n android: android,\n msie : msie,\n msieDocumentMode: documentMode\n };\n }];\n}\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service downloads the provided template using `$http` and, upon success,\n * stores the contents inside of `$templateCache`. If the HTTP request fails or the response data\n * of the HTTP request is empty then a `$compile` error will be thrown (the exception can be thwarted\n * by setting the 2nd parameter of the function to true).\n *\n * @param {string} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} the HTTP Promise for the given.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\nfunction $TemplateRequestProvider() {\n this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {\n function handleRequestFn(tpl, ignoreRequestError) {\n var self = handleRequestFn;\n self.totalPendingRequests++;\n\n return $http.get(tpl, { cache : $templateCache })\n .then(function(response) {\n var html = response.data;\n if(!html || html.length === 0) {\n return handleError();\n }\n\n self.totalPendingRequests--;\n $templateCache.put(tpl, html);\n return html;\n }, handleError);\n\n function handleError() {\n self.totalPendingRequests--;\n if (!ignoreRequestError) {\n throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);\n }\n return $q.reject();\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }];\n}\n\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + expression + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) != -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of registering a timeout function is a promise, which will be resolved when\n * the timeout is reached and the timeout function is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * @param {function()} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n * promise will be resolved with is the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n var skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn());\n } catch(e) {\n deferred.reject(e);\n $exceptionHandler(e);\n }\n finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (promise && promise.$$timeoutId in deferreds) {\n deferreds[promise.$$timeoutId].reject('canceled');\n delete deferreds[promise.$$timeoutId];\n return $browser.defer.cancel(promise.$$timeoutId);\n }\n return false;\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|----------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol including the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol\n * | hostname | The hostname\n * | port | The port, without \":\"\n * | pathname | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n var href = url;\n\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute(\"href\", href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n \n \n \n
\n \n \n
\n
\n \n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n \n
\n */\nfunction $WindowProvider(){\n this.$get = valueFn(window);\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n \n \n
\n

{{ originalText }}

\n

{{ filteredText }}

\n
\n
\n\n \n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n \n
\n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if(isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false,\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n * the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n * will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n * property of the object. That's equivalent to the simple substring match with a `string`\n * as described above. The predicate can be negated by prefixing the string with `!`.\n * For Example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * - `function(value, index)`: A predicate function can be used to write arbitrary filters. The\n * function is called for each element of `array`. The final result is an array of those\n * elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n * determining if the expected value (from the filter expression) and actual value (from\n * the object in the array) should be considered a match.\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if the item should be included in filtered result.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n * this is essentially strict comparison of expected and actual.\n *\n * - `false|undefined`: A short hand for a function which will look for a substring match in case\n * insensitive way.\n *\n * @example\n \n \n
\n\n Search: \n \n \n \n \n \n \n
NamePhone
{{friend.name}}{{friend.phone}}
\n
\n Any:
\n Name only
\n Phone only
\n Equality
\n \n \n \n \n \n \n
NamePhone
{{friendObj.name}}{{friendObj.phone}}
\n
\n \n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n \n
\n */\nfunction filterFilter() {\n return function(array, expression, comparator) {\n if (!isArray(array)) return array;\n\n var comparatorType = typeof(comparator),\n predicates = [];\n\n predicates.check = function(value, index) {\n for (var j = 0; j < predicates.length; j++) {\n if(!predicates[j](value, index)) {\n return false;\n }\n }\n return true;\n };\n\n if (comparatorType !== 'function') {\n if (comparatorType === 'boolean' && comparator) {\n comparator = function(obj, text) {\n return angular.equals(obj, text);\n };\n } else {\n comparator = function(obj, text) {\n if (obj && text && typeof obj === 'object' && typeof text === 'object') {\n for (var objKey in obj) {\n if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&\n comparator(obj[objKey], text[objKey])) {\n return true;\n }\n }\n return false;\n }\n text = (''+text).toLowerCase();\n return (''+obj).toLowerCase().indexOf(text) > -1;\n };\n }\n }\n\n var search = function(obj, text){\n if (typeof text == 'string' && text.charAt(0) === '!') {\n return !search(obj, text.substr(1));\n }\n switch (typeof obj) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n return comparator(obj, text);\n case \"object\":\n switch (typeof text) {\n case \"object\":\n return comparator(obj, text);\n default:\n for ( var objKey in obj) {\n if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n return true;\n }\n }\n break;\n }\n return false;\n case \"array\":\n for ( var i = 0; i < obj.length; i++) {\n if (search(obj[i], text)) {\n return true;\n }\n }\n return false;\n default:\n return false;\n }\n };\n switch (typeof expression) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n // Set up expression object and fall through\n expression = {$:expression};\n // jshint -W086\n case \"object\":\n // jshint +W086\n for (var key in expression) {\n (function(path) {\n if (typeof expression[path] === 'undefined') return;\n predicates.push(function(value) {\n return search(path == '$' ? value : (value && value[path]), expression[path]);\n });\n })(key);\n }\n break;\n case 'function':\n predicates.push(expression);\n break;\n default:\n return array;\n }\n var filtered = [];\n for ( var j = 0; j < array.length; j++) {\n var value = array[j];\n if (predicates.check(value, j)) {\n filtered.push(value);\n }\n }\n return filtered;\n };\n}\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n \n \n \n
\n
\n default currency symbol ($): {{amount | currency}}
\n custom currency identifier (USD$): {{amount | currency:\"USD$\"}}\n
\n
\n \n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n });\n it('should update', function() {\n if (browser.params.browser == 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n });\n \n
\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol){\n if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n replace(/\\u00A4/g, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n \n \n \n
\n Enter number:
\n Default formatting: {{val | number}}
\n No fractions: {{val | number:0}}
\n Negative number: {{-val | number:4}}\n
\n
\n \n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n \n
\n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n if (!isFinite(number) || isObject(number)) return '';\n\n var isNegative = number < 0;\n number = Math.abs(number);\n var numStr = number + '',\n formatedText = '',\n parts = [];\n\n var hasExponent = false;\n if (numStr.indexOf('e') !== -1) {\n var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n numStr = '0';\n number = 0;\n } else {\n formatedText = numStr;\n hasExponent = true;\n }\n }\n\n if (!hasExponent) {\n var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n // determine fractionSize if it is not specified\n if (isUndefined(fractionSize)) {\n fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n }\n\n // safely round numbers in JS without hitting imprecisions of floating-point arithmetics\n // inspired by:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);\n\n if (number === 0) {\n isNegative = false;\n }\n\n var fraction = ('' + number).split(DECIMAL_SEP);\n var whole = fraction[0];\n fraction = fraction[1] || '';\n\n var i, pos = 0,\n lgroup = pattern.lgSize,\n group = pattern.gSize;\n\n if (whole.length >= (lgroup + group)) {\n pos = whole.length - lgroup;\n for (i = 0; i < pos; i++) {\n if ((pos - i)%group === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n }\n\n for (i = pos; i < whole.length; i++) {\n if ((whole.length - i)%lgroup === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n\n // format fraction part.\n while(fraction.length < fractionSize) {\n fraction += '0';\n }\n\n if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n } else {\n\n if (fractionSize > 0 && number > -1 && number < 1) {\n formatedText = number.toFixed(fractionSize);\n }\n }\n\n parts.push(isNegative ? pattern.negPre : pattern.posPre);\n parts.push(formatedText);\n parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n var neg = '';\n if (num < 0) {\n neg = '-';\n num = -num;\n }\n num = '' + num;\n while(num.length < digits) num = '0' + num;\n if (trim)\n num = num.substr(num.length - digits);\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset)\n value += offset;\n if (value === 0 && offset == -12 ) value = 12;\n return padNumber(value, size, trim);\n };\n}\n\nfunction dateStrGetter(name, shortForm) {\n return function(date, formats) {\n var value = date['get' + name]();\n var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date) {\n var zone = -1 * date.getTimezoneOffset();\n var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4),\n yy: dateGetter('FullYear', 2, 0, true),\n y: dateGetter('FullYear', 1),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1)\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,\n NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: ISO-8601 week of year (00-53)\n * * `'w'`: ISO-8601 week of year (0-53)\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. Right now, only `'UTC'` is supported.\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n \n \n {{1288323623006 | date:'medium'}}:\n {{1288323623006 | date:'medium'}}
\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}:\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}
\n {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}:\n {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}
\n {{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}:\n {{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}
\n
\n \n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n \n
\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = int(match[9] + match[10]);\n tzMin = int(match[9] + match[11]);\n }\n dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n var h = int(match[4]||0) - tzHour;\n var m = int(match[5]||0) - tzMin;\n var s = int(match[6]||0);\n var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date)) {\n return date;\n }\n\n while(format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n if (timezone && timezone === 'UTC') {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\n }\n forEach(parts, function(value){\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS)\n : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example\n \n \n
{{ {'name':'value'} | json }}
\n
\n \n it('should jsonify filtered objects', function() {\n expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n });\n \n
\n *\n */\nfunction jsonFilter() {\n return function(object) {\n return toJson(object, true);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n * had less than `limit` elements.\n *\n * @example\n \n \n \n
\n Limit {{numbers}} to: \n

Output numbers: {{ numbers | limitTo:numLimit }}

\n Limit {{letters}} to: \n

Output letters: {{ letters | limitTo:letterLimit }}

\n Limit {{longNumber}} to: \n

Output long number: {{ longNumber | limitTo:longNumberLimit }}

\n
\n
\n \n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n \n
\n*/\nfunction limitToFilter(){\n return function(input, limit) {\n if (isNumber(input)) input = input.toString();\n if (!isArray(input) && !isString(input)) return input;\n\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = int(limit);\n }\n\n if (isString(input)) {\n //NaN check on limit\n if (limit) {\n return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n } else {\n return \"\";\n }\n }\n\n var out = [],\n i, n;\n\n // if abs(limit) exceeds maximum length, trim it\n if (limit > input.length)\n limit = input.length;\n else if (limit < -input.length)\n limit = -input.length;\n\n if (limit > 0) {\n i = 0;\n n = limit;\n } else {\n i = input.length + limit;\n n = input.length;\n }\n\n for (; i} expression A predicate to be\n * used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `function`: Getter function. The result of this function will be sorted using the\n * `<`, `=`, `>` operator.\n * - `string`: An Angular expression. The result of this expression is used to compare elements\n * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n * 3 first characters of a property called `name`). The result of a constant expression\n * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n * to sort object by the value of their `special name` property). An expression can be\n * optionally prefixed with `+` or `-` to control ascending or descending sort order\n * (for example, `+name` or `-name`).\n * - `Array`: An array of function or string predicates. The first predicate in the array\n * is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n \n \n \n
\n
Sorting predicate = {{predicate}}; reverse = {{reverse}}
\n
\n [ unsorted ]\n \n \n \n \n \n \n \n \n \n \n \n
Name\n (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
\n
\n
\n
\n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n \n \n
\n \n \n \n \n \n \n \n \n \n \n \n
Name\n (^)Phone NumberAge
{{friend.name}}{{friend.phone}}{{friend.age}}
\n
\n
\n\n \n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n var orderBy = $filter('orderBy');\n $scope.friends = [\n { name: 'John', phone: '555-1212', age: 10 },\n { name: 'Mary', phone: '555-9876', age: 19 },\n { name: 'Mike', phone: '555-4321', age: 21 },\n { name: 'Adam', phone: '555-5678', age: 35 },\n { name: 'Julie', phone: '555-8765', age: 29 }\n ];\n $scope.order = function(predicate, reverse) {\n $scope.friends = orderBy($scope.friends, predicate, reverse);\n };\n $scope.order('-age',false);\n }]);\n \n
\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n return function(array, sortPredicate, reverseOrder) {\n if (!(isArrayLike(array))) return array;\n if (!sortPredicate) return array;\n sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n sortPredicate = sortPredicate.map(function(predicate){\n var descending = false, get = predicate || identity;\n if (isString(predicate)) {\n if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n descending = predicate.charAt(0) == '-';\n predicate = predicate.substring(1);\n }\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n return reverseComparator(function(a,b) {\n return compare(a[key], b[key]);\n }, descending);\n }\n }\n return reverseComparator(function(a,b){\n return compare(get(a),get(b));\n }, descending);\n });\n var arrayCopy = [];\n for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n function comparator(o1, o2){\n for ( var i = 0; i < sortPredicate.length; i++) {\n var comp = sortPredicate[i](o1, o2);\n if (comp !== 0) return comp;\n }\n return 0;\n }\n function reverseComparator(comp, descending) {\n return descending\n ? function(a,b){return comp(b,a);}\n : comp;\n }\n function compare(v1, v2){\n var t1 = typeof v1;\n var t2 = typeof v2;\n if (t1 == t2) {\n if (isDate(v1) && isDate(v2)) {\n v1 = v1.valueOf();\n v2 = v2.valueOf();\n }\n if (t1 == \"string\") {\n v1 = v1.toLowerCase();\n v2 = v2.toLowerCase();\n }\n if (v1 === v2) return 0;\n return v1 < v2 ? -1 : 1;\n } else {\n return t1 < t2 ? -1 : 1;\n }\n }\n };\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `Add Item`\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n\n if (msie <= 8) {\n\n // turn link into a stylable link in IE\n // but only if it doesn't have name attribute, in which case it's an anchor\n if (!attr.href && !attr.name) {\n attr.$set('href', '');\n }\n\n // add a comment node to anchors to workaround IE bug that causes element content to be reset\n // to new attribute content if attribute is updated with value containing @ and element also\n // contains value with @\n // see issue #1949\n element.append(document.createComment('IE fix'));\n }\n\n if (!attr.href && !attr.xlinkHref && !attr.name) {\n return function(scope, element) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event){\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * link1\n * ```\n *\n * The correct way to write it:\n * ```html\n * link1\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n \n \n
\n link 1 (link, don't reload)
\n link 2 (link, don't reload)
\n link 3 (link, reload!)
\n anchor (link, don't reload)
\n anchor (no link)
\n link (link, change location)\n
\n \n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n xit('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n \n
\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * ```html\n *
\n * \n *
\n * ```\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Click me to toggle:
\n \n
\n \n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to check both:
\n \n
\n \n it('should check both checkBoxes', function() {\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n element(by.model('master')).click();\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to make text readonly:
\n \n
\n \n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n \n
\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Check me to select:
\n \n
\n \n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n \n
\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me check multiple:
\n
\n Show/Hide me\n
\n
\n \n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n \n
\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName == \"multiple\") return;\n\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: function(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // we use attr[attrName] value since $set can sanitize the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $$setPending: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$clearControlValidity: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n * forms with failing validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for given error name.\n *\n * Built-in validation tokens:\n *\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n var form = this,\n controls = [];\n\n var parentForm = form.$$parentForm = element.parent().controller('form') || nullFormCtrl;\n\n // init state\n form.$error = {};\n form.$$success = {};\n form.$pending = undefined;\n form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n form.$dirty = false;\n form.$pristine = true;\n form.$valid = true;\n form.$invalid = false;\n form.$submitted = false;\n\n parentForm.$addControl(form);\n\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS);\n\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n form.$rollbackViewValue = function() {\n forEach(controls, function(control) {\n control.$rollbackViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n form.$commitViewValue = function() {\n forEach(controls, function(control) {\n control.$commitViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n *\n * @description\n * Register a control with the form.\n *\n * Input elements using ngModelController do this automatically when they are linked.\n */\n form.$addControl = function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n controls.push(control);\n\n if (control.$name) {\n form[control.$name] = control;\n }\n };\n\n // Private API: rename a form control\n form.$$renameControl = function(control, newName) {\n var oldName = control.$name;\n\n if (form[oldName] === control) {\n delete form[oldName];\n }\n form[newName] = control;\n control.$name = newName;\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n */\n form.$removeControl = function(control) {\n if (control.$name && form[control.$name] === control) {\n delete form[control.$name];\n }\n forEach(form.$pending, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$error, function(value, name) {\n form.$setValidity(name, null, control);\n });\n\n arrayRemove(controls, control);\n };\n\n\n /**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Sets the validity of a form control.\n *\n * This method will also propagate to parent forms.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: element,\n set: function(object, property, control) {\n var list = object[property];\n if (!list) {\n object[property] = [control];\n } else {\n var index = list.indexOf(control);\n if (index === -1) {\n list.push(control);\n }\n }\n },\n unset: function(object, property, control) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, control);\n if (list.length === 0) {\n delete object[property];\n }\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n form.$setDirty = function() {\n $animate.removeClass(element, PRISTINE_CLASS);\n $animate.addClass(element, DIRTY_CLASS);\n form.$dirty = true;\n form.$pristine = false;\n parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n * state (ng-pristine class). This method will also propagate to all the controls contained\n * in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n form.$setPristine = function () {\n $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n form.$dirty = false;\n form.$pristine = true;\n form.$submitted = false;\n forEach(controls, function(control) {\n control.$setPristine();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n form.$setUntouched = function () {\n forEach(controls, function(control) {\n control.$setUntouched();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its submitted state.\n */\n form.$setSubmitted = function () {\n $animate.addClass(element, SUBMITTED_CLASS);\n form.$submitted = true;\n parentForm.$setSubmitted();\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `
` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `` but can be nested. This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n *
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-form.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * 
\n *\n * @example\n \n \n \n \n \n userType: \n Required!
\n userType = {{userType}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n \n
\n \n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n \n
\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', function($timeout) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n controller: FormController,\n compile: function() {\n return {\n pre: function(scope, formElement, attr, controller) {\n if (!attr.action) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault\n ? event.preventDefault()\n : event.returnValue = false; // IE\n };\n\n addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = controller.$$parentForm,\n alias = controller.$name;\n\n if (alias) {\n setter(scope, alias, controller, alias);\n attr.$observe(attr.name ? 'name' : 'ngForm', function(newValue) {\n if (alias === newValue) return;\n setter(scope, alias, undefined, alias);\n alias = newValue;\n setter(scope, alias, controller, alias);\n parentFormCtrl.$$renameControl(controller, alias);\n });\n }\n if (parentFormCtrl !== nullFormCtrl) {\n formElement.on('$destroy', function() {\n parentFormCtrl.$removeControl(controller);\n if (alias) {\n setter(scope, alias, undefined, alias);\n }\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n }\n };\n }\n };\n\n return formDirective;\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n*/\n\n// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\nvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\nvar $ngModelMinErr = new minErr('ngModel');\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n
\n Single word: \n \n Required!\n \n Single word only!\n\n text = {{text}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Pick a date in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-dd\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[dateTimeLocal]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. The model must be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-ddTHH:mm:ss\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Pick a between 8am and 5pm:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"HH:mm:ss\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO week format (yyyy-W##).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO week format (yyyy-W##).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-Www\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`. The model must always be a Date object. In the event the model is\n * not set to the first of the month, the first of that model's month is assumed.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be\n * a valid ISO month format (yyyy-MM).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must\n * be a valid ISO month format (yyyy-MM).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Pick a month int 2013:\n \n \n Required!\n \n Not a valid month!\n value = {{value | date: \"yyyy-MM\"}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n
\n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Number: \n \n Required!\n \n Not valid number!\n value = {{value}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n
\n
\n \n var value = element(by.binding('value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n URL: \n \n Required!\n \n Not valid url!\n text = {{text}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n myForm.$error.url = {{!!myForm.$error.url}}
\n
\n
\n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Email: \n \n Required!\n \n Not valid email!\n text = {{text}}
\n myForm.input.$valid = {{myForm.input.$valid}}
\n myForm.input.$error = {{myForm.input.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n myForm.$error.email = {{!!myForm.$error.email}}
\n
\n
\n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n \n
\n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string} value The value to which the expression should be set when selected.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue Angular expression which sets the value to which the expression should\n * be set when selected.\n *\n * @example\n \n \n \n
\n Red
\n Green
\n Blue
\n color = {{color | json}}
\n
\n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n
\n \n it('should change state', function() {\n var color = element(by.binding('color'));\n\n expect(color.getText()).toContain('blue');\n\n element.all(by.model('color')).get(0).click();\n\n expect(color.getText()).toContain('red');\n });\n \n
\n */\n 'radio': radioInputType,\n\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n
\n Value1:
\n Value2:
\n value1 = {{value1}}
\n value2 = {{value2}}
\n
\n
\n \n it('should change state', function() {\n var value1 = element(by.binding('value1'));\n var value2 = element(by.binding('value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('value1')).click();\n element(by.model('value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n \n
\n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction testFlags(validity, flags) {\n var i, flag;\n if (flags) {\n for (i=0; i= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) ? (isDate(val) ? val : parseDate(val)) : undefined;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n // - also sets validity.badInput (should only be validity.typeMismatch).\n // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n // - can ignore this case as we can still read out the erroneous email...\n return validity.badInput && !validity.typeMismatch ? undefined : value;\n });\n }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n ctrl.$$parserName = 'number';\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw $ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n\n if (attr.min || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n };\n\n attr.$observe('min', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (attr.max || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'url';\n ctrl.$validators.url = function(value) {\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'email';\n ctrl.$validators.email = function(value) {\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n if (element[0].checked) {\n ctrl.$setViewValue(attr.value, ev && ev.type);\n }\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n element[0].checked = (value == ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because an empty checkbox is never equal to the trueValue\n ctrl.$isEmpty = function(value) {\n return value !== trueValue;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n
\n
\n User name: \n \n Required!
\n Last name: \n \n Too short!\n \n Too long!
\n
\n
\n user = {{user}}
\n myForm.userName.$valid = {{myForm.userName.$valid}}
\n myForm.userName.$error = {{myForm.userName.$error}}
\n myForm.lastName.$valid = {{myForm.lastName.$valid}}
\n myForm.lastName.$error = {{myForm.lastName.$error}}
\n myForm.$valid = {{myForm.$valid}}
\n myForm.$error.required = {{!!myForm.$error.required}}
\n myForm.$error.minlength = {{!!myForm.$error.minlength}}
\n myForm.$error.maxlength = {{!!myForm.$error.maxlength}}
\n
\n
\n \n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n \n
\n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n PENDING_CLASS = 'ng-pending';\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever\n the control reads value from the DOM. Each function is called, in turn, passing the value\n through to the next. The last return value is used to populate the model.\n Used to sanitize / convert the value as well as validation. For validation,\n the parsers should update the validity state using\n {@link ngModel.NgModelController#$setValidity $setValidity()},\n and return `undefined` for invalid values.\n\n *\n * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever\n the model value changes. Each function is called, in turn, passing the value through to the\n next. Used to format / convert values for display in the control and validation.\n * ```js\n * function formatter(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. Also, keep in mind that all\n * asynchronous validators will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @param {string} name The name of the validator.\n * @param {Function} validationFn The validation function that will be run.\n *\n * @property {Array.} $viewChangeListeners Array of functions to execute whenever the\n * view value has changed. It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user. This will not work on older browsers.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. ``).\n * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * \n \n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n \n \n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$apply(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a
behind\n // If strip-br attribute is provided then we strip this out\n if ( attrs.stripBr && html == '
' ) {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n
\n \n
\n
Change me!
\n Required!\n
\n \n
\n
\n \n it('should data-bind and become invalid', function() {\n if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n \n *
\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n\n\n var parsedNgModel = $parse($attr.ngModel),\n pendingDebounce = null,\n ctrl = this;\n\n var ngModelGet = function ngModelGet() {\n var modelValue = parsedNgModel($scope);\n if (ctrl.$options && ctrl.$options.getterSetter && isFunction(modelValue)) {\n modelValue = modelValue();\n }\n return modelValue;\n };\n\n var ngModelSet = function ngModelSet(newValue) {\n var getterSetter;\n if (ctrl.$options && ctrl.$options.getterSetter &&\n isFunction(getterSetter = parsedNgModel($scope))) {\n\n getterSetter(ctrl.$modelValue);\n } else {\n parsedNgModel.assign($scope, ctrl.$modelValue);\n }\n };\n\n this.$$setOptions = function(options) {\n ctrl.$options = options;\n\n if (!parsedNgModel.assign && (!options || !options.getterSetter)) {\n throw $ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n $attr.ngModel, startingTag($element));\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different to last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different to their previous value. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n this.$render = noop;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of the input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different to the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value Model value to check.\n * @returns {boolean} True if `value` is empty.\n */\n this.$isEmpty = function(value) {\n return isUndefined(value) || value === '' || value === null || value !== value;\n };\n\n var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n currentValidationRunId = 0;\n\n // Setup initial state of the control\n $element\n .addClass(PRISTINE_CLASS)\n .addClass(UNTOUCHED_CLASS);\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notifies the form.\n *\n * This method can be called within $parsers/$formatters. However, if possible, please use the\n * `ngModel.$validators` pipeline which is designed to call this method automatically.\n *\n * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n * to `$error[validationErrorKey]` and `$pending[validationErrorKey]`\n * so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null).\n */\n addSetValidityMethod({\n ctrl: this,\n $element: $element,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n * state (ng-pristine class). A model is considered to be pristine when the model has not been changed\n * from when first compiled within then form.\n */\n this.$setPristine = function () {\n ctrl.$dirty = false;\n ctrl.$pristine = true;\n $animate.removeClass($element, DIRTY_CLASS);\n $animate.addClass($element, PRISTINE_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the control to its\n * untouched state (ng-untouched class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n this.$setUntouched = function() {\n ctrl.$touched = false;\n ctrl.$untouched = true;\n $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the 'ng-untouched' class and set the control to its\n * touched state (ng-touched class). A model is considered to be touched when the user has\n * first interacted (focussed) on the model input element and then shifted focus away (blurred)\n * from the input element.\n */\n this.$setTouched = function() {\n ctrl.$touched = true;\n ctrl.$untouched = false;\n $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for a some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced events or events such\n * as blur you can have a situation where there is a period when the `$viewValue`\n * is out of synch with the ngModel's `$modelValue`.\n *\n * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because Angular's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * \n * \n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.resetWithCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myForm.myInput1.$rollbackViewValue();\n * $scope.myValue = '';\n * }\n * };\n * $scope.resetWithoutCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myValue = '';\n * }\n * };\n * }]);\n * \n * \n *
\n *

Try typing something in each input. See that the model only updates when you\n * blur off the input.\n *

\n *

Now see what happens if you start typing then press the Escape key

\n *\n *
\n *

With $rollbackViewValue()

\n *
\n * myValue: \"{{ myValue }}\"\n *\n *

Without $rollbackViewValue()

\n *
\n * myValue: \"{{ myValue }}\"\n *
\n *
\n *
\n *
\n */\n this.$rollbackViewValue = function() {\n $timeout.cancel(pendingDebounce);\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n ctrl.$render();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then asynchronous validators).\n */\n this.$validate = function() {\n // ignore $validate before model is initialized\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n return;\n }\n this.$$parseAndValidate();\n };\n\n this.$$runValidators = function(parseValid, modelValue, viewValue, doneCallback) {\n currentValidationRunId++;\n var localValidationRunId = currentValidationRunId;\n\n // check parser error\n if (!processParseErrors(parseValid)) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors(parseValid) {\n var errorKey = ctrl.$$parserName || 'parse';\n if (parseValid === undefined) {\n setValidity(errorKey, null);\n } else {\n setValidity(errorKey, parseValid);\n if (!parseValid) {\n forEach(ctrl.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(ctrl.$validators, function(validator, name) {\n var result = validator(modelValue, viewValue);\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(ctrl.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw $ngModelMinErr(\"$asyncValidators\",\n \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function(error) {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n $q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === currentValidationRunId) {\n ctrl.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n this.$commitViewValue = function() {\n var viewValue = ctrl.$viewValue;\n\n $timeout.cancel(pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n return;\n }\n ctrl.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (ctrl.$pristine) {\n ctrl.$dirty = true;\n ctrl.$pristine = false;\n $animate.removeClass($element, PRISTINE_CLASS);\n $animate.addClass($element, DIRTY_CLASS);\n parentForm.$setDirty();\n }\n this.$$parseAndValidate();\n };\n\n this.$$parseAndValidate = function() {\n var parserValid = true,\n viewValue = ctrl.$$lastCommittedViewValue,\n modelValue = viewValue;\n for(var i = 0; i < ctrl.$parsers.length; i++) {\n modelValue = ctrl.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n parserValid = false;\n break;\n }\n }\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n // ctrl.$modelValue has not been touched yet...\n ctrl.$modelValue = ngModelGet();\n }\n var prevModelValue = ctrl.$modelValue;\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n if (allowInvalid) {\n ctrl.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n ctrl.$$runValidators(parserValid, modelValue, viewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n };\n\n this.$$writeModelToScope = function() {\n ngModelSet(ctrl.$modelValue);\n forEach(ctrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch(e) {\n $exceptionHandler(e);\n }\n });\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when an input directive want to change the view value; typically,\n * this is done from within a DOM event handler.\n *\n * For example {@link ng.directive:input input} calls it when the value of the input changes and\n * {@link ng.directive:select select} calls it when an option is selected.\n *\n * If the new `value` is an object (rather than a string or a number), we should make a copy of the\n * object before passing it to `$setViewValue`. This is because `ngModel` does not perform a deep\n * watch of objects, it only looks for a change of identity. If you only change the property of\n * the object then ngModel will not realise that the object has changed and will not invoke the\n * `$parsers` and `$validators` pipelines.\n *\n * For this reason, you should not change properties of the copy once it has been passed to\n * `$setViewValue`. Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * When this method is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value sent directly for processing, finally to be applied to `$modelValue` and then the\n * **expression** specified in the `ng-model` attribute.\n *\n * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n *\n * Note that calling this function does not trigger a `$digest`.\n *\n * @param {string} value Value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n this.$setViewValue = function(value, trigger) {\n ctrl.$viewValue = value;\n if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n ctrl.$$debounceViewValueCommit(trigger);\n }\n };\n\n this.$$debounceViewValueCommit = function(trigger) {\n var debounceDelay = 0,\n options = ctrl.$options,\n debounce;\n\n if (options && isDefined(options.debounce)) {\n debounce = options.debounce;\n if (isNumber(debounce)) {\n debounceDelay = debounce;\n } else if (isNumber(debounce[trigger])) {\n debounceDelay = debounce[trigger];\n } else if (isNumber(debounce['default'])) {\n debounceDelay = debounce['default'];\n }\n }\n\n $timeout.cancel(pendingDebounce);\n if (debounceDelay) {\n pendingDebounce = $timeout(function() {\n ctrl.$commitViewValue();\n }, debounceDelay);\n } else if ($rootScope.$$phase) {\n ctrl.$commitViewValue();\n } else {\n $scope.$apply(function() {\n ctrl.$commitViewValue();\n });\n }\n };\n\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n $scope.$watch(function ngModelWatch() {\n var modelValue = ngModelGet();\n\n // if scope model value and ngModel value are out of sync\n // TODO(perf): why not move this to the action fn?\n if (modelValue !== ctrl.$modelValue) {\n ctrl.$modelValue = modelValue;\n\n var formatters = ctrl.$formatters,\n idx = formatters.length;\n\n var viewValue = modelValue;\n while(idx--) {\n viewValue = formatters[idx](viewValue);\n }\n if (ctrl.$viewValue !== viewValue) {\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n ctrl.$render();\n\n ctrl.$$runValidators(undefined, modelValue, viewValue, noop);\n }\n }\n\n return modelValue;\n });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[dateTimeLocal] dateTimeLocal}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid` is set if the model is valid.\n * - `ng-invalid` is set if the model is invalid.\n * - `ng-pristine` is set if the model is pristine.\n * - `ng-dirty` is set if the model is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n *
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-input.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * 
\n *\n * @example\n * \n \n \n \n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n
\n \n
\n
\n *
\n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different than what the model exposes\n * to the view.\n *\n *
\n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n *
\n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a `
`, which will enable this behavior for all ``s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * \n \n
\n \n Name:\n \n \n
user.name = 
\n
\n
\n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n if (angular.isDefined(newName)) {\n _name = newName;\n }\n return _name;\n }\n };\n }]);\n \n *
\n */\nvar ngModelDirective = function() {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n link: {\n pre: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || nullFormCtrl;\n\n modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n formCtrl.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n formCtrl.$removeControl(modelCtrl);\n });\n },\n post: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n element.on(modelCtrl.$options.updateOn, function(ev) {\n modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n });\n }\n\n element.on('blur', function(ev) {\n if (modelCtrl.$touched) return;\n\n scope.$apply(function() {\n modelCtrl.$setTouched();\n });\n });\n }\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * \n * \n * \n *
\n * \n * \n *
\n * debug = {{confirmed}}
\n * counter = {{counter}}
\n *
\n *
\n * \n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * \n *
\n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\n\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(value) {\n return !attr.required || !ctrl.$isEmpty(value);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp(regex);\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value);\n };\n }\n };\n};\n\n\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = 0;\n attr.$observe('maxlength', function(value) {\n maxlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length <= maxlength;\n };\n }\n };\n};\n\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * ### Example with Validation\n *\n * \n * \n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * \n * \n *
\n * List: \n * \n * Required!\n *
\n * names = {{names}}
\n * myForm.namesInput.$valid = {{myForm.namesInput.$valid}}
\n * myForm.namesInput.$error = {{myForm.namesInput.$error}}
\n * myForm.$valid = {{myForm.$valid}}
\n * myForm.$error.required = {{!!myForm.$error.required}}
\n *
\n *
\n * \n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * \n *
\n *\n * ### Example - splitting on whitespace\n * \n * \n * \n *
{{ list | json }}
\n *
\n * \n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * \n *
\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n // We want to control whitespace trimming so we use this convoluted approach\n // to access the ngList attribute, which doesn't pre-trim the attribute\n var ngList = element.attr(attr.$attr.ngList) || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n * of the `input` element\n *\n * @example\n \n \n \n
\n

Which is your favorite?

\n \n
You chose {{my.favorite}}
\n
\n
\n \n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n \n
\n */\nvar ngValueDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n attr.$set('value', scope.$eval(attr.ngValue));\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n attr.$set('value', value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different than the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n * - `updateOn`: string specifying which event should be the input bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging of the control.\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * `ng-model-options=\"{ updateOn: 'default blur', debounce: {'default': 500, 'blur': 0} }\"`\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * ``, ``, ... . Right now, the only supported value is `'UTC'`,\n * otherwise the default timezone of the browser will be used.\n *\n * @example\n\n The following example shows how to override immediate updates. Changes on the inputs within the\n form will update the model only when the control loses focus (blur event). If `escape` key is\n pressed while the input field is focused, the value is reset to the value in the current model.\n\n \n \n
\n
\n Name:\n
\n\n Other data:\n
\n
\n
user.name = 
\n
\n
\n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say', data: '' };\n\n $scope.cancel = function (e) {\n if (e.keyCode == 27) {\n $scope.userForm.userName.$rollbackViewValue();\n }\n };\n }]);\n \n \n var model = element(by.binding('user.name'));\n var input = element(by.model('user.name'));\n var other = element(by.model('user.data'));\n\n it('should allow custom events', function() {\n input.sendKeys(' hello');\n input.click();\n expect(model.getText()).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say hello');\n });\n\n it('should $rollbackViewValue when model changes', function() {\n input.sendKeys(' hello');\n expect(input.getAttribute('value')).toEqual('say hello');\n input.sendKeys(protractor.Key.ESCAPE);\n expect(input.getAttribute('value')).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say');\n });\n \n
\n\n This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n \n \n
\n
\n Name:\n \n
\n
\n
user.name = 
\n
\n
\n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say' };\n }]);\n \n
\n\n This one shows how to bind to getter/setters:\n\n \n \n
\n
\n Name:\n \n
\n
user.name = 
\n
\n
\n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n return angular.isDefined(newName) ? (_name = newName) : _name;\n }\n };\n }]);\n \n
\n */\nvar ngModelOptionsDirective = function() {\n return {\n restrict: 'A',\n controller: ['$scope', '$attrs', function($scope, $attrs) {\n var that = this;\n this.$options = $scope.$eval($attrs.ngModelOptions);\n // Allow adding/overriding bound events\n if (this.$options.updateOn !== undefined) {\n this.$options.updateOnDefault = false;\n // extract \"default\" pseudo-event from list of events that can trigger a model update\n this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n that.$options.updateOnDefault = true;\n return ' ';\n }));\n } else {\n this.$options.updateOnDefault = true;\n }\n }]\n };\n};\n\n// helper methods\nfunction addSetValidityMethod(context) {\n var ctrl = context.ctrl,\n $element = context.$element,\n classCache = {},\n set = context.set,\n unset = context.unset,\n parentForm = context.parentForm,\n $animate = context.$animate;\n\n ctrl.$setValidity = setValidity;\n toggleValidationCss('', true);\n\n function setValidity(validationErrorKey, state, options) {\n if (state === undefined) {\n createAndSet('$pending', validationErrorKey, options);\n } else {\n unsetAndCleanup('$pending', validationErrorKey, options);\n }\n if (!isBoolean(state)) {\n unset(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n } else {\n if (state) {\n unset(ctrl.$error, validationErrorKey, options);\n set(ctrl.$$success, validationErrorKey, options);\n } else {\n set(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n }\n }\n if (ctrl.$pending) {\n cachedToggleClass(PENDING_CLASS, true);\n ctrl.$valid = ctrl.$invalid = undefined;\n toggleValidationCss('', null);\n } else {\n cachedToggleClass(PENDING_CLASS, false);\n ctrl.$valid = isObjectEmpty(ctrl.$error);\n ctrl.$invalid = !ctrl.$valid;\n toggleValidationCss('', ctrl.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in ctrl.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (ctrl.$error[validationErrorKey]) {\n combinedState = false;\n } else if (ctrl.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n toggleValidationCss(validationErrorKey, combinedState);\n parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n }\n\n function createAndSet(name, value, options) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, options);\n }\n\n function unsetAndCleanup(name, value, options) {\n if (ctrl[name]) {\n unset(ctrl[name], value, options);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(className, switchValue) {\n if (switchValue && !classCache[className]) {\n $animate.addClass($element, className);\n classCache[className] = true;\n } else if (!switchValue && classCache[className]) {\n $animate.removeClass($element, className);\n classCache[className] = false;\n }\n }\n\n function toggleValidationCss(validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n \n \n \n
\n Enter name:
\n Hello !\n
\n
\n \n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n \n
\n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n // We are purposefully using == here rather than === because we want to\n // catch when value is \"null or undefined\"\n // jshint -W041\n element.text(value == undefined ? '' : value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * {{ expression }} to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n \n \n \n
\n Salutation:
\n Name:
\n
\n       
\n
\n \n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n \n
\n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n attr.$observe('ngBindTemplate', function(value) {\n element.text(value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n \n \n
\n

\n
\n
\n\n \n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an HTMLstring with ' +\n 'links! and other stuff';\n }]);\n \n\n \n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n \n
\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {\n return (value || '').toString();\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // we re-evaluate the expr because we want a TrustedValueHolderType\n // for $sce, not a string\n element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');\n });\n };\n }\n };\n}];\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n return ['$animate', function($animate) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var oldVal;\n\n scope.$watch(attr[name], ngClassWatchAction, true);\n\n attr.$observe('class', function(value) {\n ngClassWatchAction(scope.$eval(attr[name]));\n });\n\n\n if (name !== 'ngClass') {\n scope.$watch('$index', function($index, old$index) {\n // jshint bitwise: false\n var mod = $index & 1;\n if (mod !== (old$index & 1)) {\n var classes = arrayClasses(scope.$eval(attr[name]));\n mod === selector ?\n addClasses(classes) :\n removeClasses(classes);\n }\n });\n }\n\n function addClasses(classes) {\n var newClasses = digestClassCounts(classes, 1);\n attr.$addClass(newClasses);\n }\n\n function removeClasses(classes) {\n var newClasses = digestClassCounts(classes, -1);\n attr.$removeClass(newClasses);\n }\n\n function digestClassCounts (classes, count) {\n var classCounts = element.data('$classCounts') || {};\n var classesToUpdate = [];\n forEach(classes, function (className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n element.data('$classCounts', classCounts);\n return classesToUpdate.join(' ');\n }\n\n function updateClasses (oldClasses, newClasses) {\n var toAdd = arrayDifference(newClasses, oldClasses);\n var toRemove = arrayDifference(oldClasses, newClasses);\n toAdd = digestClassCounts(toAdd, 1);\n toRemove = digestClassCounts(toRemove, -1);\n if (toAdd && toAdd.length) {\n $animate.addClass(element, toAdd);\n }\n if (toRemove && toRemove.length) {\n $animate.removeClass(element, toRemove);\n }\n }\n\n function ngClassWatchAction(newVal) {\n if (selector === true || scope.$index % 2 === selector) {\n var newClasses = arrayClasses(newVal || []);\n if (!oldVal) {\n addClasses(newClasses);\n } else if (!equals(newVal,oldVal)) {\n var oldClasses = arrayClasses(oldVal);\n updateClasses(oldClasses, newClasses);\n }\n }\n oldVal = shallowCopy(newVal);\n }\n }\n };\n\n function arrayDifference(tokens1, tokens2) {\n var values = [];\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values.push(token);\n }\n return values;\n }\n\n function arrayClasses (classVal) {\n if (isArray(classVal)) {\n return classVal;\n } else if (isString(classVal)) {\n return classVal.split(' ');\n } else if (isObject(classVal)) {\n var classes = [], i = 0;\n forEach(classVal, function(v, k) {\n if (v) {\n classes = classes.concat(k.split(' '));\n }\n });\n return classes;\n }\n return classVal;\n }\n }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an array, each element of the array should be a string that is\n * one or more space-delimited class names.\n *\n * 3. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n \n \n

Map Syntax Example

\n deleted (apply \"strike\" class)
\n important (apply \"bold\" class)
\n error (apply \"red\" class)\n
\n

Using String Syntax

\n \n
\n

Using Array Syntax

\n
\n
\n
\n
\n \n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n \n \n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/red/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.last().getAttribute('class')).toBe('bold strike red');\n });\n \n
\n\n ## Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n \n \n \n \n
\n Sample Text\n
\n \n .base-class {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n \n \n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n \n
\n\n\n ## ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and\n {@link ngAnimate.$animate#removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n
    \n
  1. \n \n {{name}}\n \n
  2. \n
\n
\n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n
\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n
    \n
  1. \n \n {{name}}      \n \n
  2. \n
\n
\n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n
\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n \n \n
{{ 'hello' }}
\n
{{ 'hello IE7' }}
\n
\n \n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n \n
\n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * \n * \n *
\n * Name: \n * [ greet ]
\n * Contact:\n *
    \n *
  • \n * \n * \n * [ clear\n * | X ]\n *
  • \n *
  • [ add ]
  • \n *
\n *
\n *
\n * \n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = \"John Smith\";\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'} ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * \n * \n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n *
\n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * \n * \n *
\n * Name: \n * [ greet ]
\n * Contact:\n *
    \n *
  • \n * \n * \n * [ clear\n * | X ]\n *
  • \n *
  • [ add ]
  • \n *
\n *
\n *
\n * \n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = \"John Smith\";\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'} ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * \n * \n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n *
\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For Angular to be CSP compatible there are only two things that we need to do differently:\n *\n * - don't use `Function` constructor to generate optimized value getters\n * - don't inject custom stylesheet into the document\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This\n * autodetection however triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on the root element of the application or on the `angular.js` script tag, whichever\n * appears first in the html document.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n \n \n ...\n ...\n \n ```\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n \n count: {{count}}\n \n \n \n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n \n \n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n var fn = $parse(attr[directiveName]);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event:event});\n };\n if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n scope.$evalAsync(callback);\n } else {\n scope.$apply(callback);\n }\n });\n };\n }\n };\n }];\n }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key down count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n

Typing in the input box below updates the key count

\n key up count: {{count}}\n\n

Typing in the input box below updates the keycode

\n \n

event keyCode: {{ event.keyCode }}

\n

event altKey: {{ event.altKey }}

\n
\n
\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key press count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n *
\n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n *
\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n
\n Enter text and hit enter:\n \n \n
list={{list}}
\n
\n
\n \n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n \n
\n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n copied: {{copied}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n cut: {{cut}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n pasted: {{paste}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n \n \n Click me:
\n Show when checked:\n \n I'm removed when the checkbox is unchecked.\n \n
\n \n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n \n
\n */\nvar ngIfDirective = ['$animate', function($animate) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function ($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function (clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if(previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if(childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if(block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).then(function() {\n previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n \n \n
\n \n url of the template: {{template.url}}\n
\n
\n
\n
\n
\n
\n \n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [ { name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'} ];\n $scope.template = $scope.templates[0];\n }]);\n \n \n Content of template1.html\n \n \n Content of template2.html\n \n \n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n \n \n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n \n
\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',\n function($templateRequest, $anchorScroll, $animate, $sce) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if(previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if(currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if(currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n var afterAnimation = function() {\n if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).then(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (/SVG/.test($element[0].toString())) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, undefined, undefined, $element);\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n *
\n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n *
\n *
\n * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n *
\n *   
\n *
\n *
\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n \n \n \n
\n
\n
\n list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};\n
\n
\n
\n
\n \n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n \n
\n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n \n \n
Normal: {{1 + 2}}
\n
Ignored: {{1 + 2}}
\n
\n \n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n \n
\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * \n * \n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * `{{personCount}}`. The closed braces `{}` is a placeholder\n * for {{numberExpression}}.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * \n * \n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n \n \n \n
\n Person 1:
\n Person 2:
\n Number of People:
\n\n \n Without Offset:\n \n
\n\n \n With Offset(2):\n \n \n
\n
\n \n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n \n
\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n var BRACE = /{}/g;\n return {\n restrict: 'EA',\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n isWhen = /^when(Minus)?(.+)$/;\n\n forEach(attr, function(expression, attributeName) {\n if (isWhen.test(attributeName)) {\n whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] =\n $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n offset + endSymbol));\n });\n\n scope.$watch(function ngPluralizeWatch() {\n var value = parseFloat(scope.$eval(numberExp));\n\n if (!isNaN(value)) {\n //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n //check it against pluralization rules in $locale service\n if (!(value in whens)) value = $locale.pluralCat(value - offset);\n return whensExpFns[value](scope);\n } else {\n return '';\n }\n }, function ngPluralizeWatchAction(newVal) {\n element.text(newVal);\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n *
\n * Header {{ item }}\n *
\n *
\n * Body {{ item }}\n *
\n *
\n * Footer {{ item }}\n *
\n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n *
\n * Header A\n *
\n *
\n * Body A\n *
\n *
\n * Footer A\n *
\n *
\n * Header B\n *
\n *
\n * Body B\n *
\n *
\n * Footer B\n *
\n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` – where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n * is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n * more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.) Filters should be applied to the expression,\n * before specifying a tracking expression.\n *\n * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n * will be associated by item identity in the array.\n *\n * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n * element in the same way in the DOM.\n *\n * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n * property is same.\n *\n * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n * to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n \n \n
\n I have {{friends.length}} friends. They are:\n \n
    \n
  • \n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n
  • \n
  • \n No results found...\n
  • \n
\n
\n
\n \n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:40px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:40px;\n }\n \n \n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n \n
\n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // jshint bitwise: false\n scope.$odd = !(scope.$even = (index&1) === 0);\n // jshint bitwise: true\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n aliasAs);\n }\n\n var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n var hashFnLocals = {$id: hashKey};\n\n if (trackByExp) {\n trackByExpGetter = $parse(trackByExp);\n } else {\n trackByIdArrayFn = function (key, value) {\n return hashKey(value);\n };\n trackByIdObjFn = function (key) {\n return key;\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n if (trackByExpGetter) {\n trackByIdExpFn = function(key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - element: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, sort them and use to determine order of iteration over obj props\n collectionKeys = [];\n for (var itemKey in collection) {\n if (collection.hasOwnProperty(itemKey) && itemKey.charAt(0) != '$') {\n collectionKeys.push(itemKey);\n }\n }\n collectionKeys.sort();\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn(key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function (block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n expression, trackById, toJson(value));\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) != nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?\n $animate.enter(clone, null, jqLite(previousNode));\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n *
\n *\n * \n *
\n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * /* this is required as of 1.3x to properly\n * apply all styling in a show/hide animation */\n * transition:0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n * /* the transition is defined in the active class */\n * transition:1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n * then the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me:
\n
\n Show:\n
\n I show up when your checkbox is checked.\n
\n
\n
\n Hide:\n
\n I hide when your checkbox is checked.\n
\n
\n
\n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-show {\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-show.ng-hide-add.ng-hide-add-active,\n .animate-show.ng-hide-remove.ng-hide-remove-active {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-show.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n
\n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n $animate[value ? 'removeClass' : 'addClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n *
\n *\n * \n *
\n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n * the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me:
\n
\n Show:\n
\n I show up when your checkbox is checked.\n
\n
\n
\n Hide:\n
\n I hide when your checkbox is checked.\n
\n
\n
\n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-hide {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-hide.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n
\n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n $animate[value ? 'addClass' : 'removeClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n \n \n \n \n \n
\n Sample Text\n
myStyle={{myStyle}}
\n
\n \n span {\n color: black;\n }\n \n \n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n });\n \n
\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, '');});\n }\n if (newStyles) element.css(newStyles);\n }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n *
\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n *
\n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against ng-switch-when.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n \n \n
\n \n selection={{selection}}\n
\n
\n
Settings Div
\n
Home Span
\n
default
\n
\n
\n
\n \n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n \n \n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n \n \n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n \n
\n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n return {\n restrict: 'EA',\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function ngSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function() { array.splice(index, 1); };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n $animate.cancel(previousLeaveAnimations[i]);\n }\n previousLeaveAnimations.length = 0;\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n promise.then(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n \n \n \n
\n
\n
\n {{text}}\n
\n
\n \n it('should have transcluded', function() {\n var titleElement = element(by.model('title'));\n titleElement.clear();\n titleElement.sendKeys('TITLE');\n var textElement = element(by.model('text'));\n textElement.clear();\n textElement.sendKeys('TEXT');\n expect(element(by.binding('title')).getText()).toEqual('TITLE');\n expect(element(by.binding('text')).getText()).toEqual('TEXT');\n });\n \n
\n *\n */\nvar ngTranscludeDirective = ngDirective({\n restrict: 'EAC',\n link: function($scope, $element, $attrs, controller, $transclude) {\n if (!$transclude) {\n throw minErr('ngTransclude')('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n $transclude(function(clone) {\n $element.empty();\n $element.append(clone);\n });\n }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `\n\n Load inlined template\n
\n
\n \n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n \n \n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type == 'text/ng-template') {\n var templateUrl = attr.id,\n // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of ``\n * DOM element.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`).\n *\n * @example\n \n \n \n
\n
    \n
  • \n Name: \n [X]\n
  • \n
  • \n [add]\n
  • \n
\n
\n Color (null not allowed):\n
\n\n Color (null allowed):\n \n \n
\n\n Color grouped by shade:\n
\n\n\n Select bogus.
\n
\n Currently selected: {{ {selected_color:myColor} }}\n
\n
\n
\n
\n \n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n \n
\n */\n\nvar ngOptionsDirective = valueFn({\n restrict: 'A',\n terminal: true\n});\n\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile, $parse) {\n //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n var NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/,\n nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n var self = this,\n optionsMap = {},\n ngModelCtrl = nullModelCtrl,\n nullOption,\n unknownOption;\n\n\n self.databound = $attrs.ngModel;\n\n\n self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n ngModelCtrl = ngModelCtrl_;\n nullOption = nullOption_;\n unknownOption = unknownOption_;\n };\n\n\n self.addOption = function(value, element) {\n assertNotHasOwnProperty(value, '\"option value\"');\n optionsMap[value] = true;\n\n if (ngModelCtrl.$viewValue == value) {\n $element.val(value);\n if (unknownOption.parent()) unknownOption.remove();\n }\n // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n // Adding an