diff --git a/public/css/orchid.rtl.css b/public/css/orchid.rtl.css
index 9fea58d28..d5e235358 100644
--- a/public/css/orchid.rtl.css
+++ b/public/css/orchid.rtl.css
@@ -27,5 +27,3 @@
* Copyright (c) 2013, salesforce.com
*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{height:1px;right:-100000px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{word-wrap:break-word;box-sizing:border-box;line-height:1.42;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:right;white-space:pre-wrap}.ql-editor>*{cursor:text}.attach .ql-editor .attach-image:after,.dropzone .ql-editor img:after,.dropzone-wrapper .ql-editor img:after,.ql-editor .attach .attach-image:after,.ql-editor .dropzone img:after,.ql-editor .dropzone-wrapper img:after,.ql-editor .h1,.ql-editor .h2,.ql-editor .h3,.ql-editor .h4,.ql-editor .h5,.ql-editor .h6,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6,.ql-editor ol,.ql-editor p,.ql-editor pre,.ql-editor ul{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;margin:0;padding:0}.ql-editor ol,.ql-editor ul{padding-right:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\2022"}.ql-editor ul[data-checked=false],.ql-editor ul[data-checked=true]{pointer-events:none}.ql-editor ul[data-checked=false]>li *,.ql-editor ul[data-checked=true]>li *{pointer-events:all}.ql-editor ul[data-checked=false]>li:before,.ql-editor ul[data-checked=true]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\2610"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-right:-1.5em;margin-left:.3em;text-align:left}.ql-editor li.ql-direction-rtl:before{margin-right:.3em;margin-left:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-right:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-left:1.5em}.ql-editor ol li{counter-increment:list-0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-right:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-right:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-left:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-left:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-right:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-right:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-left:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-left:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-right:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-right:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-left:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-left:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-right:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-right:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-left:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-left:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-right:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-right:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-left:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-left:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-right:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-right:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-left:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-left:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-right:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-right:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-left:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-left:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-right:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-right:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-left:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-left:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-right:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-right:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-left:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-left:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 auto 0 0}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:ltr;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:left}.ql-editor.ql-blank:before{color:rgba(0,0,0,.6);content:attr(data-placeholder);font-style:italic;right:15px;pointer-events:none;position:absolute;left:15px}.ql-snow .ql-toolbar:after,.ql-snow.ql-toolbar:after{clear:both;content:"";display:table}.ql-snow .ql-toolbar button,.ql-snow.ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:right;height:24px;padding:3px 5px;width:28px}.ql-snow .ql-toolbar button svg,.ql-snow.ql-toolbar button svg{float:right;height:100%}.ql-snow .ql-toolbar button:active:hover,.ql-snow.ql-toolbar button:active:hover{outline:none}.ql-snow .ql-toolbar input.ql-image[type=file],.ql-snow.ql-toolbar input.ql-image[type=file]{display:none}.ql-snow .ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar button.ql-active,.ql-snow .ql-toolbar button:focus,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar button.ql-active,.ql-snow.ql-toolbar button:focus,.ql-snow.ql-toolbar button:hover{color:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill{fill:#06c}.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter{stroke:#06c}@media (pointer:coarse){.ql-snow .ql-toolbar button:hover:not(.ql-active),.ql-snow.ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-stroke.ql-thin,.ql-snow .ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor .h1,.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor .h2,.ql-snow .ql-editor h2{font-size:1.5em}.attach .ql-snow .ql-editor .attach-image:after,.dropzone .ql-snow .ql-editor img:after,.dropzone-wrapper .ql-snow .ql-editor img:after,.ql-snow .ql-editor .attach .attach-image:after,.ql-snow .ql-editor .dropzone img:after,.ql-snow .ql-editor .dropzone-wrapper img:after,.ql-snow .ql-editor .h3,.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor .h4,.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor .h5,.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor .h6,.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-right:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-right:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{margin-bottom:5px;margin-top:5px;padding:5px 10px;white-space:pre-wrap}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:right;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-right:8px;padding-left:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{left:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;padding:2px 4px;width:24px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:right;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{margin-top:-9px;position:absolute;left:0;top:50%;width:18px}.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-item:before,.ql-snow .ql-picker.ql-header .ql-picker-label:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-item:before,.ql-snow .ql-picker.ql-font .ql-picker-label:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-item:before,.ql-snow .ql-picker.ql-size .ql-picker-label:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-left:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:0 2px 8px rgba(0,0,0,.2)}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-left:8px}.ql-snow .ql-tooltip input[type=text]{border:1px solid #ccc;display:none;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-left:1px solid #ccc;content:"Edit";margin-right:16px;padding-left:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-right:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-left:0;content:"Save";padding-left:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}.chart-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;position:relative}.chart-container .axis,.chart-container .chart-label{fill:#555b51}.chart-container .axis line,.chart-container .chart-label line{stroke:#dadada}.chart-container .dataset-units circle{stroke:#fff;stroke-width:2}.chart-container .dataset-units path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container .dataset-path{stroke-width:2px}.chart-container .path-group path{fill:none;stroke-opacity:1;stroke-width:2px}.chart-container line.dashed{stroke-dasharray:5,3}.chart-container .axis-line .specific-value{text-anchor:start}.chart-container .axis-line .y-line{text-anchor:end}.chart-container .axis-line .x-line{text-anchor:middle}.chart-container .legend-dataset-text{fill:#6c7680;font-weight:600}.graph-svg-tip{background:rgba(0,0,0,.8);border-radius:3px;color:#959da5;font-size:12px;padding:10px;position:absolute;text-align:center;z-index:99999}.graph-svg-tip ol,.graph-svg-tip ul{display:flex;padding-right:0}.graph-svg-tip ul.data-point-list li{flex:1;font-weight:600;min-width:90px}.graph-svg-tip strong{color:#dfe2e5;font-weight:600}.graph-svg-tip .svg-pointer{border:5px solid transparent;border-top-color:rgba(0,0,0,.8);content:" ";height:5px;margin:0 -5px 0 0;position:absolute}.graph-svg-tip.comparison{padding:0;pointer-events:none;text-align:right}.graph-svg-tip.comparison .title{display:block;font-weight:600;line-height:1;margin:0;padding:10px;pointer-events:none}.graph-svg-tip.comparison ul{list-style:none;margin:0;white-space:nowrap}.graph-svg-tip.comparison li{display:inline-block;padding:5px 10px}:root{--ts-pr-clear-button:0;--ts-pr-caret:0;--ts-pr-min:.75rem}.ts-wrapper.single .ts-control,.ts-wrapper.single .ts-control input{cursor:pointer}.ts-control{padding-left:Max(var(--ts-pr-min),calc(var(--ts-pr-clear-button) + var(--ts-pr-caret)))!important}.ts-wrapper.plugin-drag_drop.multi>.ts-control>div.ui-sortable-placeholder{background:#f2f2f2!important;background:rgba(0,0,0,.06)!important;border:0!important;box-shadow:inset 0 0 12px 4px #fff;visibility:visible!important}.ts-wrapper.plugin-drag_drop .ui-sortable-placeholder:after{content:"!";visibility:hidden}.ts-wrapper.plugin-drag_drop .ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.plugin-checkbox_options .option input{margin-left:.5rem}.plugin-clear_button{--ts-pr-clear-button:1em}.plugin-clear_button .clear-button{background:transparent!important;cursor:pointer;margin-left:0!important;opacity:0;position:absolute;left:calc(.75rem - 5px);top:50%;transform:translateY(-50%);transition:opacity .5s}.plugin-clear_button.form-select .clear-button,.plugin-clear_button.single .clear-button{left:Max(var(--ts-pr-caret),.75rem)}.plugin-clear_button.focus.has-items .clear-button,.plugin-clear_button:not(.disabled):hover.has-items .clear-button{opacity:1}.ts-wrapper .dropdown-header{background:#f8f8f8;border-bottom:1px solid #d0d0d0;border-radius:.2rem .2rem 0 0;padding:6px .75rem;position:relative}.ts-wrapper .dropdown-header-close{color:#343a40;font-size:20px!important;line-height:20px;margin-top:-12px;opacity:.4;position:absolute;left:.75rem;top:50%}.ts-wrapper .dropdown-header-close:hover{color:#000}.plugin-dropdown_input.focus.dropdown-active .ts-control{border:1px solid #ced4da;box-shadow:none;box-shadow:inset 0 1px 2px rgba(21,20,26,.075)}.plugin-dropdown_input .dropdown-input{background:transparent;border:solid #d0d0d0;border-width:0 0 1px;box-shadow:none;display:block;padding:.5rem .75rem;width:100%}.plugin-dropdown_input.focus .ts-dropdown .dropdown-input{border-color:#80bdff;box-shadow:0 0 0 .25rem rgba(0,123,255,.25);outline:0}.plugin-dropdown_input .items-placeholder{border:0!important;box-shadow:none!important;width:100%}.plugin-dropdown_input.dropdown-active .items-placeholder,.plugin-dropdown_input.has-items .items-placeholder{display:none!important}.ts-wrapper.plugin-input_autogrow.has-items .ts-control>input{min-width:0}.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control>input{flex:none;min-width:4px}.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control>input::-moz-placeholder{color:transparent}.ts-wrapper.plugin-input_autogrow.has-items.focus .ts-control>input::placeholder{color:transparent}.ts-dropdown.plugin-optgroup_columns .ts-dropdown-content{display:flex}.ts-dropdown.plugin-optgroup_columns .optgroup{border-left:1px solid #f2f2f2;border-top:0;flex-basis:0;flex-grow:1;min-width:0}.ts-dropdown.plugin-optgroup_columns .optgroup:last-child{border-left:0}.ts-dropdown.plugin-optgroup_columns .optgroup:before{display:none}.ts-dropdown.plugin-optgroup_columns .optgroup-header{border-top:0}.ts-wrapper.plugin-remove_button .item{align-items:center;display:inline-flex;padding-left:0!important}.ts-wrapper.plugin-remove_button .item .remove{border-radius:2px 0 0 2px;box-sizing:border-box;color:inherit;display:inline-block;padding:0 5px;text-decoration:none;vertical-align:middle}.ts-wrapper.plugin-remove_button .item .remove:hover{background:rgba(0,0,0,.05)}.ts-wrapper.plugin-remove_button.disabled .item .remove:hover{background:none}.ts-wrapper.plugin-remove_button .remove-single{font-size:23px;position:absolute;left:0;top:0}.ts-wrapper.plugin-remove_button:not(.rtl) .item .remove{border-right:1px solid #e9ecef;margin-right:5px}.ts-wrapper.plugin-remove_button:not(.rtl) .item.active .remove{border-right-color:transparent}.ts-wrapper.plugin-remove_button:not(.rtl).disabled .item .remove{border-right-color:#fff}.ts-wrapper.plugin-remove_button.rtl .item .remove{border-left:1px solid #e9ecef;margin-left:5px}.ts-wrapper.plugin-remove_button.rtl .item.active .remove{border-left-color:transparent}.ts-wrapper.plugin-remove_button.rtl.disabled .item .remove{border-left-color:#fff}.ts-wrapper{position:relative}.ts-control,.ts-control input,.ts-dropdown{font-smoothing:inherit;color:#343a40;font-family:inherit;font-size:inherit;line-height:1.5}.ts-control,.ts-wrapper.single.input-active .ts-control{background:#edeef0;cursor:text}.ts-control{border:1px solid #ced4da;border-radius:.2rem;box-shadow:none;box-sizing:border-box;flex-wrap:wrap;overflow:hidden;padding:.5rem .75rem;position:relative;width:100%;z-index:1}.ts-wrapper.multi.has-items .ts-control{padding:calc(.5rem - 1px) .75rem calc(.5rem - 4px)}.full .ts-control{background-color:#edeef0}.disabled .ts-control,.disabled .ts-control *{cursor:default!important}.focus .ts-control{box-shadow:none}.ts-control>*{display:inline-block;vertical-align:baseline}.ts-wrapper.multi .ts-control>div{background:#efefef;border:0 solid #e9ecef;color:#343a40;cursor:pointer;margin:0 0 3px 3px;padding:1px 5px}.ts-wrapper.multi .ts-control>div.active{background:#007bff;border:0 solid transparent;color:#fff}.ts-wrapper.multi.disabled .ts-control>div,.ts-wrapper.multi.disabled .ts-control>div.active{background:#fff;border:0 solid #fff;color:#868787}.ts-control>input{background:none!important;border:0!important;box-shadow:none!important;display:inline-block!important;flex:1 1 auto;line-height:inherit!important;margin:0!important;max-height:none!important;max-width:100%!important;min-height:0!important;min-width:7rem;padding:0!important;text-indent:0!important;-webkit-user-select:auto!important;-moz-user-select:auto!important;user-select:auto!important}.ts-control>input::-ms-clear{display:none}.ts-control>input:focus{outline:none!important}.has-items .ts-control>input{margin:0 4px!important}.ts-control.rtl{text-align:left}.ts-control.rtl.single .ts-control:after{right:calc(.75rem + 5px);left:auto}.ts-control.rtl .ts-control>input{margin:0 -2px 0 4px!important}.disabled .ts-control{background-color:#e9ecef;opacity:.5}.input-hidden .ts-control>input{right:-10000px;opacity:0;position:absolute}.ts-dropdown{background:#fff;border:1px solid #d0d0d0;border-radius:0 0 .2rem .2rem;border-top:0;box-shadow:0 1px 3px rgba(0,0,0,.1);box-sizing:border-box;right:0;margin:.25rem 0 0;position:absolute;top:100%;width:100%;z-index:10}.ts-dropdown [data-selectable]{cursor:pointer;overflow:hidden}.ts-dropdown [data-selectable] .highlight{background:rgba(255,237,40,.4);border-radius:1px}.ts-dropdown .create,.ts-dropdown .no-results,.ts-dropdown .optgroup-header,.ts-dropdown .option{padding:3px .75rem}.ts-dropdown .option,.ts-dropdown [data-disabled],.ts-dropdown [data-disabled] [data-selectable].option{cursor:inherit;opacity:.5}.ts-dropdown [data-selectable].option{cursor:pointer;opacity:1}.ts-dropdown .optgroup:first-child .optgroup-header{border-top:0}.ts-dropdown .optgroup-header{background:#fff;color:#6c757d;cursor:default}.ts-dropdown .active{background-color:#e9ecef;color:#1e2125}.ts-dropdown .active.create{color:#1e2125}.ts-dropdown .create{color:rgba(52,58,64,.5)}.ts-dropdown .spinner{display:inline-block;height:30px;margin:3px .75rem;width:30px}.ts-dropdown .spinner:after{animation:lds-dual-ring 1.2s linear infinite;border-color:#d0d0d0 transparent;border-radius:50%;border-style:solid;border-width:5px;content:" ";display:block;height:24px;margin:3px;width:24px}@keyframes lds-dual-ring{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.ts-dropdown-content{overflow-scrolling:touch;max-height:200px;overflow-x:hidden;overflow-y:auto;scroll-behavior:smooth}.ts-hidden-accessible{clip:rect(0 0 0 0)!important;border:0!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.ts-wrapper.bootstrap-tagsinput,.ts-wrapper.chosen-choices,.ts-wrapper.chosen-single,.ts-wrapper.form-control,.ts-wrapper.form-select{box-shadow:none;display:flex;height:auto;padding:0!important}.ts-dropdown,.ts-dropdown.bootstrap-tagsinput,.ts-dropdown.chosen-choices,.ts-dropdown.chosen-single,.ts-dropdown.form-control,.ts-dropdown.form-select{background:#fff;border:1px solid var(--bs-border-color-translucent);border-radius:.5rem;box-shadow:0 6px 12px rgba(0,0,0,.175);height:auto;padding:0;z-index:1000}.ts-dropdown .optgroup-header{font-size:.875rem;line-height:1.5}.ts-dropdown .optgroup:first-child:before{display:none}.ts-dropdown .optgroup:before{border-top:1px solid var(--bs-border-color-translucent);content:" ";display:block;height:0;margin:.5rem -.75rem;overflow:hidden}.ts-dropdown .create{padding-right:.75rem}.ts-dropdown-content{padding:5px 0}.ts-control{align-items:center;display:flex;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.ts-control{transition:none}}.ts-control.dropdown -active{border-radius:.2rem}.focus .ts-control{border-color:#80bdff;box-shadow:0 0 0 .25rem rgba(0,123,255,.25);outline:0}.ts-control .item{align-items:center;display:flex}.ts-wrapper.is-invalid,.was-validated .invalid,.was-validated :invalid+.ts-wrapper{border-color:#dc3545}.ts-wrapper.is-invalid:not(.single),.was-validated .invalid:not(.single),.was-validated :invalid+.ts-wrapper:not(.single){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3E%3Ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3E%3C/svg%3E");background-position:left calc(.375em + .25rem) center;background-repeat:no-repeat;background-size:calc(.75em + .5rem) calc(.75em + .5rem)}.ts-wrapper.is-invalid.single,.was-validated .invalid.single,.was-validated :invalid+.ts-wrapper.single{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"),url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545'%3E%3Ccircle cx='6' cy='6' r='4.5'/%3E%3Cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3E%3Ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3E%3C/svg%3E");background-position:left .75rem center,center left 2.25rem;background-repeat:no-repeat;background-size:16px 12px,calc(.75em + .5rem) calc(.75em + .5rem)}.ts-wrapper.is-invalid.focus .ts-control,.was-validated .invalid.focus .ts-control,.was-validated :invalid+.ts-wrapper.focus .ts-control{border-color:#dc3545;box-shadow:0 0 0 .25rem rgba(220,53,69,.25)}.ts-wrapper.is-valid,.was-validated .valid,.was-validated :valid+.ts-wrapper{border-color:#28a745}.ts-wrapper.is-valid:not(.single),.was-validated .valid:not(.single),.was-validated :valid+.ts-wrapper:not(.single){background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-position:left calc(.375em + .25rem) center;background-repeat:no-repeat;background-size:calc(.75em + .5rem) calc(.75em + .5rem)}.ts-wrapper.is-valid.single,.was-validated .valid.single,.was-validated :valid+.ts-wrapper.single{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"),url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2328a745' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3E%3C/svg%3E");background-position:left .75rem center,center left 2.25rem;background-repeat:no-repeat;background-size:16px 12px,calc(.75em + .5rem) calc(.75em + .5rem)}.ts-wrapper.is-valid.focus .ts-control,.was-validated .valid.focus .ts-control,.was-validated :valid+.ts-wrapper.focus .ts-control{border-color:#28a745;box-shadow:0 0 0 .25rem rgba(40,167,69,.25)}.ts-wrapper{display:flex;min-height:2.45rem}.input-group-sm>.ts-wrapper,.ts-wrapper.form-control-sm,.ts-wrapper.form-select-sm{min-height:calc(1.5em + .5rem + 2px)}.input-group-sm>.ts-wrapper .ts-control,.ts-wrapper.form-control-sm .ts-control,.ts-wrapper.form-select-sm .ts-control{border-radius:.35rem;font-size:.875rem}.input-group-sm>.ts-wrapper.has-items .ts-control,.ts-wrapper.form-control-sm.has-items .ts-control,.ts-wrapper.form-select-sm.has-items .ts-control{font-size:.875rem;padding-bottom:0}.input-group-sm>.ts-wrapper.multi.has-items .ts-control,.ts-wrapper.form-control-sm.multi.has-items .ts-control,.ts-wrapper.form-select-sm.multi.has-items .ts-control{padding-top:calc(.75em - .40625rem - 1px)!important}.ts-wrapper.multi.has-items .ts-control{--ts-pr-min:calc(0.75rem - 5px);padding-right:calc(.75rem - 5px)}.ts-wrapper.multi .ts-control>div{border-radius:calc(.2rem - 1px)}.input-group-lg>.ts-wrapper,.ts-wrapper.form-control-lg,.ts-wrapper.form-select-lg{min-height:calc(1.5em + 1rem + 2px)}.input-group-lg>.ts-wrapper .ts-control,.ts-wrapper.form-control-lg .ts-control,.ts-wrapper.form-select-lg .ts-control{border-radius:.685rem;font-size:1.25rem}.ts-wrapper:not(.form-control):not(.chosen-choices):not(.chosen-single):not(.bootstrap-tagsinput):not(.form-select){background:none;border:none;box-shadow:none;height:auto;padding:0}.ts-wrapper:not(.form-control):not(.chosen-choices):not(.chosen-single):not(.bootstrap-tagsinput):not(.form-select).single .ts-control{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");background-position:left .75rem center;background-repeat:no-repeat;background-size:16px 12px}.ts-wrapper.form-select,.ts-wrapper.single{--ts-pr-caret:2.25rem}.ts-wrapper.bootstrap-tagsinput .ts-control,.ts-wrapper.chosen-choices .ts-control,.ts-wrapper.chosen-single .ts-control,.ts-wrapper.form-control .ts-control,.ts-wrapper.form-control.single.input-active .ts-control,.ts-wrapper.form-select .ts-control,.ts-wrapper.form-select.single.input-active .ts-control,.ts-wrapper.single.input-active.bootstrap-tagsinput .ts-control,.ts-wrapper.single.input-active.chosen-choices .ts-control,.ts-wrapper.single.input-active.chosen-single .ts-control{border:none!important}.ts-wrapper.bootstrap-tagsinput:not(.disabled) .ts-control,.ts-wrapper.bootstrap-tagsinput:not(.disabled).single.input-active .ts-control,.ts-wrapper.chosen-choices:not(.disabled) .ts-control,.ts-wrapper.chosen-choices:not(.disabled).single.input-active .ts-control,.ts-wrapper.chosen-single:not(.disabled) .ts-control,.ts-wrapper.chosen-single:not(.disabled).single.input-active .ts-control,.ts-wrapper.form-control:not(.disabled) .ts-control,.ts-wrapper.form-control:not(.disabled).single.input-active .ts-control,.ts-wrapper.form-select:not(.disabled) .ts-control,.ts-wrapper.form-select:not(.disabled).single.input-active .ts-control{background:transparent!important}.input-group>.ts-wrapper{flex-grow:1}.input-group>.ts-wrapper:not(:nth-child(2))>.ts-control{border-bottom-right-radius:0;border-top-right-radius:0}.input-group>.ts-wrapper:not(:last-child)>.ts-control{border-bottom-left-radius:0;border-top-left-radius:0}html{background-color:#edeef0}body{font-smoothing:antialiased;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:transparent;color:#394247;font-family:var(--bs-font-sans-serif);font-size:1rem;line-height:1.5}:focus{outline:0!important}.attach .attach-image:after,.dropzone img:after,.dropzone-wrapper img:after,.h1,.h2,.h3,.h4,.h5,.h6{margin:0}a{color:#171b1d;cursor:pointer}a,a:focus,a:hover{text-decoration:none}a:focus,a:hover{color:#000}label{color:#444054;font-weight:400;white-space:nowrap;word-break:normal}.small,label,small{font-size:.875rem}.badge,.label{font-weight:700;text-shadow:0 1px 0 rgba(0,0,0,.2)}.attach .badge.attach-image:before,.attach .label.attach-image:before,.badge.bg-light,.dropzone .dz-preview .badge.dz-details,.dropzone .dz-preview .dz-image img.badge,.dropzone .dz-preview .dz-image img.label,.dropzone .dz-preview .label.dz-details,.dropzone img.badge:before,.dropzone img.label:before,.dropzone-wrapper .dz-preview .badge.dz-details,.dropzone-wrapper .dz-preview .dz-image img.badge,.dropzone-wrapper .dz-preview .dz-image img.label,.dropzone-wrapper .dz-preview .label.dz-details,.dropzone-wrapper img.badge:before,.dropzone-wrapper img.label:before,.label.bg-light,.modal .badge.modal-footer,.modal .label.modal-footer{text-shadow:none}.badge.up{margin-right:-10px;padding:3px 6px;position:relative;top:-10px}blockquote{border-color:#e9ecef}.caret-white{border-top-color:#fff;border-top-color:hsla(0,0%,100%,.65)}a:hover .caret-white{border-top-color:#fff}.thumbnail{border-color:#e9ecef}.progress{background-color:#f8f9fa}.progress-xxs{height:2px}.progress-xs{height:6px}.progress-sm{height:12px}.progress-sm .progress-bar{font-size:10px;line-height:1rem}.progress,.progress-bar{box-shadow:none}.progress-bar-primary{background-color:#007bff}.progress-bar-info{background-color:#17a2b8}.progress-bar-success{background-color:#28a745}.progress-bar-warning{background-color:#ffc107}.progress-bar-danger{background-color:#dc3545}.progress-bar-black{background-color:#15141a}.progress-bar-white{background-color:#fff}.accordion-group,.accordion-inner{border-color:#e9ecef;border-radius:.2rem}.alert{border:0;border-radius:0;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.2);font-size:.875rem}.alert p,.alert ul{margin-bottom:0}.alert .close i{display:block;font-size:12px;font-weight:400}.bootstrap-tagsinput,.chosen-choices,.chosen-single,.form-control{border-color:#dae0e5;border-radius:.2rem}.bootstrap-tagsinput,.bootstrap-tagsinput:focus,.chosen-choices,.chosen-choices:focus,.chosen-single,.chosen-single:focus,.form-control,.form-control:focus{box-shadow:none}.bootstrap-tagsinput:focus,.chosen-choices:focus,.chosen-single:focus,.form-control:focus{border-color:#17a2b8}.form-horizontal .control-label.text-left{text-align:right}.form-control-spin{margin-top:-7px;position:absolute;left:10px;top:50%;z-index:2}.input-lg{height:45px}.input-group-addon{background-color:#f8f9fa;border-color:#dae0e5}.list-group{border-radius:.2rem}.list-group.no-radius .list-group-item{border-radius:0!important}.list-group.no-borders .list-group-item{border:none}.list-group.no-border .list-group-item{border-width:1px 0}.list-group.no-bg .list-group-item{background-color:transparent}.list-group-item{border-color:#f2f4f6;padding-left:15px}.list-group-item a.list-group-item.hover,.list-group-item a.list-group-item:focus,.list-group-item a.list-group-item:hover{background-color:#fff}.list-group-item.media{margin-top:0}.list-group-item.active{background-color:#17a2b8!important;border-color:#17a2b8!important;color:#fff}.list-group-item.active .pagination .page-item.active .page-link,.list-group-item.active .pagination .page-item.active span,.list-group-item.active .pagination>li.active .page-link,.list-group-item.active .pagination>li.active span,.list-group-item.active .text-muted,.pagination .page-item.active .list-group-item.active .page-link,.pagination .page-item.active .list-group-item.active span,.pagination>li.active .list-group-item.active .page-link,.pagination>li.active .list-group-item.active span{color:#7adeee!important}.list-group-item.active a{color:#fff}.list-group-item.focus{background-color:#eff1f4!important}.list-group-item.select{background-color:#dbeef9!important;border-color:#c5e4f5;position:relative;z-index:1}.list-group-alt .list-group-item:nth-child(2n+2){background-color:rgba(0,0,0,.02)!important}.list-group-lg .list-group-item{padding-bottom:15px;padding-top:15px}.list-group-sm .list-group-item{padding:6px 10px}.list-group-sp .list-group-item{border-radius:3px;margin-bottom:5px}.list-group-item>.badge{margin-left:0}.nav .nav-item{align-items:center;display:flex;flex-direction:row;text-overflow:ellipsis}.nav .nav-item .nav-link{width:100%}.nav .nav-item .nav-link:focus,.nav .nav-item .nav-link:hover{border-radius:unset}.nav .open .nav-link,.nav .open .nav-link:focus,.nav .open .nav-link:hover{background-color:#fff}.nav-tabs .nav-item.active .nav-link,.nav-tabs .nav-item.active .nav-link:hover,.nav-tabs .nav-item:hover .nav-link{border-bottom-color:#007bff}.nav-tabs-alt .nav-tabs.nav-justified .nav-item{display:table-cell;width:1%}.nav-tabs-alt .nav-tabs .nav-item .nav-link{background:transparent!important;border-color:transparent!important;border-radius:0;padding:.5rem 1.5rem}.nav-tabs-alt .nav-tabs .nav-item .nav-link.active{border-bottom-color:#007bff!important;cursor:default}.nav-tabs-alt .nav-tabs .nav-item.active .nav-link{border-bottom-color:#007bff!important}@media (max-width:767.98px){.nav-tabs-scroll-bar{display:inline-block!important;list-style:none;margin:0;overflow-x:auto;overflow-y:hidden;padding:0 0 1px;position:static;vertical-align:middle;white-space:nowrap;width:100%}.nav-tabs-scroll-bar .nav-item{display:inline-block}.nav-tabs-scroll-bar .nav-item>.active{border-width:2px}}.tab-container{margin-bottom:15px}.tab-container .tab-content{background-color:#fff;border:1px solid #e9ecef;border-radius:0 0 .2rem .2rem;border-top:0 solid #e9ecef;padding:15px}.pagination{margin:0}.pagination .page-item .page-link,.pagination .page-item>a,.pagination>li .page-link,.pagination>li>a{border:none}.pagination .page-item .page-link:focus,.pagination .page-item .page-link:hover,.pagination .page-item>a:focus,.pagination .page-item>a:hover,.pagination>li .page-link:focus,.pagination>li .page-link:hover,.pagination>li>a:focus,.pagination>li>a:hover{background-color:initial;border-color:initial;box-shadow:none;text-decoration:underline}.pagination .page-item.active .page-link,.pagination .page-item.active .page-link:focus,.pagination .page-item.active .page-link:hover,.pagination .page-item.active span,.pagination .page-item.active span:focus,.pagination .page-item.active span:hover,.pagination>li.active .page-link,.pagination>li.active .page-link:focus,.pagination>li.active .page-link:hover,.pagination>li.active span,.pagination>li.active span:focus,.pagination>li.active span:hover{background-color:inherit;border-color:inherit;cursor:default;z-index:3}.text-right .pagination{justify-content:flex-end!important}.CodeMirror-fullscreen .CodeMirror-scroll,.card,.panel{border-color:#e9ecef;border-radius:.2rem}.CodeMirror-fullscreen .CodeMirror-scroll .accordion-toggle,.card .accordion-toggle,.panel .accordion-toggle{cursor:pointer;display:block;font-size:14px}.CodeMirror-fullscreen .CodeMirror-scroll .list-group-item,.card .list-group-item,.panel .list-group-item{border-color:#f8f9fa}.CodeMirror-fullscreen .no-borders.CodeMirror-scroll,.CodeMirror-fullscreen .no-borders.CodeMirror-scroll .card-footer,.CodeMirror-fullscreen .no-borders.CodeMirror-scroll .card-heading,.card.no-borders,.card.no-borders .card-footer,.card.no-borders .card-heading,.panel.no-borders,.panel.no-borders .card-footer,.panel.no-borders .card-heading{border-width:0}.card-heading{border-radius:.2rem .2rem 0 0}.card-default .card-heading{background-color:#fff}.card-heading.no-border{border:none;margin:-1px -1px 0}.card-heading .nav{margin:-10px -15px}.card-heading .list-group{background:transparent}.card-footer{background-color:#fff;border-color:#f8f9fa;border-radius:0 0 .2rem .2rem}.card-default{border-color:#e9ecef}.card-default>.card-footer,.card-default>.card-heading{border-color:#f8f9fa}.card-group .card-heading+.card-collapse .card-body{border-top:1px solid #eaedef}.table>tbody>tr>td,.table>tfoot>tr>td{border-top:1px solid #eff1f4;padding:8px 15px}.table>thead>tr>th{border-bottom:1px solid #eff1f4;padding:1em}.well,pre{background-color:#f8f9fa;border-color:#e9ecef}.dropdown-menu{border:1px solid #e9ecef;box-shadow:0 2px 6px rgba(0,0,0,.1);display:none;min-width:12rem}.dropdown-menu.pull-left{right:100%}.CodeMirror-fullscreen .dropdown-menu .CodeMirror-scroll,.dropdown-menu .CodeMirror-fullscreen .CodeMirror-scroll,.dropdown-menu .card,.dropdown-menu>.panel{border:none;margin:-5px 0}.dropdown-menu>li>a{padding:5px 15px}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#f8f9fa!important;background-image:none;color:#000;filter:none}.dropdown-menu-arrow:before{border-bottom:5px solid rgba(0,0,0,.2);top:-6px}.dropdown-menu-arrow:after,.dropdown-menu-arrow:before{border-right:5px solid transparent;border-left:5px solid transparent;content:"";display:inline-block;right:12px;position:absolute}.dropdown-menu-arrow:after{border-bottom:5px solid #fff;top:-5px}.dropdown-menu-arrow.dropdown-menu-end:after,.dropdown-menu-arrow.dropdown-menu-end:before{right:auto;left:12px}.dropdown-header{padding:5px 15px}.dropdown-submenu{position:relative}.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{background-color:#f8f9fa!important;color:#394247}.dropdown-submenu:focus>.dropdown-menu,.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu.pull-left{float:none!important}.dropdown-submenu.pull-left>.dropdown-menu{right:-100%;margin-right:10px}.dropdown-submenu .dropdown-menu{right:100%;margin-right:-1px;margin-top:-6px;top:0}.dropup .dropdown-submenu>.dropdown-menu{bottom:0;top:auto}.dropdown-scrollable{height:auto;max-height:400px;overflow-x:hidden}.btn-group>.btn,.dropzone .dz-preview .btn-group>.btn-edit,.dropzone .dz-preview .btn-group>.btn-remove,.dropzone-wrapper .dz-preview .btn-group>.btn-edit,.dropzone-wrapper .dz-preview .btn-group>.btn-remove{margin-right:-1px}.col-lg-2-4{min-height:1px;padding-right:15px;padding-left:15px;position:relative}.col-0{clear:right}.row.no-gutter{margin-right:0;margin-left:0}.no-gutter [class*=col]{padding:0}.row-sm{margin-right:-10px;margin-left:-10px}.row-sm>div{padding-right:10px;padding-left:10px}.modal-backdrop{background-color:#1c1b22}.modal-backdrop.in{filter:alpha(opacity=80);opacity:.8}.modal-over{bottom:0;right:0;position:fixed;left:0;top:0}.modal-center{right:50%;position:absolute;top:50%}.command-bar .btn,.command-bar .dropzone .dz-preview .btn-edit,.command-bar .dropzone .dz-preview .btn-remove,.command-bar .dropzone-wrapper .dz-preview .btn-edit,.command-bar .dropzone-wrapper .dz-preview .btn-remove,.dropdown-item,.dropdown-menu .btn,.dropdown-menu .dropzone .dz-preview .btn-edit,.dropdown-menu .dropzone .dz-preview .btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .btn-remove,.dropzone .dz-preview .command-bar .btn-edit,.dropzone .dz-preview .command-bar .btn-remove,.dropzone .dz-preview .dropdown-menu .btn-edit,.dropzone .dz-preview .dropdown-menu .btn-remove,.dropzone .dz-preview .table td .btn-edit,.dropzone .dz-preview .table td .btn-remove,.dropzone-wrapper .dz-preview .command-bar .btn-edit,.dropzone-wrapper .dz-preview .command-bar .btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .btn-remove,.dropzone-wrapper .dz-preview .table td .btn-edit,.dropzone-wrapper .dz-preview .table td .btn-remove,.table td .btn,.table td .dropzone .dz-preview .btn-edit,.table td .dropzone .dz-preview .btn-remove,.table td .dropzone-wrapper .dz-preview .btn-edit,.table td .dropzone-wrapper .dz-preview .btn-remove{align-items:center;display:flex;flex-direction:row;text-overflow:ellipsis}.command-bar .active.btn,.command-bar .btn:active,.command-bar .dropzone .dz-preview .active.btn-edit,.command-bar .dropzone .dz-preview .active.btn-remove,.command-bar .dropzone .dz-preview .btn-edit:active,.command-bar .dropzone .dz-preview .btn-remove:active,.command-bar .dropzone-wrapper .dz-preview .active.btn-edit,.command-bar .dropzone-wrapper .dz-preview .active.btn-remove,.command-bar .dropzone-wrapper .dz-preview .btn-edit:active,.command-bar .dropzone-wrapper .dz-preview .btn-remove:active,.dropdown-item.active,.dropdown-item:active,.dropdown-menu .active.btn,.dropdown-menu .btn:active,.dropdown-menu .dropzone .dz-preview .active.btn-edit,.dropdown-menu .dropzone .dz-preview .active.btn-remove,.dropdown-menu .dropzone .dz-preview .btn-edit:active,.dropdown-menu .dropzone .dz-preview .btn-remove:active,.dropdown-menu .dropzone-wrapper .dz-preview .active.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .active.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .btn-edit:active,.dropdown-menu .dropzone-wrapper .dz-preview .btn-remove:active,.dropzone .dz-preview .command-bar .active.btn-edit,.dropzone .dz-preview .command-bar .active.btn-remove,.dropzone .dz-preview .command-bar .btn-edit:active,.dropzone .dz-preview .command-bar .btn-remove:active,.dropzone .dz-preview .dropdown-menu .active.btn-edit,.dropzone .dz-preview .dropdown-menu .active.btn-remove,.dropzone .dz-preview .dropdown-menu .btn-edit:active,.dropzone .dz-preview .dropdown-menu .btn-remove:active,.dropzone .dz-preview .table td .active.btn-edit,.dropzone .dz-preview .table td .active.btn-remove,.dropzone .dz-preview .table td .btn-edit:active,.dropzone .dz-preview .table td .btn-remove:active,.dropzone-wrapper .dz-preview .command-bar .active.btn-edit,.dropzone-wrapper .dz-preview .command-bar .active.btn-remove,.dropzone-wrapper .dz-preview .command-bar .btn-edit:active,.dropzone-wrapper .dz-preview .command-bar .btn-remove:active,.dropzone-wrapper .dz-preview .dropdown-menu .active.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .active.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .btn-edit:active,.dropzone-wrapper .dz-preview .dropdown-menu .btn-remove:active,.dropzone-wrapper .dz-preview .table td .active.btn-edit,.dropzone-wrapper .dz-preview .table td .active.btn-remove,.dropzone-wrapper .dz-preview .table td .btn-edit:active,.dropzone-wrapper .dz-preview .table td .btn-remove:active,.table td .active.btn,.table td .btn:active,.table td .dropzone .dz-preview .active.btn-edit,.table td .dropzone .dz-preview .active.btn-remove,.table td .dropzone .dz-preview .btn-edit:active,.table td .dropzone .dz-preview .btn-remove:active,.table td .dropzone-wrapper .dz-preview .active.btn-edit,.table td .dropzone-wrapper .dz-preview .active.btn-remove,.table td .dropzone-wrapper .dz-preview .btn-edit:active,.table td .dropzone-wrapper .dz-preview .btn-remove:active{background-color:#e9ecef;color:#1e2125}.command-bar .btn:disabled,.command-bar .disabled.btn,.command-bar .dropzone .dz-preview .btn-edit:disabled,.command-bar .dropzone .dz-preview .btn-remove:disabled,.command-bar .dropzone .dz-preview .disabled.btn-edit,.command-bar .dropzone .dz-preview .disabled.btn-remove,.command-bar .dropzone-wrapper .dz-preview .btn-edit:disabled,.command-bar .dropzone-wrapper .dz-preview .btn-remove:disabled,.command-bar .dropzone-wrapper .dz-preview .disabled.btn-edit,.command-bar .dropzone-wrapper .dz-preview .disabled.btn-remove,.dropdown-item.disabled,.dropdown-item:disabled,.dropdown-menu .btn:disabled,.dropdown-menu .disabled.btn,.dropdown-menu .dropzone .dz-preview .btn-edit:disabled,.dropdown-menu .dropzone .dz-preview .btn-remove:disabled,.dropdown-menu .dropzone .dz-preview .disabled.btn-edit,.dropdown-menu .dropzone .dz-preview .disabled.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .btn-edit:disabled,.dropdown-menu .dropzone-wrapper .dz-preview .btn-remove:disabled,.dropdown-menu .dropzone-wrapper .dz-preview .disabled.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .disabled.btn-remove,.dropzone .dz-preview .command-bar .btn-edit:disabled,.dropzone .dz-preview .command-bar .btn-remove:disabled,.dropzone .dz-preview .command-bar .disabled.btn-edit,.dropzone .dz-preview .command-bar .disabled.btn-remove,.dropzone .dz-preview .dropdown-menu .btn-edit:disabled,.dropzone .dz-preview .dropdown-menu .btn-remove:disabled,.dropzone .dz-preview .dropdown-menu .disabled.btn-edit,.dropzone .dz-preview .dropdown-menu .disabled.btn-remove,.dropzone .dz-preview .table td .btn-edit:disabled,.dropzone .dz-preview .table td .btn-remove:disabled,.dropzone .dz-preview .table td .disabled.btn-edit,.dropzone .dz-preview .table td .disabled.btn-remove,.dropzone-wrapper .dz-preview .command-bar .btn-edit:disabled,.dropzone-wrapper .dz-preview .command-bar .btn-remove:disabled,.dropzone-wrapper .dz-preview .command-bar .disabled.btn-edit,.dropzone-wrapper .dz-preview .command-bar .disabled.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .btn-edit:disabled,.dropzone-wrapper .dz-preview .dropdown-menu .btn-remove:disabled,.dropzone-wrapper .dz-preview .dropdown-menu .disabled.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .disabled.btn-remove,.dropzone-wrapper .dz-preview .table td .btn-edit:disabled,.dropzone-wrapper .dz-preview .table td .btn-remove:disabled,.dropzone-wrapper .dz-preview .table td .disabled.btn-edit,.dropzone-wrapper .dz-preview .table td .disabled.btn-remove,.table td .btn:disabled,.table td .disabled.btn,.table td .dropzone .dz-preview .btn-edit:disabled,.table td .dropzone .dz-preview .btn-remove:disabled,.table td .dropzone .dz-preview .disabled.btn-edit,.table td .dropzone .dz-preview .disabled.btn-remove,.table td .dropzone-wrapper .dz-preview .btn-edit:disabled,.table td .dropzone-wrapper .dz-preview .btn-remove:disabled,.table td .dropzone-wrapper .dz-preview .disabled.btn-edit,.table td .dropzone-wrapper .dz-preview .disabled.btn-remove{color:#adb5bd}.breadcrumb{background-color:initial;border-radius:unset}.sub-menu{display:block;transition:all .4s ease-in-out 0s;width:100%}.command-bar .dropzone .dz-preview .sub-menu .btn-edit,.command-bar .dropzone .dz-preview .sub-menu .btn-remove,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-edit,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-remove,.command-bar .sub-menu .btn,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-edit,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-remove,.dropdown-menu .sub-menu .btn,.dropzone .dz-preview .command-bar .sub-menu .btn-edit,.dropzone .dz-preview .command-bar .sub-menu .btn-remove,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-edit,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-remove,.dropzone .dz-preview .table td .sub-menu .btn-edit,.dropzone .dz-preview .table td .sub-menu .btn-remove,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-edit,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-remove,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-edit,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-remove,.sub-menu .command-bar .btn,.sub-menu .command-bar .dropzone .dz-preview .btn-edit,.sub-menu .command-bar .dropzone .dz-preview .btn-remove,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-edit,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-remove,.sub-menu .dropdown-item,.sub-menu .dropdown-menu .btn,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-edit,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-remove,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-edit,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-remove,.sub-menu .dropzone .dz-preview .command-bar .btn-edit,.sub-menu .dropzone .dz-preview .command-bar .btn-remove,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-edit,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-remove,.sub-menu .dropzone .dz-preview .table td .btn-edit,.sub-menu .dropzone .dz-preview .table td .btn-remove,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-edit,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-remove,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-edit,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-remove,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-edit,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-remove,.sub-menu .table td .btn,.sub-menu .table td .dropzone .dz-preview .btn-edit,.sub-menu .table td .dropzone .dz-preview .btn-remove,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-edit,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-remove,.table td .dropzone .dz-preview .sub-menu .btn-edit,.table td .dropzone .dz-preview .sub-menu .btn-remove,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-edit,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-remove,.table td .sub-menu .btn{padding:.5rem 2.5rem}.command-bar .dropzone .dz-preview .sub-menu .btn-edit:focus,.command-bar .dropzone .dz-preview .sub-menu .btn-edit:hover,.command-bar .dropzone .dz-preview .sub-menu .btn-remove:focus,.command-bar .dropzone .dz-preview .sub-menu .btn-remove:hover,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-edit:focus,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-edit:hover,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-remove:focus,.command-bar .dropzone-wrapper .dz-preview .sub-menu .btn-remove:hover,.command-bar .sub-menu .btn:focus,.command-bar .sub-menu .btn:hover,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-edit:focus,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-edit:hover,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-remove:focus,.dropdown-menu .dropzone .dz-preview .sub-menu .btn-remove:hover,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-edit:focus,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-edit:hover,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-remove:focus,.dropdown-menu .dropzone-wrapper .dz-preview .sub-menu .btn-remove:hover,.dropdown-menu .sub-menu .btn:focus,.dropdown-menu .sub-menu .btn:hover,.dropzone .dz-preview .command-bar .sub-menu .btn-edit:focus,.dropzone .dz-preview .command-bar .sub-menu .btn-edit:hover,.dropzone .dz-preview .command-bar .sub-menu .btn-remove:focus,.dropzone .dz-preview .command-bar .sub-menu .btn-remove:hover,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-edit:focus,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-edit:hover,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-remove:focus,.dropzone .dz-preview .dropdown-menu .sub-menu .btn-remove:hover,.dropzone .dz-preview .table td .sub-menu .btn-edit:focus,.dropzone .dz-preview .table td .sub-menu .btn-edit:hover,.dropzone .dz-preview .table td .sub-menu .btn-remove:focus,.dropzone .dz-preview .table td .sub-menu .btn-remove:hover,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-edit:focus,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-edit:hover,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-remove:focus,.dropzone-wrapper .dz-preview .command-bar .sub-menu .btn-remove:hover,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-edit:focus,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-edit:hover,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-remove:focus,.dropzone-wrapper .dz-preview .dropdown-menu .sub-menu .btn-remove:hover,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-edit:focus,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-edit:hover,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-remove:focus,.dropzone-wrapper .dz-preview .table td .sub-menu .btn-remove:hover,.sub-menu .command-bar .btn:focus,.sub-menu .command-bar .btn:hover,.sub-menu .command-bar .dropzone .dz-preview .btn-edit:focus,.sub-menu .command-bar .dropzone .dz-preview .btn-edit:hover,.sub-menu .command-bar .dropzone .dz-preview .btn-remove:focus,.sub-menu .command-bar .dropzone .dz-preview .btn-remove:hover,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-edit:focus,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-edit:hover,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-remove:focus,.sub-menu .command-bar .dropzone-wrapper .dz-preview .btn-remove:hover,.sub-menu .dropdown-item:focus,.sub-menu .dropdown-item:hover,.sub-menu .dropdown-menu .btn:focus,.sub-menu .dropdown-menu .btn:hover,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-edit:focus,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-edit:hover,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-remove:focus,.sub-menu .dropdown-menu .dropzone .dz-preview .btn-remove:hover,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-edit:focus,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-edit:hover,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-remove:focus,.sub-menu .dropdown-menu .dropzone-wrapper .dz-preview .btn-remove:hover,.sub-menu .dropzone .dz-preview .command-bar .btn-edit:focus,.sub-menu .dropzone .dz-preview .command-bar .btn-edit:hover,.sub-menu .dropzone .dz-preview .command-bar .btn-remove:focus,.sub-menu .dropzone .dz-preview .command-bar .btn-remove:hover,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-edit:focus,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-edit:hover,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-remove:focus,.sub-menu .dropzone .dz-preview .dropdown-menu .btn-remove:hover,.sub-menu .dropzone .dz-preview .table td .btn-edit:focus,.sub-menu .dropzone .dz-preview .table td .btn-edit:hover,.sub-menu .dropzone .dz-preview .table td .btn-remove:focus,.sub-menu .dropzone .dz-preview .table td .btn-remove:hover,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-edit:focus,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-edit:hover,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-remove:focus,.sub-menu .dropzone-wrapper .dz-preview .command-bar .btn-remove:hover,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-edit:focus,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-edit:hover,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-remove:focus,.sub-menu .dropzone-wrapper .dz-preview .dropdown-menu .btn-remove:hover,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-edit:focus,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-edit:hover,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-remove:focus,.sub-menu .dropzone-wrapper .dz-preview .table td .btn-remove:hover,.sub-menu .table td .btn:focus,.sub-menu .table td .btn:hover,.sub-menu .table td .dropzone .dz-preview .btn-edit:focus,.sub-menu .table td .dropzone .dz-preview .btn-edit:hover,.sub-menu .table td .dropzone .dz-preview .btn-remove:focus,.sub-menu .table td .dropzone .dz-preview .btn-remove:hover,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-edit:focus,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-edit:hover,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-remove:focus,.sub-menu .table td .dropzone-wrapper .dz-preview .btn-remove:hover,.table td .dropzone .dz-preview .sub-menu .btn-edit:focus,.table td .dropzone .dz-preview .sub-menu .btn-edit:hover,.table td .dropzone .dz-preview .sub-menu .btn-remove:focus,.table td .dropzone .dz-preview .sub-menu .btn-remove:hover,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-edit:focus,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-edit:hover,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-remove:focus,.table td .dropzone-wrapper .dz-preview .sub-menu .btn-remove:hover,.table td .sub-menu .btn:focus,.table td .sub-menu .btn:hover{background-color:inherit}dd{margin:0}.card-text{-webkit-box-orient:vertical;display:-webkit-box;text-overflow:ellipsis}sub,sup{font-size:80%}legend{font-size:1.3rem;margin-bottom:1rem}.toast{border:none;border-radius:.5rem}.bg-dark .nav .command-bar .active.btn,.bg-dark .nav .command-bar .dropzone .dz-preview .active.btn-edit,.bg-dark .nav .command-bar .dropzone .dz-preview .active.btn-remove,.bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-edit,.bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-remove,.bg-dark .nav .dropdown-item.active,.bg-dark .nav .dropdown-menu .active.btn,.bg-dark .nav .dropdown-menu .dropzone .dz-preview .active.btn-edit,.bg-dark .nav .dropdown-menu .dropzone .dz-preview .active.btn-remove,.bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-edit,.bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-remove,.bg-dark .nav .dropzone .dz-preview .command-bar .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .command-bar .active.btn-remove,.bg-dark .nav .dropzone .dz-preview .dropdown-menu .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .dropdown-menu .active.btn-remove,.bg-dark .nav .dropzone .dz-preview .table td .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .table td .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .table td .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .table td .active.btn-remove,.bg-dark .nav .table td .active.btn,.bg-dark .nav .table td .dropzone .dz-preview .active.btn-edit,.bg-dark .nav .table td .dropzone .dz-preview .active.btn-remove,.bg-dark .nav .table td .dropzone-wrapper .dz-preview .active.btn-edit,.bg-dark .nav .table td .dropzone-wrapper .dz-preview .active.btn-remove,.command-bar .bg-dark .nav .active.btn,.command-bar .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.command-bar .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.command-bar .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.command-bar .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.command-bar .graph-svg-tip .nav .active.btn,.dropdown-menu .bg-dark .nav .active.btn,.dropdown-menu .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.dropdown-menu .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.dropdown-menu .graph-svg-tip .nav .active.btn,.dropzone .dz-preview .command-bar .bg-dark .nav .active.btn-edit,.dropzone .dz-preview .command-bar .bg-dark .nav .active.btn-remove,.dropzone .dz-preview .command-bar .graph-svg-tip .nav .active.btn-edit,.dropzone .dz-preview .command-bar .graph-svg-tip .nav .active.btn-remove,.dropzone .dz-preview .dropdown-menu .bg-dark .nav .active.btn-edit,.dropzone .dz-preview .dropdown-menu .bg-dark .nav .active.btn-remove,.dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-edit,.dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-remove,.dropzone .dz-preview .table td .bg-dark .nav .active.btn-edit,.dropzone .dz-preview .table td .bg-dark .nav .active.btn-remove,.dropzone .dz-preview .table td .graph-svg-tip .nav .active.btn-edit,.dropzone .dz-preview .table td .graph-svg-tip .nav .active.btn-remove,.dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .active.btn-edit,.dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .active.btn-remove,.dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .active.btn-edit,.dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .active.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .active.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .active.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-remove,.dropzone-wrapper .dz-preview .table td .bg-dark .nav .active.btn-edit,.dropzone-wrapper .dz-preview .table td .bg-dark .nav .active.btn-remove,.dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .active.btn-edit,.dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .active.btn-remove,.graph-svg-tip .nav .command-bar .active.btn,.graph-svg-tip .nav .command-bar .dropzone .dz-preview .active.btn-edit,.graph-svg-tip .nav .command-bar .dropzone .dz-preview .active.btn-remove,.graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-edit,.graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-remove,.graph-svg-tip .nav .dropdown-item.active,.graph-svg-tip .nav .dropdown-menu .active.btn,.graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .active.btn-edit,.graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .active.btn-remove,.graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-edit,.graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-remove,.graph-svg-tip .nav .dropzone .dz-preview .command-bar .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .command-bar .active.btn-remove,.graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .active.btn-remove,.graph-svg-tip .nav .dropzone .dz-preview .table td .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .table td .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .active.btn-remove,.graph-svg-tip .nav .table td .active.btn,.graph-svg-tip .nav .table td .dropzone .dz-preview .active.btn-edit,.graph-svg-tip .nav .table td .dropzone .dz-preview .active.btn-remove,.graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .active.btn-edit,.graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .active.btn-remove,.table td .bg-dark .nav .active.btn,.table td .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.table td .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.table td .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.table td .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.table td .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.table td .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.table td .graph-svg-tip .nav .active.btn{background-color:#100f14;color:#b4b3bc}body,html{height:100%;overscroll-behavior-y:none;width:100%}body{overflow-x:hidden}@media (min-width:1200px){.aside{max-width:280px;min-height:100vh;min-width:20em}.aside nav{height:100%}}@media (max-width:1199.98px){.aside-collapse{opacity:0;transition:all 1ms ease!important;visibility:hidden}.aside{height:calc(1.325rem + .9vw + 2em);transition:all .3s ease}body.menu-open .aside-collapse{display:flex!important;min-height:calc(100vh - 4rem);opacity:1;visibility:visible}body.menu-open .aside{height:auto!important;min-height:100vh}body.menu-open .workspace{display:none!important}body:not(.menu-open) .aside-collapse .sub-menu{visibility:hidden!important}}.full-height{height:100vh;overflow:auto}.command-bar{--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:.25rem}.table td{--bs-dropdown-item-padding-x:0.5rem;--bs-dropdown-item-padding-y:.25rem}.command-bar,.table td{--bs-dropdown-spacer:0.125rem;--bs-dropdown-color:#212529;--bs-dropdown-bg:#fff;--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:0.35rem;--bs-dropdown-border-width:1px;--bs-dropdown-inner-border-radius:0.2rem;--bs-dropdown-link-color:#212529;--bs-dropdown-link-hover-color:#1e2125;--bs-dropdown-link-hover-bg:#e9ecef;--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#007bff;--bs-dropdown-link-disabled-color:#adb5bd}@media (max-width:767.98px){.app:before{display:none}.command-bar{display:inline-block!important;list-style:none;margin:0;overflow-x:auto;padding:0;position:static;text-align:center;vertical-align:middle;white-space:nowrap;width:100%}.command-bar li{display:inline-block}}.layout-wrapper-no-padder>.layout,.layout-wrapper-no-padder>.p-4{padding:0!important}.bg-black .layout-wrapper .nav>li.active>a,.bg-black .layout-wrapper .nav>li:focus>a,.bg-black .layout-wrapper .nav>li:hover>a,.bg-danger .layout-wrapper .nav>li.active>a,.bg-danger .layout-wrapper .nav>li:focus>a,.bg-danger .layout-wrapper .nav>li:hover>a,.bg-dark .layout-wrapper .nav>li.active>a,.bg-dark .layout-wrapper .nav>li:focus>a,.bg-dark .layout-wrapper .nav>li:hover>a,.bg-dark .nav .command-bar .dropzone .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .command-bar .dropzone .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .command-bar .layout-wrapper .active.btn,.bg-dark .nav .dropdown-menu .dropzone .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .dropdown-menu .dropzone .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .dropdown-menu .layout-wrapper .active.btn,.bg-dark .nav .dropzone .dz-preview .command-bar .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .command-bar .layout-wrapper .active.btn-remove,.bg-dark .nav .dropzone .dz-preview .dropdown-menu .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .dropdown-menu .layout-wrapper .active.btn-remove,.bg-dark .nav .dropzone .dz-preview .table td .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone .dz-preview .table td .layout-wrapper .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .layout-wrapper .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .layout-wrapper .active.btn-remove,.bg-dark .nav .dropzone-wrapper .dz-preview .table td .layout-wrapper .active.btn-edit,.bg-dark .nav .dropzone-wrapper .dz-preview .table td .layout-wrapper .active.btn-remove,.bg-dark .nav .layout-wrapper .dropdown-item.active,.bg-dark .nav .table td .dropzone .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .table td .dropzone .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .table td .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.bg-dark .nav .table td .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.bg-dark .nav .table td .layout-wrapper .active.btn,.bg-info .layout-wrapper .nav>li.active>a,.bg-info .layout-wrapper .nav>li:focus>a,.bg-info .layout-wrapper .nav>li:hover>a,.bg-primary .layout-wrapper .nav>li.active>a,.bg-primary .layout-wrapper .nav>li:focus>a,.bg-primary .layout-wrapper .nav>li:hover>a,.bg-success .layout-wrapper .nav>li.active>a,.bg-success .layout-wrapper .nav>li:focus>a,.bg-success .layout-wrapper .nav>li:hover>a,.bg-warning .layout-wrapper .nav>li.active>a,.bg-warning .layout-wrapper .nav>li:focus>a,.bg-warning .layout-wrapper .nav>li:hover>a,.command-bar .bg-dark .nav .layout-wrapper .active.btn,.command-bar .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.command-bar .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.command-bar .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.command-bar .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.command-bar .graph-svg-tip .nav .layout-wrapper .active.btn,.dropdown-menu .bg-dark .nav .layout-wrapper .active.btn,.dropdown-menu .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.dropdown-menu .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropdown-menu .graph-svg-tip .nav .layout-wrapper .active.btn,.dropzone .dz-preview .command-bar .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .command-bar .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone .dz-preview .command-bar .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .command-bar .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropzone .dz-preview .dropdown-menu .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .dropdown-menu .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropzone .dz-preview .table td .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .table td .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone .dz-preview .table td .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone .dz-preview .table td .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .table td .bg-dark .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .table td .bg-dark .nav .layout-wrapper .active.btn-remove,.dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.graph-svg-tip .layout-wrapper .nav>li.active>a,.graph-svg-tip .layout-wrapper .nav>li:focus>a,.graph-svg-tip .layout-wrapper .nav>li:hover>a,.graph-svg-tip .nav .command-bar .dropzone .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .command-bar .dropzone .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .command-bar .layout-wrapper .active.btn,.graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropdown-menu .layout-wrapper .active.btn,.graph-svg-tip .nav .dropzone .dz-preview .command-bar .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .command-bar .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropzone .dz-preview .table td .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone .dz-preview .table td .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .layout-wrapper .dropdown-item.active,.graph-svg-tip .nav .table td .dropzone .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .table td .dropzone .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-edit,.graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .layout-wrapper .active.btn-remove,.graph-svg-tip .nav .table td .layout-wrapper .active.btn,.layout-wrapper .bg-black .nav>li.active>a,.layout-wrapper .bg-black .nav>li:focus>a,.layout-wrapper .bg-black .nav>li:hover>a,.layout-wrapper .bg-danger .nav>li.active>a,.layout-wrapper .bg-danger .nav>li:focus>a,.layout-wrapper .bg-danger .nav>li:hover>a,.layout-wrapper .bg-dark .nav .command-bar .active.btn,.layout-wrapper .bg-dark .nav .command-bar .dropzone .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .command-bar .dropzone .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav .dropdown-item.active,.layout-wrapper .bg-dark .nav .dropdown-menu .active.btn,.layout-wrapper .bg-dark .nav .dropdown-menu .dropzone .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .dropdown-menu .dropzone .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .command-bar .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .command-bar .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .dropdown-menu .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .dropdown-menu .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .table td .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone .dz-preview .table td .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-remove,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .table td .active.btn-edit,.layout-wrapper .bg-dark .nav .dropzone-wrapper .dz-preview .table td .active.btn-remove,.layout-wrapper .bg-dark .nav .table td .active.btn,.layout-wrapper .bg-dark .nav .table td .dropzone .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .table td .dropzone .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav .table td .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .bg-dark .nav .table td .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .bg-dark .nav>li.active>a,.layout-wrapper .bg-dark .nav>li:focus>a,.layout-wrapper .bg-dark .nav>li:hover>a,.layout-wrapper .bg-info .nav>li.active>a,.layout-wrapper .bg-info .nav>li:focus>a,.layout-wrapper .bg-info .nav>li:hover>a,.layout-wrapper .bg-primary .nav>li.active>a,.layout-wrapper .bg-primary .nav>li:focus>a,.layout-wrapper .bg-primary .nav>li:hover>a,.layout-wrapper .bg-success .nav>li.active>a,.layout-wrapper .bg-success .nav>li:focus>a,.layout-wrapper .bg-success .nav>li:hover>a,.layout-wrapper .bg-warning .nav>li.active>a,.layout-wrapper .bg-warning .nav>li:focus>a,.layout-wrapper .bg-warning .nav>li:hover>a,.layout-wrapper .command-bar .bg-dark .nav .active.btn,.layout-wrapper .command-bar .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .command-bar .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .command-bar .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .command-bar .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .command-bar .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .command-bar .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .command-bar .graph-svg-tip .nav .active.btn,.layout-wrapper .dropdown-menu .bg-dark .nav .active.btn,.layout-wrapper .dropdown-menu .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .dropdown-menu .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropdown-menu .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .dropdown-menu .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropdown-menu .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropdown-menu .graph-svg-tip .nav .active.btn,.layout-wrapper .dropzone .dz-preview .command-bar .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .command-bar .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone .dz-preview .command-bar .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .command-bar .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropzone .dz-preview .dropdown-menu .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .dropdown-menu .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropzone .dz-preview .table td .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .table td .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone .dz-preview .table td .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone .dz-preview .table td .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .command-bar .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .command-bar .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .dropdown-menu .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .dropdown-menu .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .table td .bg-dark .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .table td .bg-dark .nav .active.btn-remove,.layout-wrapper .dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .dropzone-wrapper .dz-preview .table td .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .command-bar .active.btn,.layout-wrapper .graph-svg-tip .nav .command-bar .dropzone .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .command-bar .dropzone .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .command-bar .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropdown-item.active,.layout-wrapper .graph-svg-tip .nav .dropdown-menu .active.btn,.layout-wrapper .graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropdown-menu .dropzone .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropdown-menu .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .command-bar .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .command-bar .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .dropdown-menu .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .table td .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone .dz-preview .table td .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .command-bar .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .dropdown-menu .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .dropzone-wrapper .dz-preview .table td .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .table td .active.btn,.layout-wrapper .graph-svg-tip .nav .table td .dropzone .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .table td .dropzone .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .active.btn-edit,.layout-wrapper .graph-svg-tip .nav .table td .dropzone-wrapper .dz-preview .active.btn-remove,.layout-wrapper .graph-svg-tip .nav>li.active>a,.layout-wrapper .graph-svg-tip .nav>li:focus>a,.layout-wrapper .graph-svg-tip .nav>li:hover>a,.layout-wrapper .layout,.layout-wrapper .shadow-sm,.layout-wrapper .table td .bg-dark .nav .active.btn,.layout-wrapper .table td .dropzone .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .table td .dropzone .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .table td .dropzone .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .table td .dropzone .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .table td .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-edit,.layout-wrapper .table td .dropzone-wrapper .dz-preview .bg-dark .nav .active.btn-remove,.layout-wrapper .table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-edit,.layout-wrapper .table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .active.btn-remove,.layout-wrapper .table td .graph-svg-tip .nav .active.btn,.table td .bg-dark .nav .layout-wrapper .active.btn,.table td .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.table td .dropzone .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.table td .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.table td .dropzone .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.table td .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-edit,.table td .dropzone-wrapper .dz-preview .bg-dark .nav .layout-wrapper .active.btn-remove,.table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-edit,.table td .dropzone-wrapper .dz-preview .graph-svg-tip .nav .layout-wrapper .active.btn-remove,.table td .graph-svg-tip .nav .layout-wrapper .active.btn{box-shadow:none!important}.iframe-error{border:none;height:100vh;right:0;outline:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:2050}.workspace-limit{max-width:calc(1120px + 1rem);overscroll-behavior-y:none}.command-bar-wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);bottom:0;right:0;position:sticky;left:0;z-index:5}@media (max-width:767.98px){.command-bar-wrapper .layout{border-top:1px solid #e9ecef;margin-top:.3em;padding:1.5em 0!important}}.btn,.dropzone .dz-preview .btn-edit,.dropzone .dz-preview .btn-remove,.dropzone-wrapper .dz-preview .btn-edit,.dropzone-wrapper .dz-preview .btn-remove{align-items:center;border-radius:.2rem;cursor:pointer;display:flex;flex-direction:row;font-weight:400;outline:0!important}.btn:focus,.dropzone .dz-preview .btn-edit:focus,.dropzone .dz-preview .btn-remove:focus,.dropzone-wrapper .dz-preview .btn-edit:focus,.dropzone-wrapper .dz-preview .btn-remove:focus{box-shadow:none}.btn-link{align-items:center;color:#394247}.btn-link.active{box-shadow:none}.btn-default,.dropzone .dz-preview .btn-remove,.dropzone-wrapper .dz-preview .btn-remove{background-color:#fff!important;background-color:#fff;border-color:#e9ecef!important;border-bottom-color:#e3e7eb;box-shadow:0 1px 1px rgba(90,90,90,.1);color:#394247!important}.btn-default .open .dropdown-toggle,.btn-default.active,.btn-default:active,.btn-default:focus,.btn-default:hover,.dropzone .dz-preview .active.btn-remove,.dropzone .dz-preview .btn-remove .open .dropdown-toggle,.dropzone .dz-preview .btn-remove:active,.dropzone .dz-preview .btn-remove:focus,.dropzone .dz-preview .btn-remove:hover,.dropzone-wrapper .dz-preview .active.btn-remove,.dropzone-wrapper .dz-preview .btn-remove .open .dropdown-toggle,.dropzone-wrapper .dz-preview .btn-remove:active,.dropzone-wrapper .dz-preview .btn-remove:focus,.dropzone-wrapper .dz-preview .btn-remove:hover{background-color:#f2f2f2!important;border-color:#d1d8de!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#394247!important}.btn-default .open .dropdown-toggle.btn-default,.btn-default .open .dropzone .dz-preview .dropdown-toggle.btn-remove,.btn-default .open .dropzone-wrapper .dz-preview .dropdown-toggle.btn-remove,.btn-default.active,.btn-default:active,.dropzone .dz-preview .active.btn-remove,.dropzone .dz-preview .btn-default .open .dropdown-toggle.btn-remove,.dropzone .dz-preview .btn-remove .open .dropdown-toggle.btn-default,.dropzone .dz-preview .btn-remove .open .dropdown-toggle.btn-remove,.dropzone .dz-preview .btn-remove:active,.dropzone-wrapper .dz-preview .active.btn-remove,.dropzone-wrapper .dz-preview .btn-default .open .dropdown-toggle.btn-remove,.dropzone-wrapper .dz-preview .btn-remove .open .dropdown-toggle.btn-default,.dropzone-wrapper .dz-preview .btn-remove .open .dropdown-toggle.btn-remove,.dropzone-wrapper .dz-preview .btn-remove:active{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,.dropzone .dz-preview .btn-remove[disabled],.dropzone .dz-preview .btn-remove[disabled].active,.dropzone .dz-preview .btn-remove[disabled]:active,.dropzone .dz-preview .btn-remove[disabled]:focus,.dropzone .dz-preview .btn-remove[disabled]:hover,.dropzone .dz-preview .disabled.active.btn-remove,.dropzone .dz-preview .disabled.btn-remove,.dropzone .dz-preview .disabled.btn-remove:active,.dropzone .dz-preview .disabled.btn-remove:focus,.dropzone .dz-preview .disabled.btn-remove:hover,.dropzone .dz-preview fieldset[disabled] .active.btn-remove,.dropzone .dz-preview fieldset[disabled] .btn-remove,.dropzone .dz-preview fieldset[disabled] .btn-remove:active,.dropzone .dz-preview fieldset[disabled] .btn-remove:focus,.dropzone .dz-preview fieldset[disabled] .btn-remove:hover,.dropzone-wrapper .dz-preview .btn-remove[disabled],.dropzone-wrapper .dz-preview .btn-remove[disabled].active,.dropzone-wrapper .dz-preview .btn-remove[disabled]:active,.dropzone-wrapper .dz-preview .btn-remove[disabled]:focus,.dropzone-wrapper .dz-preview .btn-remove[disabled]:hover,.dropzone-wrapper .dz-preview .disabled.active.btn-remove,.dropzone-wrapper .dz-preview .disabled.btn-remove,.dropzone-wrapper .dz-preview .disabled.btn-remove:active,.dropzone-wrapper .dz-preview .disabled.btn-remove:focus,.dropzone-wrapper .dz-preview .disabled.btn-remove:hover,.dropzone-wrapper .dz-preview fieldset[disabled] .active.btn-remove,.dropzone-wrapper .dz-preview fieldset[disabled] .btn-remove,.dropzone-wrapper .dz-preview fieldset[disabled] .btn-remove:active,.dropzone-wrapper .dz-preview fieldset[disabled] .btn-remove:focus,.dropzone-wrapper .dz-preview fieldset[disabled] .btn-remove:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover,fieldset[disabled] .dropzone .dz-preview .active.btn-remove,fieldset[disabled] .dropzone .dz-preview .btn-remove,fieldset[disabled] .dropzone .dz-preview .btn-remove:active,fieldset[disabled] .dropzone .dz-preview .btn-remove:focus,fieldset[disabled] .dropzone .dz-preview .btn-remove:hover,fieldset[disabled] .dropzone-wrapper .dz-preview .active.btn-remove,fieldset[disabled] .dropzone-wrapper .dz-preview .btn-remove,fieldset[disabled] .dropzone-wrapper .dz-preview .btn-remove:active,fieldset[disabled] .dropzone-wrapper .dz-preview .btn-remove:focus,fieldset[disabled] .dropzone-wrapper .dz-preview .btn-remove:hover{background-color:#fff!important;border-color:#e9ecef!important}.btn-default:not([disabled]):not(.disabled).active,.btn-default:not([disabled]):not(.disabled):active,.dropzone .dz-preview .btn-remove:not([disabled]):not(.disabled).active,.dropzone .dz-preview .btn-remove:not([disabled]):not(.disabled):active,.dropzone .dz-preview .show>.dropdown-toggle.btn-remove,.dropzone-wrapper .dz-preview .btn-remove:not([disabled]):not(.disabled).active,.dropzone-wrapper .dz-preview .btn-remove:not([disabled]):not(.disabled):active,.dropzone-wrapper .dz-preview .show>.dropdown-toggle.btn-remove,.show>.btn-default.dropdown-toggle{background-color:#f2f2f2!important;border-color:#d1d8de!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#394247!important;cursor:default!important}.btn-default.btn-bg,.dropzone .dz-preview .btn-bg.btn-remove,.dropzone-wrapper .dz-preview .btn-bg.btn-remove{background-clip:padding-box;border-color:rgba(0,0,0,.1)}.btn-primary{background-color:#007bff!important;border-color:#007bff!important;color:#fff!important}.btn-primary .open .dropdown-toggle,.btn-primary.active,.btn-primary:active,.btn-primary:focus,.btn-primary:hover{background-color:#006fe6!important;border-color:#0067d6!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-primary .open .dropdown-toggle.btn-primary,.btn-primary.active,.btn-primary:active{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#007bff!important;border-color:#007bff!important}.btn-primary:not([disabled]):not(.disabled).active,.btn-primary:not([disabled]):not(.disabled):active,.show>.btn-primary.dropdown-toggle{background-color:#006fe6!important;border-color:#0067d6!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}.btn-success{background-color:#28a745!important;border-color:#28a745!important;color:#fff!important}.btn-success .open .dropdown-toggle,.btn-success.active,.btn-success:active,.btn-success:focus,.btn-success:hover{background-color:#23923d!important;border-color:#208637!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-success .open .dropdown-toggle.btn-success,.btn-success.active,.btn-success:active{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#28a745!important;border-color:#28a745!important}.btn-success:not([disabled]):not(.disabled).active,.btn-success:not([disabled]):not(.disabled):active,.show>.btn-success.dropdown-toggle{background-color:#23923d!important;border-color:#208637!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}.btn-info{background-color:#17a2b8!important;border-color:#17a2b8!important;color:#fff!important}.btn-info .open .dropdown-toggle,.btn-info.active,.btn-info:active,.btn-info:focus,.btn-info:hover{background-color:#148ea1!important;border-color:#128294!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-info .open .dropdown-toggle.btn-info,.btn-info.active,.btn-info:active{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#17a2b8!important;border-color:#17a2b8!important}.btn-info:not([disabled]):not(.disabled).active,.btn-info:not([disabled]):not(.disabled):active,.show>.btn-info.dropdown-toggle{background-color:#148ea1!important;border-color:#128294!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}label.btn-info{margin-bottom:0}.btn-warning{background-color:#ffc107!important;border-color:#ffc107!important;color:#15141a!important}.btn-warning .open .dropdown-toggle,.btn-warning.active,.btn-warning:active,.btn-warning:focus,.btn-warning:hover{background-color:#edb100!important;border-color:#dda600!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#15141a!important}.btn-warning .open .dropdown-toggle.btn-warning,.btn-warning.active,.btn-warning:active{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#ffc107!important;border-color:#ffc107!important}.btn-warning:not([disabled]):not(.disabled).active,.btn-warning:not([disabled]):not(.disabled):active,.show>.btn-warning.dropdown-toggle{background-color:#edb100!important;border-color:#dda600!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#15141a!important;cursor:default!important}.btn-danger{background-color:#dc3545!important;border-color:#dc3545!important;color:#fff!important}.btn-danger .open .dropdown-toggle,.btn-danger.active,.btn-danger:active,.btn-danger:focus,.btn-danger:hover{background-color:#d32535!important;border-color:#c62232!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-danger .open .dropdown-toggle.btn-danger,.btn-danger.active,.btn-danger:active{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#dc3545!important;border-color:#dc3545!important}.btn-danger:not([disabled]):not(.disabled).active,.btn-danger:not([disabled]):not(.disabled):active,.show>.btn-danger.dropdown-toggle{background-color:#d32535!important;border-color:#c62232!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}.btn-dark{background-color:#1c1b22!important;border-color:#1c1b22!important;color:#fff!important}.btn-dark .open .dropdown-toggle,.btn-dark.active,.btn-dark:active,.btn-dark:focus,.btn-dark:hover{background-color:#101014!important;border-color:#09090b!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-dark .open .dropdown-toggle.btn-dark,.btn-dark.active,.btn-dark:active{background-image:none}.btn-dark.disabled,.btn-dark.disabled.active,.btn-dark.disabled:active,.btn-dark.disabled:focus,.btn-dark.disabled:hover,.btn-dark[disabled],.btn-dark[disabled].active,.btn-dark[disabled]:active,.btn-dark[disabled]:focus,.btn-dark[disabled]:hover,fieldset[disabled] .btn-dark,fieldset[disabled] .btn-dark.active,fieldset[disabled] .btn-dark:active,fieldset[disabled] .btn-dark:focus,fieldset[disabled] .btn-dark:hover{background-color:#1c1b22!important;border-color:#1c1b22!important}.btn-dark:not([disabled]):not(.disabled).active,.btn-dark:not([disabled]):not(.disabled):active,.show>.btn-dark.dropdown-toggle{background-color:#101014!important;border-color:#09090b!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}.btn-black{background-color:#15141a!important;border-color:#15141a!important;color:#fff!important}.btn-black .open .dropdown-toggle,.btn-black.active,.btn-black:active,.btn-black:focus,.btn-black:hover{background-color:#09090c!important;border-color:#020203!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important}.btn-black .open .dropdown-toggle.btn-black,.btn-black.active,.btn-black:active{background-image:none}.btn-black.disabled,.btn-black.disabled.active,.btn-black.disabled:active,.btn-black.disabled:focus,.btn-black.disabled:hover,.btn-black[disabled],.btn-black[disabled].active,.btn-black[disabled]:active,.btn-black[disabled]:focus,.btn-black[disabled]:hover,fieldset[disabled] .btn-black,fieldset[disabled] .btn-black.active,fieldset[disabled] .btn-black:active,fieldset[disabled] .btn-black:focus,fieldset[disabled] .btn-black:hover{background-color:#15141a!important;border-color:#15141a!important}.btn-black:not([disabled]):not(.disabled).active,.btn-black:not([disabled]):not(.disabled):active,.show>.btn-black.dropdown-toggle{background-color:#09090c!important;border-color:#020203!important;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)!important;color:#fff!important;cursor:default!important}.btn-icon{height:34px;padding:0!important;text-align:center;width:34px}.btn-icon i{line-height:34px;position:relative;top:-1px}.btn-group-sm>.btn-icon.btn,.btn-icon.btn-sm,.dropzone .dz-preview .btn-group-sm>.btn-icon.btn-edit,.dropzone .dz-preview .btn-icon.btn-remove,.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-icon.btn-edit,.dropzone-wrapper .dz-preview .btn-group-sm>.btn-icon.btn-edit,.dropzone-wrapper .dz-preview .btn-icon.btn-remove,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-icon.btn-edit,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-icon.btn-edit,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-icon.btn-edit,.table tbody tr td>div>.form-group>.btn-icon.btn{height:30px;width:30px}.btn-group-sm>.btn-icon.btn i,.btn-icon.btn-sm i,.dropzone .dz-preview .btn-group-sm>.btn-icon.btn-edit i,.dropzone .dz-preview .btn-icon.btn-remove i,.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-icon.btn-edit i,.dropzone-wrapper .dz-preview .btn-group-sm>.btn-icon.btn-edit i,.dropzone-wrapper .dz-preview .btn-icon.btn-remove i,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-icon.btn-edit i,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-icon.btn-edit i,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-icon.btn-edit i,.table tbody tr td>div>.form-group>.btn-icon.btn i{line-height:30px}.btn-group-lg>.btn-icon.btn,.btn-icon.btn-lg,.dropzone .dz-preview .btn-group-lg>.btn-icon.btn-edit,.dropzone .dz-preview .btn-group-lg>.btn-icon.btn-remove,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-icon.btn-edit,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-icon.btn-remove{height:45px;width:45px}.btn-group-lg>.btn-icon.btn i,.btn-icon.btn-lg i,.dropzone .dz-preview .btn-group-lg>.btn-icon.btn-edit i,.dropzone .dz-preview .btn-group-lg>.btn-icon.btn-remove i,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-icon.btn-edit i,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-icon.btn-remove i{line-height:45px}.btn-rounded{border-radius:50px;padding-right:15px;padding-left:15px}.btn-group-lg>.btn-rounded.btn,.btn-rounded.btn-lg,.dropzone .dz-preview .btn-group-lg>.btn-rounded.btn-edit,.dropzone .dz-preview .btn-group-lg>.btn-rounded.btn-remove,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-rounded.btn-edit,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-rounded.btn-remove{padding-right:25px;padding-left:25px}.btn>i.pull-left,.btn>i.pull-right,.dropzone .dz-preview .btn-edit>i.pull-left,.dropzone .dz-preview .btn-edit>i.pull-right,.dropzone .dz-preview .btn-remove>i.pull-left,.dropzone .dz-preview .btn-remove>i.pull-right,.dropzone-wrapper .dz-preview .btn-edit>i.pull-left,.dropzone-wrapper .dz-preview .btn-edit>i.pull-right,.dropzone-wrapper .dz-preview .btn-remove>i.pull-left,.dropzone-wrapper .dz-preview .btn-remove>i.pull-right{line-height:1.5}.btn-block{justify-content:center;padding-right:12px;padding-left:12px;width:100%}.btn-group-vertical>.btn:first-child:not(:last-child),.dropzone .dz-preview .btn-group-vertical>.btn-edit:first-child:not(:last-child),.dropzone .dz-preview .btn-group-vertical>.btn-remove:first-child:not(:last-child),.dropzone-wrapper .dz-preview .btn-group-vertical>.btn-edit:first-child:not(:last-child),.dropzone-wrapper .dz-preview .btn-group-vertical>.btn-remove:first-child:not(:last-child){border-top-left-radius:.2rem}.btn-group-vertical>.btn:last-child:not(:first-child),.dropzone .dz-preview .btn-group-vertical>.btn-edit:last-child:not(:first-child),.dropzone .dz-preview .btn-group-vertical>.btn-remove:last-child:not(:first-child),.dropzone-wrapper .dz-preview .btn-group-vertical>.btn-edit:last-child:not(:first-child),.dropzone-wrapper .dz-preview .btn-group-vertical>.btn-remove:last-child:not(:first-child){border-bottom-right-radius:.2rem}.btn-addon i{background-color:rgba(0,0,0,.1);border-radius:0 .2rem .2rem 0;float:right;height:34px;line-height:34px;margin:-7px -12px -7px 12px;position:relative;text-align:center;width:34px}.btn-addon i.pull-right{border-radius:.2rem 0 0 .2rem;margin-right:12px;margin-left:-12px}.btn-addon.btn-sm i,.btn-group-sm>.btn-addon.btn i,.dropzone .dz-preview .btn-addon.btn-remove i,.dropzone .dz-preview .btn-group-sm>.btn-addon.btn-edit i,.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-addon.btn-edit i,.dropzone-wrapper .dz-preview .btn-addon.btn-remove i,.dropzone-wrapper .dz-preview .btn-group-sm>.btn-addon.btn-edit i,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-addon.btn-edit i,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-addon.btn-edit i,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-addon.btn-edit i,.table tbody tr td>div>.form-group>.btn-addon.btn i{height:30px;line-height:30px;margin:-6px -10px -6px 10px;width:30px}.btn-addon.btn-sm i.pull-right,.btn-group-sm>.btn-addon.btn i.pull-right,.dropzone .dz-preview .btn-addon.btn-remove i.pull-right,.dropzone .dz-preview .btn-group-sm>.btn-addon.btn-edit i.pull-right,.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-addon.btn-edit i.pull-right,.dropzone-wrapper .dz-preview .btn-addon.btn-remove i.pull-right,.dropzone-wrapper .dz-preview .btn-group-sm>.btn-addon.btn-edit i.pull-right,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-addon.btn-edit i.pull-right,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-addon.btn-edit i.pull-right,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-addon.btn-edit i.pull-right,.table tbody tr td>div>.form-group>.btn-addon.btn i.pull-right{margin-right:10px;margin-left:-10px}.btn-addon.btn-lg i,.btn-group-lg>.btn-addon.btn i,.dropzone .dz-preview .btn-group-lg>.btn-addon.btn-edit i,.dropzone .dz-preview .btn-group-lg>.btn-addon.btn-remove i,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-addon.btn-edit i,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-addon.btn-remove i{height:45px;line-height:45px;margin:-11px -16px -11px 16px;width:45px}.btn-addon.btn-lg i.pull-right,.btn-group-lg>.btn-addon.btn i.pull-right,.dropzone .dz-preview .btn-group-lg>.btn-addon.btn-edit i.pull-right,.dropzone .dz-preview .btn-group-lg>.btn-addon.btn-remove i.pull-right,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-addon.btn-edit i.pull-right,.dropzone-wrapper .dz-preview .btn-group-lg>.btn-addon.btn-remove i.pull-right{margin-right:16px;margin-left:-16px}.btn-addon.btn-default i,.dropzone .dz-preview .btn-addon.btn-remove i,.dropzone-wrapper .dz-preview .btn-addon.btn-remove i{background-color:transparent;border-left:1px solid #e9ecef}.btn-groups .btn,.btn-groups .dropzone .dz-preview .btn-edit,.btn-groups .dropzone .dz-preview .btn-remove,.btn-groups .dropzone-wrapper .dz-preview .btn-edit,.btn-groups .dropzone-wrapper .dz-preview .btn-remove,.dropzone .dz-preview .btn-groups .btn-edit,.dropzone .dz-preview .btn-groups .btn-remove,.dropzone-wrapper .dz-preview .btn-groups .btn-edit,.dropzone-wrapper .dz-preview .btn-groups .btn-remove{margin-bottom:5px}button.close{font-size:12px}.btn-group-justified{display:flex;width:100%}.btn-group-justified .btn,.btn-group-justified .btn-group,.btn-group-justified .dropzone .dz-preview .btn-edit,.btn-group-justified .dropzone .dz-preview .btn-remove,.btn-group-justified .dropzone-wrapper .dz-preview .btn-edit,.btn-group-justified .dropzone-wrapper .dz-preview .btn-remove,.dropzone .dz-preview .btn-group-justified .btn-edit,.dropzone .dz-preview .btn-group-justified .btn-remove,.dropzone-wrapper .dz-preview .btn-group-justified .btn-edit,.dropzone-wrapper .dz-preview .btn-group-justified .btn-remove{flex:1}.btn-group-justified .btn .btn,.btn-group-justified .btn .dropzone .dz-preview .btn-edit,.btn-group-justified .btn .dropzone .dz-preview .btn-remove,.btn-group-justified .btn .dropzone-wrapper .dz-preview .btn-edit,.btn-group-justified .btn .dropzone-wrapper .dz-preview .btn-remove,.btn-group-justified .btn-group .btn,.btn-group-justified .btn-group .dropzone .dz-preview .btn-edit,.btn-group-justified .btn-group .dropzone .dz-preview .btn-remove,.btn-group-justified .btn-group .dropzone-wrapper .dz-preview .btn-edit,.btn-group-justified .btn-group .dropzone-wrapper .dz-preview .btn-remove,.btn-group-justified .dropzone .dz-preview .btn-edit .btn,.btn-group-justified .dropzone .dz-preview .btn-edit .btn-edit,.btn-group-justified .dropzone .dz-preview .btn-edit .btn-remove,.btn-group-justified .dropzone .dz-preview .btn-remove .btn,.btn-group-justified .dropzone .dz-preview .btn-remove .btn-edit,.btn-group-justified .dropzone .dz-preview .btn-remove .btn-remove,.btn-group-justified .dropzone-wrapper .dz-preview .btn-edit .btn,.btn-group-justified .dropzone-wrapper .dz-preview .btn-edit .btn-edit,.btn-group-justified .dropzone-wrapper .dz-preview .btn-edit .btn-remove,.btn-group-justified .dropzone-wrapper .dz-preview .btn-remove .btn,.btn-group-justified .dropzone-wrapper .dz-preview .btn-remove .btn-edit,.btn-group-justified .dropzone-wrapper .dz-preview .btn-remove .btn-remove,.dropzone .dz-preview .btn-group-justified .btn .btn-edit,.dropzone .dz-preview .btn-group-justified .btn .btn-remove,.dropzone .dz-preview .btn-group-justified .btn-edit .btn,.dropzone .dz-preview .btn-group-justified .btn-edit .btn-edit,.dropzone .dz-preview .btn-group-justified .btn-edit .btn-remove,.dropzone .dz-preview .btn-group-justified .btn-group .btn-edit,.dropzone .dz-preview .btn-group-justified .btn-group .btn-remove,.dropzone .dz-preview .btn-group-justified .btn-remove .btn,.dropzone .dz-preview .btn-group-justified .btn-remove .btn-edit,.dropzone .dz-preview .btn-group-justified .btn-remove .btn-remove,.dropzone-wrapper .dz-preview .btn-group-justified .btn .btn-edit,.dropzone-wrapper .dz-preview .btn-group-justified .btn .btn-remove,.dropzone-wrapper .dz-preview .btn-group-justified .btn-edit .btn,.dropzone-wrapper .dz-preview .btn-group-justified .btn-edit .btn-edit,.dropzone-wrapper .dz-preview .btn-group-justified .btn-edit .btn-remove,.dropzone-wrapper .dz-preview .btn-group-justified .btn-group .btn-edit,.dropzone-wrapper .dz-preview .btn-group-justified .btn-group .btn-remove,.dropzone-wrapper .dz-preview .btn-group-justified .btn-remove .btn,.dropzone-wrapper .dz-preview .btn-group-justified .btn-remove .btn-edit,.dropzone-wrapper .dz-preview .btn-group-justified .btn-remove .btn-remove{width:100%}.btn-group-justified .btn .dropdown-menu,.btn-group-justified .btn-group .dropdown-menu,.btn-group-justified .dropzone .dz-preview .btn-edit .dropdown-menu,.btn-group-justified .dropzone .dz-preview .btn-remove .dropdown-menu,.btn-group-justified .dropzone-wrapper .dz-preview .btn-edit .dropdown-menu,.btn-group-justified .dropzone-wrapper .dz-preview .btn-remove .dropdown-menu,.dropzone .dz-preview .btn-group-justified .btn-edit .dropdown-menu,.dropzone .dz-preview .btn-group-justified .btn-remove .dropdown-menu,.dropzone-wrapper .dz-preview .btn-group-justified .btn-edit .dropdown-menu,.dropzone-wrapper .dz-preview .btn-group-justified .btn-remove .dropdown-menu{right:auto}.btn-loading{position:relative}.btn-loading span:not(.spinner-loading):not(.spinner-border),.btn-loading svg:not(.spinner-loading){opacity:0}.modal .close:focus{outline:0}.modal .modal-dialog{transition:all .34s!important}.modal .modal-content{border-radius:.5rem;box-shadow:none}.modal .modal-header{border-bottom:0;padding:1.5rem 1.5rem 0}.modal .modal-header p{color:#8b91a0}.modal .modal-header .btn-close{margin:0!important}.modal .modal-body{box-shadow:none;padding:0;white-space:normal}.CodeMirror-fullscreen .modal .modal-body .CodeMirror-scroll,.modal .modal-body .CodeMirror-fullscreen .CodeMirror-scroll,.modal .modal-body .card{background:none;border:none}.modal .modal-footer{box-shadow:none;margin-top:0;padding:15px 25px}.modal.fade{opacity:1!important}.modal.fade.stick-up .modal-dialog{margin-top:-5px;transform:translate3d(0,-100%,0)}.modal.fade.stick-up.in .modal-dialog,.modal.fade.stick-up.show .modal-dialog{transform:translateZ(0)}.modal.fade.slide-up{height:100%;top:auto}.modal.fade.slide-up.in .modal-dialog,.modal.fade.slide-up.show .modal-dialog{transform:translateZ(0)}.modal.fade.slide-up.disable-scroll{overflow:hidden}.modal.fade.slide-up .modal-dialog{display:table;height:100%;transform:translate3d(0,75%,0);width:calc(100% - 20px)}.modal.fade.slide-up .modal-content-wrapper{display:table-cell;vertical-align:middle}.modal.fade.center-scale{transition:all .15s cubic-bezier(.4,0,.2,1)!important}.modal.fade.center-scale.in .modal-dialog,.modal.fade.center-scale.show .modal-dialog{opacity:1;transform:scale(1)}.modal.fade.center-scale .modal-dialog{opacity:0;transform:scale(.8)}.modal.fade.fill-in{background-color:hsla(0,0%,100%,0);transition:background-color .3s}.modal.fade.fill-in>.close{margin-left:20px;margin-top:20px;opacity:.6}.modal.fade.fill-in>.close>i{font-size:16px}.modal.fade.fill-in .modal-dialog{display:table;height:100%}.modal.fade.fill-in .modal-content{background:transparent;border:0;display:table-cell;vertical-align:middle}.modal.fade.fill-in .modal-content .modal-header{border-bottom:0}.modal.fade.fill-in.in,.modal.fade.fill-in.show{background-color:hsla(0,0%,100%,.85)}.modal.fade.fill-in.in .modal-dialog,.modal.fade.fill-in.show .modal-dialog{opacity:1;transform:scale(1)}.modal.fade.fill-in .modal-dialog{opacity:0;transform:scale(.6)}.modal.fade.slide-right .close{margin-left:10px;position:absolute;left:0;top:1.5em;z-index:10}.modal.fade.slide-right.in .modal-dialog,.modal.fade.slide-right.show .modal-dialog{transform:translateZ(0)}.modal.fade.slide-right .modal-dialog{margin:0;position:absolute;left:0;transform:translate3d(-100%,0,0)}.modal.fade.slide-right .modal-dialog .modal-content,.modal.fade.slide-right .modal-dialog .modal-content-wrapper{height:100%}.modal.fade.slide-right .modal-content{border-radius:0;min-height:100vh}.modal .modal-placeholder{display:none}.modal.modal-loading .modal-placeholder{display:block;opacity:1}.modal.modal-loading .modal-body,.modal.modal-loading .modal-footer,.modal.modal-loading .modal-header{display:none}.fill-in-modal .modal-backdrop{background-color:transparent}.modal-backdrop{opacity:0;transition:none}.modal-backdrop.fade{transition:opacity .2s ease-in-out}@media (max-width:768px){.modal.fill-in .modal-dialog,.modal.slide-up .modal-dialog{width:calc(100% - 20px)}}@media (min-width:768px){.modal.stick-up .modal-dialog{margin:-5px auto}.modal.fill-in .modal-dialog,.modal.slide-up .modal-dialog{margin:0 auto}.modal .modal-content{box-shadow:none}.modal-dialog{margin:30px auto;width:auto}}.sortable-placeholder{border:1px dashed #ccc;list-style:none;margin-bottom:5px;min-height:50px}.reorder-drag{opacity:0}.select2,.select2-search__field{width:100%!important}.select2{max-width:600px;min-width:10em}.select2-container--bootstrap .select2-selection{border:1px solid rgba(21,20,26,.1);box-shadow:none}.select2-container--bootstrap .select2-dropdown{border-color:rgba(21,20,26,.1);box-shadow:none;outline:0!important;z-index:1200}.select2-container--bootstrap .select2-dropdown:-moz-placeholder{color:#667780}.select2-container--bootstrap .select2-dropdown::-moz-placeholder{color:#667780;opacity:1}.select2-container--bootstrap .select2-dropdown:-ms-input-placeholder{color:#667780}.select2-container--bootstrap .select2-dropdown::-webkit-input-placeholder{color:#667780}.select2-container--bootstrap .select2-dropdown.placeholder{color:#667780}.select2-container--bootstrap.select2-container--focus .select2-selection,.select2-container--bootstrap.select2-container--open .select2-selection{background-color:#edeeee;border-color:rgba(21,20,26,.1);box-shadow:none;outline:0!important}.select2-container--bootstrap.select2-container--focus .select2-selection:-moz-placeholder,.select2-container--bootstrap.select2-container--open .select2-selection:-moz-placeholder{color:#667780}.select2-container--bootstrap.select2-container--focus .select2-selection::-moz-placeholder,.select2-container--bootstrap.select2-container--open .select2-selection::-moz-placeholder{color:#667780;opacity:1}.select2-container--bootstrap.select2-container--focus .select2-selection:-ms-input-placeholder,.select2-container--bootstrap.select2-container--open .select2-selection:-ms-input-placeholder{color:#667780}.select2-container--bootstrap.select2-container--focus .select2-selection::-webkit-input-placeholder,.select2-container--bootstrap.select2-container--open .select2-selection::-webkit-input-placeholder{color:#667780}.select2-container--bootstrap.select2-container--focus .select2-selection.placeholder,.select2-container--bootstrap.select2-container--open .select2-selection.placeholder{color:#667780}.select2-container--bootstrap .select2-results__option--highlighted[aria-selected]{background-color:#edeeee;color:inherit}.select2-container--bootstrap.select2-container--disabled .select2-selection{background:#f6f7f7;border:1px solid rgba(21,20,26,.1);color:rgba(73,80,87,.23)}.CodeMirror-fullscreen,.editor-preview-side,.editor-toolbar.fullscreen{z-index:1040}.CodeMirror-fullscreen{background-color:#edeef0}.CodeMirror-fullscreen .CodeMirror-code,.CodeMirror-fullscreen .CodeMirror-scroll,.CodeMirror-fullscreen .CodeMirror-sizer,.CodeMirror-fullscreen .editor-preview-active{margin:0 auto;max-width:60em!important;position:relative}.CodeMirror-fullscreen .CodeMirror-sizer{max-width:100%}.CodeMirror-fullscreen .CodeMirror-vscrollbar{overflow:hidden}.CodeMirror-fullscreen .CodeMirror-scroll{overflow:auto!important}.editor-preview-side{border-right:none!important}.editor-toolbar.fullscreen{text-align:center}.CodeMirror.CodeMirror-fullscreen.CodeMirror-sided{right:0;margin:0;padding:0}.CodeMirror.CodeMirror-fullscreen.CodeMirror-sided .CodeMirror-scroll{border:none;margin:0;max-width:100%!important;width:100%}.simplemde-wrapper .CodeMirror{border:1px solid rgba(21,20,26,.1)}.simplemde-wrapper img{max-width:100%}.bootstrap-datetimepicker-widget.dropdown-menu{width:18rem}.bootstrap-datetimepicker-widget .table-condensed>tbody>tr>td,.bootstrap-datetimepicker-widget .table-condensed>tbody>tr>th,.bootstrap-datetimepicker-widget .table-condensed>tfoot>tr>td,.bootstrap-datetimepicker-widget .table-condensed>tfoot>tr>th,.bootstrap-datetimepicker-widget .table-condensed>thead>tr>td,.bootstrap-datetimepicker-widget .table-condensed>thead>tr>th{padding:4px}.flatpickr-wrapper{width:100%}.flatpickr-input.bootstrap-tagsinput[readonly],.flatpickr-input.chosen-choices[readonly],.flatpickr-input.chosen-single[readonly],.flatpickr-input.form-control[readonly]{background:#fff;color:#15141a}.CodeMirror-wrap pre{word-wrap:break-word;word-break:break-all}.codeflask code,.codeflask pre{background:none!important}.codeflask code[class*=language-],.codeflask pre[class*=language-]{line-height:20px;width:-moz-fit-content;width:fit-content}.codeflask .codeflask__flatten{margin:0;overflow:auto;padding:10px;text-align:right;white-space:pre}.codeflask.codeflask--has-line-numbers:before{border-left:1px solid rgba(21,20,26,.1)}.ql-editor{bottom:0;height:100%;right:0;padding:15px;position:absolute;top:0;width:100%}.ql-editor .ql-video{width:100%}.ql-picker-label svg{vertical-align:baseline}.ql-background .ql-picker-options [data-value=custom-color],.ql-color .ql-picker-options [data-value=custom-color]{background:none!important;height:20px!important;text-align:center;width:100%!important}.ql-background .ql-picker-options [data-value=custom-color]:before,.ql-color .ql-picker-options [data-value=custom-color]:before{content:"Custom Color"}.ql-background .ql-picker-options [data-value=custom-color]:hover,.ql-color .ql-picker-options [data-value=custom-color]:hover{border-color:transparent!important}.ql-container.ql-snow,.ql-toolbar.ql-snow{border:1px solid rgba(21,20,26,.1);font-family:var(--bs-font-sans-serif);font-size:1rem}.chart-container .axis,.chart-container .chart-label,.legend-dataset-text{color:#667780!important}.legend-dataset-text{font-weight:500!important}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:1rem}.toast-wrapper{position:fixed;left:1.5em;top:1.5em;width:20em;z-index:1030}@media (max-width:575.98px){.toast-wrapper{right:0;overflow:hidden;left:0;top:1.5em;width:100vw}.toast-wrapper .toast{-webkit-backdrop-filter:blur(1em);backdrop-filter:blur(1em);margin:0 auto;max-width:100vw}}.matrix div,.matrix span{border:none!important}.matrix .bootstrap-tagsinput,.matrix .chosen-choices,.matrix .chosen-single,.matrix .form-control,.matrix .select2-selection--single{border:none!important;font-weight:400;height:40px!important}.matrix .bootstrap-tagsinput:focus,.matrix .chosen-choices:focus,.matrix .chosen-single:focus,.matrix .form-control:focus,.matrix .select2-selection--single:focus{border-radius:0}.matrix .form-group{margin:0!important}.matrix .custom-control{margin-right:1em}.d2-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.d2-grid,.d2-grid dd{grid-column:span 2/span 2}.scroll-to-top{opacity:0}.scroll-to-top.show{opacity:1}.profile-container{backface-visibility:hidden;background:#131415;position:relative;transform:translateZ(0)}.profile-container a,.profile-container span,.profile-container svg{line-height:normal}.attach .spinner-border{display:none}.attach .attach-image{border:1px solid #000;height:12em;-o-object-fit:cover;object-fit:cover;position:relative;width:100%}.attach .attach-image:before{content:" ";display:block;height:100%;right:0;position:absolute;width:100%}.attach .attach-image:after{align-items:center;bottom:0;content:"🔗";display:flex;justify-content:center;right:0;position:absolute;left:0;text-align:center;top:0;width:100%}.attach .attach-image-placeholder{align-content:center;align-items:center;cursor:pointer;display:flex;height:12em}.attach:not([data-attach-loading-value="0"]) .spinner-border,.attach[aria-busy=true] .spinner-border{display:inline-block}.attach:not([data-attach-loading-value="0"]) .choose,.attach[aria-busy=true] .choose{display:none!important}.bg-gd{background-image:linear-gradient(-180deg,rgba(40,50,60,0) 0,rgba(40,50,60,.075))}.bg-gd,.bg-gd-dk{background-repeat:repeat-x;filter:none}.bg-gd-dk{background-image:linear-gradient(-180deg,rgba(40,50,60,0) 10%,rgba(40,50,60,.5))}.attach .attach-image:before,.bg-light,.dropzone .dz-preview .dz-details,.dropzone .dz-preview .dz-image img,.dropzone img:before,.dropzone-wrapper .dz-preview .dz-details,.dropzone-wrapper .dz-preview .dz-image img,.dropzone-wrapper img:before,.modal .modal-footer{background-color:#f8f9fa;color:#394247}.bg-dark,.graph-svg-tip{background-color:#1c1b22;color:#c2c0c8}.bg-dark a,.graph-svg-tip a{color:#eae9ec}.bg-dark a:hover,.graph-svg-tip a:hover{color:#fff}.bg-dark a.list-group-item:focus,.bg-dark a.list-group-item:hover,.graph-svg-tip a.list-group-item:focus,.graph-svg-tip a.list-group-item:hover{background-color:inherit}.bg-dark .nav>li.active>a,.bg-dark .nav>li:focus>a,.bg-dark .nav>li:hover>a,.graph-svg-tip .nav>li.active>a,.graph-svg-tip .nav>li:focus>a,.graph-svg-tip .nav>li:hover>a{background-color:#100f14;color:#fff}.bg-dark .nav>li>a,.graph-svg-tip .nav>li>a{color:#e2e1e5}.bg-dark .nav>li>a:focus,.bg-dark .nav>li>a:hover,.graph-svg-tip .nav>li>a:focus,.graph-svg-tip .nav>li>a:hover{background-color:#15141a}.bg-dark .nav .open>a,.graph-svg-tip .nav .open>a{background-color:#100f14}.bg-dark.navbar .nav>li.active>a,.navbar.graph-svg-tip .nav>li.active>a{background-color:#100f14;color:#fff}.bg-dark .open>a,.bg-dark .open>a:focus,.bg-dark .open>a:hover,.graph-svg-tip .open>a,.graph-svg-tip .open>a:focus,.graph-svg-tip .open>a:hover{color:#fff}.bg-dark .pagination .page-item.active .page-link,.bg-dark .pagination .page-item.active span,.bg-dark .pagination>li.active .page-link,.bg-dark .pagination>li.active span,.bg-dark .text-muted,.graph-svg-tip .pagination .page-item.active .page-link,.graph-svg-tip .pagination .page-item.active span,.graph-svg-tip .pagination>li.active .page-link,.graph-svg-tip .pagination>li.active span,.graph-svg-tip .pagination>li.active span:focus,.graph-svg-tip .pagination>li.active span:hover,.graph-svg-tip .text-muted,.pagination .page-item.active .bg-dark .page-link,.pagination .page-item.active .bg-dark span,.pagination .page-item.active .graph-svg-tip .page-link,.pagination .page-item.active .graph-svg-tip span,.pagination>li.active .bg-dark .page-link,.pagination>li.active .bg-dark span,.pagination>li.active .graph-svg-tip .page-link,.pagination>li.active .graph-svg-tip span,.pagination>li.active .graph-svg-tip span:focus,.pagination>li.active .graph-svg-tip span:hover{color:#8c8a98!important}.bg-black{background-color:#15141a;color:#b9b7c2}.bg-black a{color:#e1e1e5}.bg-black a:hover{color:#fff}.bg-black a.list-group-item:focus,.bg-black a.list-group-item:hover{background-color:inherit}.bg-black .nav>li.active>a,.bg-black .nav>li:focus>a,.bg-black .nav>li:hover>a{background-color:#09090c;color:#fff}.bg-black .nav>li>a{color:#d9d8de}.bg-black .nav>li>a:focus,.bg-black .nav>li>a:hover{background-color:#0e0d12}.bg-black .nav .open>a{background-color:#09090c}.bg-black.navbar .nav>li.active>a{background-color:#09090c;color:#fff}.bg-black .open>a,.bg-black .open>a:focus,.bg-black .open>a:hover{color:#fff}.bg-black .pagination .page-item.active .page-link,.bg-black .pagination .page-item.active span,.bg-black .pagination>li.active .page-link,.bg-black .pagination>li.active span,.bg-black .text-muted,.pagination .page-item.active .bg-black .page-link,.pagination .page-item.active .bg-black span,.pagination>li.active .bg-black .page-link,.pagination>li.active .bg-black span{color:#838093!important}.bg-primary{background-color:#007bff;color:#fff}.bg-primary a,.bg-primary a:hover{color:#fff}.bg-primary a.list-group-item:focus,.bg-primary a.list-group-item:hover{background-color:inherit}.bg-primary .nav>li.active>a,.bg-primary .nav>li:focus>a,.bg-primary .nav>li:hover>a{background-color:#006fe6;color:#fff}.bg-primary .nav>li>a{color:#f7f7f7}.bg-primary .nav>li>a:focus,.bg-primary .nav>li>a:hover{background-color:#0074f0}.bg-primary .nav .open>a{background-color:#006fe6}.bg-primary.navbar .nav>li.active>a{background-color:#006fe6;color:#fff}.bg-primary .open>a,.bg-primary .open>a:focus,.bg-primary .open>a:hover{color:#fff}.bg-primary .pagination .page-item.active .page-link,.bg-primary .pagination .page-item.active span,.bg-primary .pagination>li.active .page-link,.bg-primary .pagination>li.active span,.bg-primary .text-muted,.pagination .page-item.active .bg-primary .page-link,.pagination .page-item.active .bg-primary span,.pagination>li.active .bg-primary .page-link,.pagination>li.active .bg-primary span{color:#ccc!important}.bg-success{background-color:#28a745;color:#fff}.bg-success a,.bg-success a:hover{color:#fff}.bg-success a.list-group-item:focus,.bg-success a.list-group-item:hover{background-color:inherit}.bg-success .nav>li.active>a,.bg-success .nav>li:focus>a,.bg-success .nav>li:hover>a{background-color:#21953b;color:#fff}.bg-success .nav>li>a{color:#f7f7f7}.bg-success .nav>li>a:focus,.bg-success .nav>li>a:hover{background-color:#239d3f}.bg-success .nav .open>a{background-color:#21953b}.bg-success.navbar .nav>li.active>a{background-color:#21953b;color:#fff}.bg-success .open>a,.bg-success .open>a:focus,.bg-success .open>a:hover{color:#fff}.bg-success .pagination .page-item.active .page-link,.bg-success .pagination .page-item.active span,.bg-success .pagination>li.active .page-link,.bg-success .pagination>li.active span,.bg-success .text-muted,.pagination .page-item.active .bg-success .page-link,.pagination .page-item.active .bg-success span,.pagination>li.active .bg-success .page-link,.pagination>li.active .bg-success span{color:#ccc!important}.bg-info{background-color:#17a2b8}.bg-info,.bg-info a,.bg-info a:hover{color:#fff}.bg-info a.list-group-item:focus,.bg-info a.list-group-item:hover{background-color:inherit}.bg-info .nav>li.active>a,.bg-info .nav>li:focus>a,.bg-info .nav>li:hover>a{background-color:#1290a4;color:#fff}.bg-info .nav>li>a{color:#f7f7f7}.bg-info .nav>li>a:focus,.bg-info .nav>li>a:hover{background-color:#1398ad}.bg-info .nav .open>a{background-color:#1290a4}.bg-info.navbar .nav>li.active>a{background-color:#1290a4;color:#fff}.bg-info .open>a,.bg-info .open>a:focus,.bg-info .open>a:hover{color:#fff}.bg-info .pagination .page-item.active .page-link,.bg-info .pagination .page-item.active span,.bg-info .pagination>li.active .page-link,.bg-info .pagination>li.active span,.bg-info .text-muted,.pagination .page-item.active .bg-info .page-link,.pagination .page-item.active .bg-info span,.pagination>li.active .bg-info .page-link,.pagination>li.active .bg-info span{color:#ccc!important}.bg-warning{background-color:#ffc107;color:#fff}.bg-warning a,.bg-warning a:hover{color:#fff}.bg-warning a.list-group-item:focus,.bg-warning a.list-group-item:hover{background-color:inherit}.bg-warning .nav>li.active>a,.bg-warning .nav>li:focus>a,.bg-warning .nav>li:hover>a{background-color:#edb100;color:#fff}.bg-warning .nav>li>a{color:#f7f7f7}.bg-warning .nav>li>a:focus,.bg-warning .nav>li>a:hover{background-color:#f7b900}.bg-warning .nav .open>a{background-color:#edb100}.bg-warning.navbar .nav>li.active>a{background-color:#edb100;color:#fff}.bg-warning .open>a,.bg-warning .open>a:focus,.bg-warning .open>a:hover{color:#fff}.bg-warning .pagination .page-item.active .page-link,.bg-warning .pagination .page-item.active span,.bg-warning .pagination>li.active .page-link,.bg-warning .pagination>li.active span,.bg-warning .text-muted,.pagination .page-item.active .bg-warning .page-link,.pagination .page-item.active .bg-warning span,.pagination>li.active .bg-warning .page-link,.pagination>li.active .bg-warning span{color:#ccc!important}.bg-danger{background-color:#dc3545;color:#fff}.bg-danger a,.bg-danger a:hover{color:#fff}.bg-danger a.list-group-item:focus,.bg-danger a.list-group-item:hover{background-color:inherit}.bg-danger .nav>li.active>a,.bg-danger .nav>li:focus>a,.bg-danger .nav>li:hover>a{background-color:#d62133;color:#fff}.bg-danger .nav>li>a{color:#f7f7f7}.bg-danger .nav>li>a:focus,.bg-danger .nav>li>a:hover{background-color:#dd2536}.bg-danger .nav .open>a{background-color:#d62133}.bg-danger.navbar .nav>li.active>a{background-color:#d62133;color:#fff}.bg-danger .open>a,.bg-danger .open>a:focus,.bg-danger .open>a:hover{color:#fff}.bg-danger .pagination .page-item.active .page-link,.bg-danger .pagination .page-item.active span,.bg-danger .pagination>li.active .page-link,.bg-danger .pagination>li.active span,.bg-danger .text-muted,.pagination .page-item.active .bg-danger .page-link,.pagination .page-item.active .bg-danger span,.pagination>li.active .bg-danger .page-link,.pagination>li.active .bg-danger span{color:#ccc!important}.bg-white,.dropzone .dz-preview,.dropzone-wrapper .dz-preview,.editor-preview-side,.layout{background-color:#fff;color:#394247}.bg-white a,.dropzone .dz-preview a,.dropzone-wrapper .dz-preview a,.editor-preview-side a,.layout a{color:#171b1d}.bg-white a:hover,.dropzone .dz-preview a:hover,.dropzone-wrapper .dz-preview a:hover,.editor-preview-side a:hover,.layout a:hover{color:#000!important}.bg-white .pagination .page-item.active .page-link,.bg-white .pagination .page-item.active span,.bg-white .pagination>li.active .page-link,.bg-white .pagination>li.active span,.bg-white .text-muted,.dropzone .dz-preview .pagination .page-item.active .page-link,.dropzone .dz-preview .pagination .page-item.active span,.dropzone .dz-preview .pagination>li.active .page-link,.dropzone .dz-preview .pagination>li.active span,.dropzone .dz-preview .text-muted,.dropzone-wrapper .dz-preview .pagination .page-item.active .page-link,.dropzone-wrapper .dz-preview .pagination .page-item.active span,.dropzone-wrapper .dz-preview .pagination>li.active .page-link,.dropzone-wrapper .dz-preview .pagination>li.active span,.dropzone-wrapper .dz-preview .text-muted,.editor-preview-side .pagination .page-item.active .page-link,.editor-preview-side .pagination .page-item.active span,.editor-preview-side .pagination>li.active .page-link,.editor-preview-side .pagination>li.active span,.editor-preview-side .text-muted,.layout .pagination .page-item.active .page-link,.layout .pagination .page-item.active span,.layout .pagination>li.active .page-link,.layout .pagination>li.active span,.layout .text-muted,.pagination .page-item.active .bg-white .page-link,.pagination .page-item.active .bg-white span,.pagination .page-item.active .dropzone .dz-preview .page-link,.pagination .page-item.active .dropzone .dz-preview span,.pagination .page-item.active .dropzone-wrapper .dz-preview .page-link,.pagination .page-item.active .dropzone-wrapper .dz-preview span,.pagination .page-item.active .editor-preview-side .page-link,.pagination .page-item.active .editor-preview-side span,.pagination .page-item.active .layout .page-link,.pagination .page-item.active .layout span,.pagination>li.active .bg-white .page-link,.pagination>li.active .bg-white span,.pagination>li.active .dropzone .dz-preview .page-link,.pagination>li.active .dropzone .dz-preview span,.pagination>li.active .dropzone-wrapper .dz-preview .page-link,.pagination>li.active .dropzone-wrapper .dz-preview span,.pagination>li.active .editor-preview-side .page-link,.pagination>li.active .editor-preview-side span,.pagination>li.active .layout .page-link,.pagination>li.active .layout span{color:#667780!important}.bg-white .dk,.bg-white .dker,.bg-white .lt,.bg-white .lter,.bg-white-only,.dropzone .dz-preview .dk,.dropzone .dz-preview .dker,.dropzone .dz-preview .lt,.dropzone .dz-preview .lter,.dropzone-wrapper .dz-preview .dk,.dropzone-wrapper .dz-preview .dker,.dropzone-wrapper .dz-preview .lt,.dropzone-wrapper .dz-preview .lter,.editor-preview-side .dk,.editor-preview-side .dker,.editor-preview-side .lt,.editor-preview-side .lter,.layout .dk,.layout .dker,.layout .lt,.layout .lter{background-color:#fff}.bg-white-opacity{background-color:hsla(0,0%,100%,.5)}.bg-black-opacity{background-color:rgba(32,43,54,.5)}.attach a.attach-image:hover:before,.dropzone .dz-preview a.dz-details:hover,.dropzone-wrapper .dz-preview a.dz-details:hover,.modal a.modal-footer:hover,a.bg-light:hover{color:#171b1d}a.bg-name:hover{background-color:#006fe6}a.text-primary:hover{color:#006fe6}.text-primary{color:#007bff!important}a.bg-name:hover{background-color:#148ea1}a.text-info:hover{color:#148ea1}.text-info{color:#17a2b8!important}a.bg-name:hover{background-color:#23923d}a.text-success:hover{color:#23923d}.text-success{color:#28a745!important}a.bg-name:hover{background-color:#edb100}a.text-warning:hover{color:#edb100}.text-warning{color:#ffc107!important}a.bg-name:hover{background-color:#d32535}a.text-danger:hover{color:#d32535}.text-danger{color:#dc3545!important}a.bg-name:hover{background-color:#101014}a.text-dark:hover{color:#101014}.text-dark{color:#1c1b22!important}a.bg-name:hover{background-color:#09090c}a.text-black:hover{color:#09090c}.text-black{color:#15141a!important}.text-white{color:#fff}.text-black{color:#000}.pagination .page-item.active .page-link,.pagination .page-item.active .page-link:focus,.pagination .page-item.active .page-link:hover,.pagination .page-item.active span,.pagination .page-item.active span:focus,.pagination .page-item.active span:hover,.pagination>li.active .page-link,.pagination>li.active .page-link:focus,.pagination>li.active .page-link:hover,.pagination>li.active span,.pagination>li.active span:focus,.pagination>li.active span:hover,.text-muted{color:#667780!important}.show{visibility:visible}.line{font-size:0;height:2px;margin:10px 0;overflow:hidden;width:100%}.line-dashed{background-color:transparent;border-style:dashed!important}.line-dashed,.no-line{border-width:0}.no-border,.no-borders{border:0 transparent!important}.no-radius{border-radius:0}.block.hide,.none{display:none}.clear{display:block;overflow:hidden}.no-bg{background-color:transparent;color:inherit}.no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.l-h{line-height:1.5}.l-h-0x{line-height:0}.l-h-1x{line-height:1.2}.l-h-2x{line-height:2rem}.l-s-1x{letter-spacing:1px}.l-s-2x{letter-spacing:2px}.l-s-3x{letter-spacing:3px}.text-ellipsis{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-u-c{text-transform:uppercase}.text-l-t{text-decoration:line-through}.text-u-l{text-decoration:underline}.active>.auto .text,.active>.text,.text-active{display:none!important}.active>.auto .text-active,.active>.text-active{display:inline-block!important}.padder{padding-right:15px;padding-left:15px}.b{border:1px solid rgba(0,0,0,.125)}.b-a{border:1px solid #e9ecef}.b-t{border-top:1px solid #e9ecef}.b-r{border-left:1px solid #e9ecef}.b-b{border-bottom:1px solid #e9ecef}.b-l{border-right:1px solid #e9ecef}.b-light{border-color:#f8f9fa}.b-black,.b-dark{border-color:#1c1b22}.b-primary{border-color:#007bff}.b-success{border-color:#28a745}.b-info{border-color:#17a2b8}.b-warning{border-color:#ffc107}.b-danger{border-color:#dc3545}.b-white{border-color:#fff}.b-dashed{border-style:dashed!important}.b-l-light{border-right-color:#f8f9fa}.b-l-black,.b-l-dark{border-right-color:#1c1b22}.b-l-primary{border-right-color:#007bff}.b-l-success{border-right-color:#28a745}.b-l-info{border-right-color:#17a2b8}.b-l-warning{border-right-color:#ffc107}.b-l-danger{border-right-color:#dc3545}.b-l-white{border-right-color:#fff}.b-l-2x{border-right-width:2px}.b-l-3x{border-right-width:3px}.b-l-4x{border-right-width:4px}.b-l-5x{border-right-width:5px}.b-2x{border-width:2px}.b-3x{border-width:3px}.b-4x{border-width:4px}.b-5x{border-width:5px}.r{border-radius:.2rem .2rem .2rem .2rem}.dropzone .dz-preview .dz-image,.dropzone-wrapper .dz-preview .dz-image,.r-2x{border-radius:.4rem}.r-3x{border-radius:.6rem}.r-l{border-radius:0 .2rem .2rem 0}.r-r{border-radius:.2rem 0 0 .2rem}.r-t{border-radius:.2rem .2rem 0 0}.r-b{border-radius:0 0 .2rem .2rem}.avatar{border-radius:500px;display:block;position:relative;transition:all .34s;white-space:nowrap}.avatar img{border-radius:500px;width:100%}.avatar i{border:2px solid;border-radius:100%;height:10px;right:0;margin:2px;position:absolute;top:0;width:10px}.avatar i.bottom,.avatar i.right{right:auto;left:0}.avatar i.bottom,.avatar i.left{bottom:0;top:auto}.avatar i.on{background-color:#28a745}.avatar i.off{background-color:#667780}.avatar i.busy{background-color:#dc3545}.avatar i.away{background-color:#ffc107}.avatar.thumb-md i{height:12px;margin:3px;width:12px}.avatar.thumb-sm i{margin:1px}.avatar.thumb-xs i{margin:0}.avatar-group .thumb-xs{margin-right:-.40625rem}.w-1x{width:1rem}.w-2x{width:2rem}.w-3x{width:3rem}.w-xxs{width:60px}.w-xs{width:90px}.w-sm{width:150px}.w{width:200px}.w-md{min-width:240px}.w-lg{width:280px}.w-xl{width:320px}.w-xxl{width:360px}.w-auto{width:auto}.h-auto{height:auto}.h-full{height:100%}.thumb-xl{min-width:128px;width:128px}.thumb-lg,.thumb-xl{display:inline-block}.thumb-lg{min-width:96px;width:96px}.thumb-md{min-width:64px;width:64px}.thumb,.thumb-md{display:inline-block}.thumb{min-width:50px;width:50px}.thumb-sm{min-width:40px;width:40px}.thumb-sm,.thumb-xs{display:inline-block}.thumb-xs{min-width:34px;width:34px}.thumb-xxs{display:inline-block;min-width:30px;width:30px}.thumb-wrapper{border:1px solid #e9ecef;padding:2px}.thumb img,.thumb-btn img,.thumb-lg img,.thumb-md img,.thumb-sm img,.thumb-xs img{height:auto;max-width:100%;vertical-align:middle}.img-card,.img-full,.img-full img{width:100%}.img-card{height:100%;-o-object-fit:cover;object-fit:cover}.scrollable{-webkit-overflow-scrolling:touch;overflow-x:hidden;overflow-y:auto}.scrollable.hover{overflow-y:hidden!important}.scrollable.hover:hover{overflow:visible!important}.scrollable.hover:hover,.smart .scrollable{overflow-y:auto!important}.scroll-x,.scroll-y{-webkit-overflow-scrolling:touch;overflow:hidden}.scroll-y{overflow-y:auto}.scroll-x{overflow-x:auto}.backdrop{bottom:0;right:0;position:absolute;left:0;top:0;z-index:1050}.backdrop.fade{filter:alpha(opacity=0);opacity:0}.backdrop.in{filter:alpha(opacity=80);opacity:.8}.center{margin:0 auto}.custom-checkbox,.v-center{align-items:center;display:flex}@media (min-width:768px){.v-md-center{align-items:center;display:flex}}.no-resize{resize:none}.top-left{right:0;top:0}.top-left,.top-right{position:absolute!important}.top-right{left:0;top:1px}.bottom-left{bottom:1px;right:0;position:absolute!important}.bottom-right{left:0}.bottom-right,.pull-bottom{bottom:0;position:absolute!important}.login-container .pull-bottom{width:100%}.pull-up{position:absolute!important;top:0}.cursor{cursor:pointer}.cursor-wait{cursor:wait}.cursor-move{cursor:move}.pull-left{float:right}.pull-right{float:left}.w-b-k{word-wrap:break-word;word-break:keep-all}.w-s-n{white-space:normal}.opacity{filter:alpha(opacity=${opacity-ie});opacity:.5}.divider{border-bottom:1px solid rgba(233,236,239,.05)}.border-dashed{border:1px dashed #e9ecef!important}.content-read{max-width:600px}.table thead tr th{border-top:0;color:rgba(28,27,34,.55);font-size:.9em;font-weight:600;vertical-align:baseline}.table thead tr th:first-child{padding-right:1.5rem!important}.table thead tr th:last-child{padding-left:1.5rem!important}.table thead tr th .form-group.row select.bootstrap-tagsinput,.table thead tr th .form-group.row select.chosen-choices,.table thead tr th .form-group.row select.chosen-single,.table thead tr th .form-group.row select.form-control{padding-right:.6rem}.table thead tr th .form-group.row input.bootstrap-tagsinput,.table thead tr th .form-group.row input.chosen-choices,.table thead tr th .form-group.row input.chosen-single,.table thead tr th .form-group.row input.form-control{padding:0 .3rem}.table thead tr th .btn-link:focus,.table thead tr th .btn-link:hover{text-decoration:initial!important}.table thead tr th .dropdown{position:inherit}.table tbody tr td{border-top:0;font-size:.875rem;padding:.8rem 1rem;vertical-align:middle;word-break:break-all}.table tbody tr td:first-child{padding-right:1.5rem!important}.table tbody tr td:last-child{padding-left:1.5rem!important}.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-edit,.dropzone .dz-preview .table tbody tr td>div>.form-group>.btn-remove,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-edit,.dropzone-wrapper .dz-preview .table tbody tr td>div>.form-group>.btn-remove,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-edit,.table tbody tr .dropzone .dz-preview td>div>.form-group>.btn-remove,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-edit,.table tbody tr .dropzone-wrapper .dz-preview td>div>.form-group>.btn-remove,.table tbody tr td>div>.form-group>.btn{display:inline-flex;width:auto}.table-compact>:not(caption)>*>*{padding:.25rem!important}.fht-table{margin-bottom:0!important}.table-notification .table tbody tr td{padding:0!important}.bootstrap-tagsinput,.chosen-choices,.chosen-single,.form-control{-webkit-appearance:none;-moz-appearance:none;background:#fff none;border:1px solid rgba(21,20,26,.1);border-radius:.125rem;box-shadow:none;color:#15141a;font-weight:400;line-height:normal;min-height:2.45rem;outline:0;transition:all .12s ease;transition:background .2s linear 0s;vertical-align:middle}.bootstrap-tagsinput:-moz-placeholder,.chosen-choices:-moz-placeholder,.chosen-single:-moz-placeholder,.form-control:-moz-placeholder{color:#667780}.bootstrap-tagsinput::-moz-placeholder,.chosen-choices::-moz-placeholder,.chosen-single::-moz-placeholder,.form-control::-moz-placeholder{color:#667780;opacity:1}.bootstrap-tagsinput:-ms-input-placeholder,.chosen-choices:-ms-input-placeholder,.chosen-single:-ms-input-placeholder,.form-control:-ms-input-placeholder{color:#667780}.bootstrap-tagsinput::-webkit-input-placeholder,.chosen-choices::-webkit-input-placeholder,.chosen-single::-webkit-input-placeholder,.form-control::-webkit-input-placeholder{color:#667780}.form-control.placeholder,.placeholder.bootstrap-tagsinput,.placeholder.chosen-choices,.placeholder.chosen-single{color:#667780}.bootstrap-tagsinput:focus,.chosen-choices:focus,.chosen-single:focus,.form-control:focus{background-color:#edeeee;border-color:rgba(21,20,26,.1);box-shadow:none;color:#15141a;outline:0!important}.bootstrap-tagsinput:focus:-moz-placeholder,.chosen-choices:focus:-moz-placeholder,.chosen-single:focus:-moz-placeholder,.form-control:focus:-moz-placeholder{color:#1c1b22}.bootstrap-tagsinput:focus::-moz-placeholder,.chosen-choices:focus::-moz-placeholder,.chosen-single:focus::-moz-placeholder,.form-control:focus::-moz-placeholder{color:#1c1b22;opacity:1}.bootstrap-tagsinput:focus:-ms-input-placeholder,.chosen-choices:focus:-ms-input-placeholder,.chosen-single:focus:-ms-input-placeholder,.form-control:focus:-ms-input-placeholder{color:#1c1b22}.bootstrap-tagsinput:focus::-webkit-input-placeholder,.chosen-choices:focus::-webkit-input-placeholder,.chosen-single:focus::-webkit-input-placeholder,.form-control:focus::-webkit-input-placeholder{color:#1c1b22}.bootstrap-tagsinput:focus.placeholder,.chosen-choices:focus.placeholder,.chosen-single:focus.placeholder,.form-control:focus.placeholder{color:#1c1b22}.bootstrap-tagsinput[disabled],.bootstrap-tagsinput[readonly],.chosen-choices[disabled],.chosen-choices[readonly],.chosen-single[disabled],.chosen-single[readonly],.form-control[disabled],.form-control[readonly],fieldset[disabled] .bootstrap-tagsinput,fieldset[disabled] .chosen-choices,fieldset[disabled] .chosen-single,fieldset[disabled] .form-control{background:#f6f7f7;color:rgba(73,80,87,.23)}.bootstrap-tagsinput select,.chosen-choices select,.chosen-single select,.form-control select{-moz-appearance:none;text-indent:.01px;text-overflow:""}.input-group{max-width:600px}.dropzone .dz-preview .input-group .input-group-btn .btn-remove,.dropzone-wrapper .dz-preview .input-group .input-group-btn .btn-remove,.input-group .input-group-btn .btn-default,.input-group .input-group-btn .dropzone .dz-preview .btn-remove,.input-group .input-group-btn .dropzone-wrapper .dz-preview .btn-remove{height:35px}textarea.bootstrap-tagsinput,textarea.chosen-choices,textarea.chosen-single,textarea.form-control{height:auto}select.bootstrap-tagsinput,select.chosen-choices,select.chosen-single,select.form-control{height:35px!important}.input-icon{max-width:600px;position:relative}.input-icon .bootstrap-tagsinput:not(:last-child),.input-icon .chosen-choices:not(:last-child),.input-icon .chosen-single:not(:last-child),.input-icon .form-control:not(:last-child){padding-left:2.5rem}.input-icon .bootstrap-tagsinput:not(:first-child),.input-icon .chosen-choices:not(:first-child),.input-icon .chosen-single:not(:first-child),.input-icon .form-control:not(:first-child){padding-right:2.5rem}.input-icon-addon{align-items:center;bottom:0;color:#667780;display:flex;justify-content:center;right:0;min-width:2.5rem;position:absolute;top:0}.input-icon-addon:last-child{right:auto;left:0}.custom-checkbox{height:35px}.custom-control-label{padding-top:.1em}.bg-dark .bootstrap-tagsinput,.bg-dark .bootstrap-tagsinput:focus,.bg-dark .chosen-choices,.bg-dark .chosen-choices:focus,.bg-dark .chosen-single,.bg-dark .chosen-single:focus,.bg-dark .form-control,.bg-dark .form-control:focus,.graph-svg-tip .bootstrap-tagsinput,.graph-svg-tip .bootstrap-tagsinput:focus,.graph-svg-tip .chosen-choices,.graph-svg-tip .chosen-choices:focus,.graph-svg-tip .chosen-single,.graph-svg-tip .chosen-single:focus,.graph-svg-tip .form-control,.graph-svg-tip .form-control:focus{border:1px solid rgba(233,236,239,.05)}.form-label{display:block;font-size:.875rem;font-weight:500;margin-bottom:.375rem}.cropper-preview,.picture-preview{max-height:calc(var(--cropper-height, 600)*1px);max-width:calc(var(--cropper-width, 600)*1px);-o-object-fit:cover;object-fit:cover}.form-group:not(:last-child){margin-bottom:1em}.bootstrap-tagsinput,.chosen-choices,.chosen-single,.form-control,.form-range{max-width:600px}.img-rounded{border-radius:6px}.dropzone,.dropzone-wrapper{background:inherit;border:none;overflow-x:hidden;padding:10px 0 0}.dropzone-wrapper.dz-drag-hover,.dz-drag-hover.dropzone,.dz-drag-hover.dropzone-wrapper{border:none}.dropzone .dz-preview,.dropzone-wrapper .dz-preview{float:right;margin:0 0 .5rem .5rem}.dropzone .dz-preview .dz-details,.dropzone-wrapper .dz-preview .dz-details{background-color:inherit;border-radius:.4rem!important;height:100%}.dropzone .dz-preview .dz-image,.dropzone-wrapper .dz-preview .dz-image{border:none;height:8em;max-width:100%}.dropzone .dz-preview .dz-image img,.dropzone-wrapper .dz-preview .dz-image img{border-radius:.4rem!important;height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.dropzone .dz-preview .btn-remove,.dropzone-wrapper .dz-preview .btn-remove{border-radius:50px;padding:2px 7px;position:absolute;left:-10px;top:-10px;z-index:50}.dropzone .dz-preview .btn-edit,.dropzone-wrapper .dz-preview .btn-edit{align-items:center;background-color:hsla(0,0%,100%,.4);bottom:0;display:none;justify-content:center;right:0;padding:0 .6rem;position:absolute;text-align:center;width:100%;z-index:50}.dropzone .dz-preview .btn-edit>i,.dropzone-wrapper .dz-preview .btn-edit>i{cursor:pointer}.dropzone .dz-preview .btn-edit:focus,.dropzone-wrapper .dz-preview .btn-edit:focus{box-shadow:none}.dropzone .dz-preview:hover .btn-edit,.dropzone-wrapper .dz-preview:hover .btn-edit{display:block}.dropzone img:before,.dropzone-wrapper img:before{content:" ";display:block;height:100%;right:0;position:absolute;width:100%}.dropzone img:after,.dropzone-wrapper img:after{align-items:center;bottom:0;content:"🔗";display:flex;justify-content:center;right:0;position:absolute;left:0;text-align:center;top:0;width:100%}.dropzone .dz-message,.dropzone-wrapper .dz-message{margin:0 0 .5rem .5rem}.dropzone .svg :hover,.dropzone a :hover,.dropzone-wrapper .svg :hover,.dropzone-wrapper a :hover{cursor:pointer!important}.dropzone .dz-clickable .btn:hover,.dropzone .dz-clickable .dz-preview .btn-edit:hover,.dropzone .dz-clickable .dz-preview .btn-remove:hover,.dropzone .dz-preview .dropzone-wrapper .dz-clickable .btn-edit:hover,.dropzone .dz-preview .dropzone-wrapper .dz-clickable .btn-remove:hover,.dropzone .dz-preview .dz-clickable .btn-edit:hover,.dropzone .dz-preview .dz-clickable .btn-remove:hover,.dropzone .media-item,.dropzone .media-item *,.dropzone .modal button:hover,.dropzone-wrapper .dz-clickable .btn:hover,.dropzone-wrapper .dz-clickable .dz-preview .btn-edit:hover,.dropzone-wrapper .dz-clickable .dz-preview .btn-remove:hover,.dropzone-wrapper .dz-preview .dz-clickable .btn-edit:hover,.dropzone-wrapper .dz-preview .dz-clickable .btn-remove:hover,.dropzone-wrapper .media-item,.dropzone-wrapper .media-item *,.dropzone-wrapper .modal button:hover{cursor:pointer}.turbo-progress-bar{background-color:#007bff;height:2px}.dropdown-menu.show,.media-results *{animation:smooth-appearance .24s ease-in}@keyframes smooth-appearance{0%{opacity:.1}25%{opacity:.5}50%{opacity:.8}to{opacity:1}}.accordion-heading .btn:hover,.accordion-heading .dropzone .dz-preview .btn-edit:hover,.accordion-heading .dropzone .dz-preview .btn-remove:hover,.accordion-heading .dropzone-wrapper .dz-preview .btn-edit:hover,.accordion-heading .dropzone-wrapper .dz-preview .btn-remove:hover,.dropzone .dz-preview .accordion-heading .btn-edit:hover,.dropzone .dz-preview .accordion-heading .btn-remove:hover,.dropzone-wrapper .dz-preview .accordion-heading .btn-edit:hover,.dropzone-wrapper .dz-preview .accordion-heading .btn-remove:hover{text-decoration:none}.ts-control{box-shadow:none!important}.ts-control>input{min-width:auto}
-
-/*# sourceMappingURL=orchid.rtl.css.map*/
\ No newline at end of file
diff --git a/public/js/orchid.js b/public/js/orchid.js
index 0136b3e68..e69de29bb 100644
--- a/public/js/orchid.js
+++ b/public/js/orchid.js
@@ -1,19423 +0,0 @@
-(self["webpackChunk"] = self["webpackChunk"] || []).push([["/js/orchid"],{
-
-/***/ "./node_modules/@hotwired/stimulus-webpack-helpers/dist/stimulus-webpack-helpers.js":
-/*!******************************************************************************************!*\
- !*** ./node_modules/@hotwired/stimulus-webpack-helpers/dist/stimulus-webpack-helpers.js ***!
- \******************************************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ definitionForModuleAndIdentifier: () => (/* binding */ definitionForModuleAndIdentifier),
-/* harmony export */ definitionForModuleWithContextAndKey: () => (/* binding */ definitionForModuleWithContextAndKey),
-/* harmony export */ definitionsFromContext: () => (/* binding */ definitionsFromContext),
-/* harmony export */ identifierForContextKey: () => (/* binding */ identifierForContextKey)
-/* harmony export */ });
-/*
-Stimulus Webpack Helpers 1.0.0
-Copyright © 2021 Basecamp, LLC
- */
-function definitionsFromContext(context) {
- return context.keys()
- .map((key) => definitionForModuleWithContextAndKey(context, key))
- .filter((value) => value);
-}
-function definitionForModuleWithContextAndKey(context, key) {
- const identifier = identifierForContextKey(key);
- if (identifier) {
- return definitionForModuleAndIdentifier(context(key), identifier);
- }
-}
-function definitionForModuleAndIdentifier(module, identifier) {
- const controllerConstructor = module.default;
- if (typeof controllerConstructor == "function") {
- return { identifier, controllerConstructor };
- }
-}
-function identifierForContextKey(key) {
- const logicalName = (key.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/) || [])[1];
- if (logicalName) {
- return logicalName.replace(/_/g, "-").replace(/\//g, "--");
- }
-}
-
-
-
-
-/***/ }),
-
-/***/ "./node_modules/@hotwired/stimulus/dist/stimulus.js":
-/*!**********************************************************!*\
- !*** ./node_modules/@hotwired/stimulus/dist/stimulus.js ***!
- \**********************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ Application: () => (/* binding */ Application),
-/* harmony export */ AttributeObserver: () => (/* binding */ AttributeObserver),
-/* harmony export */ Context: () => (/* binding */ Context),
-/* harmony export */ Controller: () => (/* binding */ Controller),
-/* harmony export */ ElementObserver: () => (/* binding */ ElementObserver),
-/* harmony export */ IndexedMultimap: () => (/* binding */ IndexedMultimap),
-/* harmony export */ Multimap: () => (/* binding */ Multimap),
-/* harmony export */ SelectorObserver: () => (/* binding */ SelectorObserver),
-/* harmony export */ StringMapObserver: () => (/* binding */ StringMapObserver),
-/* harmony export */ TokenListObserver: () => (/* binding */ TokenListObserver),
-/* harmony export */ ValueListObserver: () => (/* binding */ ValueListObserver),
-/* harmony export */ add: () => (/* binding */ add),
-/* harmony export */ defaultSchema: () => (/* binding */ defaultSchema),
-/* harmony export */ del: () => (/* binding */ del),
-/* harmony export */ fetch: () => (/* binding */ fetch),
-/* harmony export */ prune: () => (/* binding */ prune)
-/* harmony export */ });
-/*
-Stimulus 3.2.1
-Copyright © 2023 Basecamp, LLC
- */
-class EventListener {
- constructor(eventTarget, eventName, eventOptions) {
- this.eventTarget = eventTarget;
- this.eventName = eventName;
- this.eventOptions = eventOptions;
- this.unorderedBindings = new Set();
- }
- connect() {
- this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);
- }
- disconnect() {
- this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);
- }
- bindingConnected(binding) {
- this.unorderedBindings.add(binding);
- }
- bindingDisconnected(binding) {
- this.unorderedBindings.delete(binding);
- }
- handleEvent(event) {
- const extendedEvent = extendEvent(event);
- for (const binding of this.bindings) {
- if (extendedEvent.immediatePropagationStopped) {
- break;
- }
- else {
- binding.handleEvent(extendedEvent);
- }
- }
- }
- hasBindings() {
- return this.unorderedBindings.size > 0;
- }
- get bindings() {
- return Array.from(this.unorderedBindings).sort((left, right) => {
- const leftIndex = left.index, rightIndex = right.index;
- return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;
- });
- }
-}
-function extendEvent(event) {
- if ("immediatePropagationStopped" in event) {
- return event;
- }
- else {
- const { stopImmediatePropagation } = event;
- return Object.assign(event, {
- immediatePropagationStopped: false,
- stopImmediatePropagation() {
- this.immediatePropagationStopped = true;
- stopImmediatePropagation.call(this);
- },
- });
- }
-}
-
-class Dispatcher {
- constructor(application) {
- this.application = application;
- this.eventListenerMaps = new Map();
- this.started = false;
- }
- start() {
- if (!this.started) {
- this.started = true;
- this.eventListeners.forEach((eventListener) => eventListener.connect());
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- this.eventListeners.forEach((eventListener) => eventListener.disconnect());
- }
- }
- get eventListeners() {
- return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);
- }
- bindingConnected(binding) {
- this.fetchEventListenerForBinding(binding).bindingConnected(binding);
- }
- bindingDisconnected(binding, clearEventListeners = false) {
- this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);
- if (clearEventListeners)
- this.clearEventListenersForBinding(binding);
- }
- handleError(error, message, detail = {}) {
- this.application.handleError(error, `Error ${message}`, detail);
- }
- clearEventListenersForBinding(binding) {
- const eventListener = this.fetchEventListenerForBinding(binding);
- if (!eventListener.hasBindings()) {
- eventListener.disconnect();
- this.removeMappedEventListenerFor(binding);
- }
- }
- removeMappedEventListenerFor(binding) {
- const { eventTarget, eventName, eventOptions } = binding;
- const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);
- const cacheKey = this.cacheKey(eventName, eventOptions);
- eventListenerMap.delete(cacheKey);
- if (eventListenerMap.size == 0)
- this.eventListenerMaps.delete(eventTarget);
- }
- fetchEventListenerForBinding(binding) {
- const { eventTarget, eventName, eventOptions } = binding;
- return this.fetchEventListener(eventTarget, eventName, eventOptions);
- }
- fetchEventListener(eventTarget, eventName, eventOptions) {
- const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);
- const cacheKey = this.cacheKey(eventName, eventOptions);
- let eventListener = eventListenerMap.get(cacheKey);
- if (!eventListener) {
- eventListener = this.createEventListener(eventTarget, eventName, eventOptions);
- eventListenerMap.set(cacheKey, eventListener);
- }
- return eventListener;
- }
- createEventListener(eventTarget, eventName, eventOptions) {
- const eventListener = new EventListener(eventTarget, eventName, eventOptions);
- if (this.started) {
- eventListener.connect();
- }
- return eventListener;
- }
- fetchEventListenerMapForEventTarget(eventTarget) {
- let eventListenerMap = this.eventListenerMaps.get(eventTarget);
- if (!eventListenerMap) {
- eventListenerMap = new Map();
- this.eventListenerMaps.set(eventTarget, eventListenerMap);
- }
- return eventListenerMap;
- }
- cacheKey(eventName, eventOptions) {
- const parts = [eventName];
- Object.keys(eventOptions)
- .sort()
- .forEach((key) => {
- parts.push(`${eventOptions[key] ? "" : "!"}${key}`);
- });
- return parts.join(":");
- }
-}
-
-const defaultActionDescriptorFilters = {
- stop({ event, value }) {
- if (value)
- event.stopPropagation();
- return true;
- },
- prevent({ event, value }) {
- if (value)
- event.preventDefault();
- return true;
- },
- self({ event, value, element }) {
- if (value) {
- return element === event.target;
- }
- else {
- return true;
- }
- },
-};
-const descriptorPattern = /^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;
-function parseActionDescriptorString(descriptorString) {
- const source = descriptorString.trim();
- const matches = source.match(descriptorPattern) || [];
- let eventName = matches[2];
- let keyFilter = matches[3];
- if (keyFilter && !["keydown", "keyup", "keypress"].includes(eventName)) {
- eventName += `.${keyFilter}`;
- keyFilter = "";
- }
- return {
- eventTarget: parseEventTarget(matches[4]),
- eventName,
- eventOptions: matches[7] ? parseEventOptions(matches[7]) : {},
- identifier: matches[5],
- methodName: matches[6],
- keyFilter: matches[1] || keyFilter,
- };
-}
-function parseEventTarget(eventTargetName) {
- if (eventTargetName == "window") {
- return window;
- }
- else if (eventTargetName == "document") {
- return document;
- }
-}
-function parseEventOptions(eventOptions) {
- return eventOptions
- .split(":")
- .reduce((options, token) => Object.assign(options, { [token.replace(/^!/, "")]: !/^!/.test(token) }), {});
-}
-function stringifyEventTarget(eventTarget) {
- if (eventTarget == window) {
- return "window";
- }
- else if (eventTarget == document) {
- return "document";
- }
-}
-
-function camelize(value) {
- return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());
-}
-function namespaceCamelize(value) {
- return camelize(value.replace(/--/g, "-").replace(/__/g, "_"));
-}
-function capitalize(value) {
- return value.charAt(0).toUpperCase() + value.slice(1);
-}
-function dasherize(value) {
- return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);
-}
-function tokenize(value) {
- return value.match(/[^\s]+/g) || [];
-}
-
-function isSomething(object) {
- return object !== null && object !== undefined;
-}
-function hasProperty(object, property) {
- return Object.prototype.hasOwnProperty.call(object, property);
-}
-
-const allModifiers = ["meta", "ctrl", "alt", "shift"];
-class Action {
- constructor(element, index, descriptor, schema) {
- this.element = element;
- this.index = index;
- this.eventTarget = descriptor.eventTarget || element;
- this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error("missing event name");
- this.eventOptions = descriptor.eventOptions || {};
- this.identifier = descriptor.identifier || error("missing identifier");
- this.methodName = descriptor.methodName || error("missing method name");
- this.keyFilter = descriptor.keyFilter || "";
- this.schema = schema;
- }
- static forToken(token, schema) {
- return new this(token.element, token.index, parseActionDescriptorString(token.content), schema);
- }
- toString() {
- const eventFilter = this.keyFilter ? `.${this.keyFilter}` : "";
- const eventTarget = this.eventTargetName ? `@${this.eventTargetName}` : "";
- return `${this.eventName}${eventFilter}${eventTarget}->${this.identifier}#${this.methodName}`;
- }
- shouldIgnoreKeyboardEvent(event) {
- if (!this.keyFilter) {
- return false;
- }
- const filters = this.keyFilter.split("+");
- if (this.keyFilterDissatisfied(event, filters)) {
- return true;
- }
- const standardFilter = filters.filter((key) => !allModifiers.includes(key))[0];
- if (!standardFilter) {
- return false;
- }
- if (!hasProperty(this.keyMappings, standardFilter)) {
- error(`contains unknown key filter: ${this.keyFilter}`);
- }
- return this.keyMappings[standardFilter].toLowerCase() !== event.key.toLowerCase();
- }
- shouldIgnoreMouseEvent(event) {
- if (!this.keyFilter) {
- return false;
- }
- const filters = [this.keyFilter];
- if (this.keyFilterDissatisfied(event, filters)) {
- return true;
- }
- return false;
- }
- get params() {
- const params = {};
- const pattern = new RegExp(`^data-${this.identifier}-(.+)-param$`, "i");
- for (const { name, value } of Array.from(this.element.attributes)) {
- const match = name.match(pattern);
- const key = match && match[1];
- if (key) {
- params[camelize(key)] = typecast(value);
- }
- }
- return params;
- }
- get eventTargetName() {
- return stringifyEventTarget(this.eventTarget);
- }
- get keyMappings() {
- return this.schema.keyMappings;
- }
- keyFilterDissatisfied(event, filters) {
- const [meta, ctrl, alt, shift] = allModifiers.map((modifier) => filters.includes(modifier));
- return event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== alt || event.shiftKey !== shift;
- }
-}
-const defaultEventNames = {
- a: () => "click",
- button: () => "click",
- form: () => "submit",
- details: () => "toggle",
- input: (e) => (e.getAttribute("type") == "submit" ? "click" : "input"),
- select: () => "change",
- textarea: () => "input",
-};
-function getDefaultEventNameForElement(element) {
- const tagName = element.tagName.toLowerCase();
- if (tagName in defaultEventNames) {
- return defaultEventNames[tagName](element);
- }
-}
-function error(message) {
- throw new Error(message);
-}
-function typecast(value) {
- try {
- return JSON.parse(value);
- }
- catch (o_O) {
- return value;
- }
-}
-
-class Binding {
- constructor(context, action) {
- this.context = context;
- this.action = action;
- }
- get index() {
- return this.action.index;
- }
- get eventTarget() {
- return this.action.eventTarget;
- }
- get eventOptions() {
- return this.action.eventOptions;
- }
- get identifier() {
- return this.context.identifier;
- }
- handleEvent(event) {
- const actionEvent = this.prepareActionEvent(event);
- if (this.willBeInvokedByEvent(event) && this.applyEventModifiers(actionEvent)) {
- this.invokeWithEvent(actionEvent);
- }
- }
- get eventName() {
- return this.action.eventName;
- }
- get method() {
- const method = this.controller[this.methodName];
- if (typeof method == "function") {
- return method;
- }
- throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`);
- }
- applyEventModifiers(event) {
- const { element } = this.action;
- const { actionDescriptorFilters } = this.context.application;
- const { controller } = this.context;
- let passes = true;
- for (const [name, value] of Object.entries(this.eventOptions)) {
- if (name in actionDescriptorFilters) {
- const filter = actionDescriptorFilters[name];
- passes = passes && filter({ name, value, event, element, controller });
- }
- else {
- continue;
- }
- }
- return passes;
- }
- prepareActionEvent(event) {
- return Object.assign(event, { params: this.action.params });
- }
- invokeWithEvent(event) {
- const { target, currentTarget } = event;
- try {
- this.method.call(this.controller, event);
- this.context.logDebugActivity(this.methodName, { event, target, currentTarget, action: this.methodName });
- }
- catch (error) {
- const { identifier, controller, element, index } = this;
- const detail = { identifier, controller, element, index, event };
- this.context.handleError(error, `invoking action "${this.action}"`, detail);
- }
- }
- willBeInvokedByEvent(event) {
- const eventTarget = event.target;
- if (event instanceof KeyboardEvent && this.action.shouldIgnoreKeyboardEvent(event)) {
- return false;
- }
- if (event instanceof MouseEvent && this.action.shouldIgnoreMouseEvent(event)) {
- return false;
- }
- if (this.element === eventTarget) {
- return true;
- }
- else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {
- return this.scope.containsElement(eventTarget);
- }
- else {
- return this.scope.containsElement(this.action.element);
- }
- }
- get controller() {
- return this.context.controller;
- }
- get methodName() {
- return this.action.methodName;
- }
- get element() {
- return this.scope.element;
- }
- get scope() {
- return this.context.scope;
- }
-}
-
-class ElementObserver {
- constructor(element, delegate) {
- this.mutationObserverInit = { attributes: true, childList: true, subtree: true };
- this.element = element;
- this.started = false;
- this.delegate = delegate;
- this.elements = new Set();
- this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));
- }
- start() {
- if (!this.started) {
- this.started = true;
- this.mutationObserver.observe(this.element, this.mutationObserverInit);
- this.refresh();
- }
- }
- pause(callback) {
- if (this.started) {
- this.mutationObserver.disconnect();
- this.started = false;
- }
- callback();
- if (!this.started) {
- this.mutationObserver.observe(this.element, this.mutationObserverInit);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- this.mutationObserver.takeRecords();
- this.mutationObserver.disconnect();
- this.started = false;
- }
- }
- refresh() {
- if (this.started) {
- const matches = new Set(this.matchElementsInTree());
- for (const element of Array.from(this.elements)) {
- if (!matches.has(element)) {
- this.removeElement(element);
- }
- }
- for (const element of Array.from(matches)) {
- this.addElement(element);
- }
- }
- }
- processMutations(mutations) {
- if (this.started) {
- for (const mutation of mutations) {
- this.processMutation(mutation);
- }
- }
- }
- processMutation(mutation) {
- if (mutation.type == "attributes") {
- this.processAttributeChange(mutation.target, mutation.attributeName);
- }
- else if (mutation.type == "childList") {
- this.processRemovedNodes(mutation.removedNodes);
- this.processAddedNodes(mutation.addedNodes);
- }
- }
- processAttributeChange(element, attributeName) {
- if (this.elements.has(element)) {
- if (this.delegate.elementAttributeChanged && this.matchElement(element)) {
- this.delegate.elementAttributeChanged(element, attributeName);
- }
- else {
- this.removeElement(element);
- }
- }
- else if (this.matchElement(element)) {
- this.addElement(element);
- }
- }
- processRemovedNodes(nodes) {
- for (const node of Array.from(nodes)) {
- const element = this.elementFromNode(node);
- if (element) {
- this.processTree(element, this.removeElement);
- }
- }
- }
- processAddedNodes(nodes) {
- for (const node of Array.from(nodes)) {
- const element = this.elementFromNode(node);
- if (element && this.elementIsActive(element)) {
- this.processTree(element, this.addElement);
- }
- }
- }
- matchElement(element) {
- return this.delegate.matchElement(element);
- }
- matchElementsInTree(tree = this.element) {
- return this.delegate.matchElementsInTree(tree);
- }
- processTree(tree, processor) {
- for (const element of this.matchElementsInTree(tree)) {
- processor.call(this, element);
- }
- }
- elementFromNode(node) {
- if (node.nodeType == Node.ELEMENT_NODE) {
- return node;
- }
- }
- elementIsActive(element) {
- if (element.isConnected != this.element.isConnected) {
- return false;
- }
- else {
- return this.element.contains(element);
- }
- }
- addElement(element) {
- if (!this.elements.has(element)) {
- if (this.elementIsActive(element)) {
- this.elements.add(element);
- if (this.delegate.elementMatched) {
- this.delegate.elementMatched(element);
- }
- }
- }
- }
- removeElement(element) {
- if (this.elements.has(element)) {
- this.elements.delete(element);
- if (this.delegate.elementUnmatched) {
- this.delegate.elementUnmatched(element);
- }
- }
- }
-}
-
-class AttributeObserver {
- constructor(element, attributeName, delegate) {
- this.attributeName = attributeName;
- this.delegate = delegate;
- this.elementObserver = new ElementObserver(element, this);
- }
- get element() {
- return this.elementObserver.element;
- }
- get selector() {
- return `[${this.attributeName}]`;
- }
- start() {
- this.elementObserver.start();
- }
- pause(callback) {
- this.elementObserver.pause(callback);
- }
- stop() {
- this.elementObserver.stop();
- }
- refresh() {
- this.elementObserver.refresh();
- }
- get started() {
- return this.elementObserver.started;
- }
- matchElement(element) {
- return element.hasAttribute(this.attributeName);
- }
- matchElementsInTree(tree) {
- const match = this.matchElement(tree) ? [tree] : [];
- const matches = Array.from(tree.querySelectorAll(this.selector));
- return match.concat(matches);
- }
- elementMatched(element) {
- if (this.delegate.elementMatchedAttribute) {
- this.delegate.elementMatchedAttribute(element, this.attributeName);
- }
- }
- elementUnmatched(element) {
- if (this.delegate.elementUnmatchedAttribute) {
- this.delegate.elementUnmatchedAttribute(element, this.attributeName);
- }
- }
- elementAttributeChanged(element, attributeName) {
- if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {
- this.delegate.elementAttributeValueChanged(element, attributeName);
- }
- }
-}
-
-function add(map, key, value) {
- fetch(map, key).add(value);
-}
-function del(map, key, value) {
- fetch(map, key).delete(value);
- prune(map, key);
-}
-function fetch(map, key) {
- let values = map.get(key);
- if (!values) {
- values = new Set();
- map.set(key, values);
- }
- return values;
-}
-function prune(map, key) {
- const values = map.get(key);
- if (values != null && values.size == 0) {
- map.delete(key);
- }
-}
-
-class Multimap {
- constructor() {
- this.valuesByKey = new Map();
- }
- get keys() {
- return Array.from(this.valuesByKey.keys());
- }
- get values() {
- const sets = Array.from(this.valuesByKey.values());
- return sets.reduce((values, set) => values.concat(Array.from(set)), []);
- }
- get size() {
- const sets = Array.from(this.valuesByKey.values());
- return sets.reduce((size, set) => size + set.size, 0);
- }
- add(key, value) {
- add(this.valuesByKey, key, value);
- }
- delete(key, value) {
- del(this.valuesByKey, key, value);
- }
- has(key, value) {
- const values = this.valuesByKey.get(key);
- return values != null && values.has(value);
- }
- hasKey(key) {
- return this.valuesByKey.has(key);
- }
- hasValue(value) {
- const sets = Array.from(this.valuesByKey.values());
- return sets.some((set) => set.has(value));
- }
- getValuesForKey(key) {
- const values = this.valuesByKey.get(key);
- return values ? Array.from(values) : [];
- }
- getKeysForValue(value) {
- return Array.from(this.valuesByKey)
- .filter(([_key, values]) => values.has(value))
- .map(([key, _values]) => key);
- }
-}
-
-class IndexedMultimap extends Multimap {
- constructor() {
- super();
- this.keysByValue = new Map();
- }
- get values() {
- return Array.from(this.keysByValue.keys());
- }
- add(key, value) {
- super.add(key, value);
- add(this.keysByValue, value, key);
- }
- delete(key, value) {
- super.delete(key, value);
- del(this.keysByValue, value, key);
- }
- hasValue(value) {
- return this.keysByValue.has(value);
- }
- getKeysForValue(value) {
- const set = this.keysByValue.get(value);
- return set ? Array.from(set) : [];
- }
-}
-
-class SelectorObserver {
- constructor(element, selector, delegate, details) {
- this._selector = selector;
- this.details = details;
- this.elementObserver = new ElementObserver(element, this);
- this.delegate = delegate;
- this.matchesByElement = new Multimap();
- }
- get started() {
- return this.elementObserver.started;
- }
- get selector() {
- return this._selector;
- }
- set selector(selector) {
- this._selector = selector;
- this.refresh();
- }
- start() {
- this.elementObserver.start();
- }
- pause(callback) {
- this.elementObserver.pause(callback);
- }
- stop() {
- this.elementObserver.stop();
- }
- refresh() {
- this.elementObserver.refresh();
- }
- get element() {
- return this.elementObserver.element;
- }
- matchElement(element) {
- const { selector } = this;
- if (selector) {
- const matches = element.matches(selector);
- if (this.delegate.selectorMatchElement) {
- return matches && this.delegate.selectorMatchElement(element, this.details);
- }
- return matches;
- }
- else {
- return false;
- }
- }
- matchElementsInTree(tree) {
- const { selector } = this;
- if (selector) {
- const match = this.matchElement(tree) ? [tree] : [];
- const matches = Array.from(tree.querySelectorAll(selector)).filter((match) => this.matchElement(match));
- return match.concat(matches);
- }
- else {
- return [];
- }
- }
- elementMatched(element) {
- const { selector } = this;
- if (selector) {
- this.selectorMatched(element, selector);
- }
- }
- elementUnmatched(element) {
- const selectors = this.matchesByElement.getKeysForValue(element);
- for (const selector of selectors) {
- this.selectorUnmatched(element, selector);
- }
- }
- elementAttributeChanged(element, _attributeName) {
- const { selector } = this;
- if (selector) {
- const matches = this.matchElement(element);
- const matchedBefore = this.matchesByElement.has(selector, element);
- if (matches && !matchedBefore) {
- this.selectorMatched(element, selector);
- }
- else if (!matches && matchedBefore) {
- this.selectorUnmatched(element, selector);
- }
- }
- }
- selectorMatched(element, selector) {
- this.delegate.selectorMatched(element, selector, this.details);
- this.matchesByElement.add(selector, element);
- }
- selectorUnmatched(element, selector) {
- this.delegate.selectorUnmatched(element, selector, this.details);
- this.matchesByElement.delete(selector, element);
- }
-}
-
-class StringMapObserver {
- constructor(element, delegate) {
- this.element = element;
- this.delegate = delegate;
- this.started = false;
- this.stringMap = new Map();
- this.mutationObserver = new MutationObserver((mutations) => this.processMutations(mutations));
- }
- start() {
- if (!this.started) {
- this.started = true;
- this.mutationObserver.observe(this.element, { attributes: true, attributeOldValue: true });
- this.refresh();
- }
- }
- stop() {
- if (this.started) {
- this.mutationObserver.takeRecords();
- this.mutationObserver.disconnect();
- this.started = false;
- }
- }
- refresh() {
- if (this.started) {
- for (const attributeName of this.knownAttributeNames) {
- this.refreshAttribute(attributeName, null);
- }
- }
- }
- processMutations(mutations) {
- if (this.started) {
- for (const mutation of mutations) {
- this.processMutation(mutation);
- }
- }
- }
- processMutation(mutation) {
- const attributeName = mutation.attributeName;
- if (attributeName) {
- this.refreshAttribute(attributeName, mutation.oldValue);
- }
- }
- refreshAttribute(attributeName, oldValue) {
- const key = this.delegate.getStringMapKeyForAttribute(attributeName);
- if (key != null) {
- if (!this.stringMap.has(attributeName)) {
- this.stringMapKeyAdded(key, attributeName);
- }
- const value = this.element.getAttribute(attributeName);
- if (this.stringMap.get(attributeName) != value) {
- this.stringMapValueChanged(value, key, oldValue);
- }
- if (value == null) {
- const oldValue = this.stringMap.get(attributeName);
- this.stringMap.delete(attributeName);
- if (oldValue)
- this.stringMapKeyRemoved(key, attributeName, oldValue);
- }
- else {
- this.stringMap.set(attributeName, value);
- }
- }
- }
- stringMapKeyAdded(key, attributeName) {
- if (this.delegate.stringMapKeyAdded) {
- this.delegate.stringMapKeyAdded(key, attributeName);
- }
- }
- stringMapValueChanged(value, key, oldValue) {
- if (this.delegate.stringMapValueChanged) {
- this.delegate.stringMapValueChanged(value, key, oldValue);
- }
- }
- stringMapKeyRemoved(key, attributeName, oldValue) {
- if (this.delegate.stringMapKeyRemoved) {
- this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);
- }
- }
- get knownAttributeNames() {
- return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));
- }
- get currentAttributeNames() {
- return Array.from(this.element.attributes).map((attribute) => attribute.name);
- }
- get recordedAttributeNames() {
- return Array.from(this.stringMap.keys());
- }
-}
-
-class TokenListObserver {
- constructor(element, attributeName, delegate) {
- this.attributeObserver = new AttributeObserver(element, attributeName, this);
- this.delegate = delegate;
- this.tokensByElement = new Multimap();
- }
- get started() {
- return this.attributeObserver.started;
- }
- start() {
- this.attributeObserver.start();
- }
- pause(callback) {
- this.attributeObserver.pause(callback);
- }
- stop() {
- this.attributeObserver.stop();
- }
- refresh() {
- this.attributeObserver.refresh();
- }
- get element() {
- return this.attributeObserver.element;
- }
- get attributeName() {
- return this.attributeObserver.attributeName;
- }
- elementMatchedAttribute(element) {
- this.tokensMatched(this.readTokensForElement(element));
- }
- elementAttributeValueChanged(element) {
- const [unmatchedTokens, matchedTokens] = this.refreshTokensForElement(element);
- this.tokensUnmatched(unmatchedTokens);
- this.tokensMatched(matchedTokens);
- }
- elementUnmatchedAttribute(element) {
- this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));
- }
- tokensMatched(tokens) {
- tokens.forEach((token) => this.tokenMatched(token));
- }
- tokensUnmatched(tokens) {
- tokens.forEach((token) => this.tokenUnmatched(token));
- }
- tokenMatched(token) {
- this.delegate.tokenMatched(token);
- this.tokensByElement.add(token.element, token);
- }
- tokenUnmatched(token) {
- this.delegate.tokenUnmatched(token);
- this.tokensByElement.delete(token.element, token);
- }
- refreshTokensForElement(element) {
- const previousTokens = this.tokensByElement.getValuesForKey(element);
- const currentTokens = this.readTokensForElement(element);
- const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(([previousToken, currentToken]) => !tokensAreEqual(previousToken, currentToken));
- if (firstDifferingIndex == -1) {
- return [[], []];
- }
- else {
- return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];
- }
- }
- readTokensForElement(element) {
- const attributeName = this.attributeName;
- const tokenString = element.getAttribute(attributeName) || "";
- return parseTokenString(tokenString, element, attributeName);
- }
-}
-function parseTokenString(tokenString, element, attributeName) {
- return tokenString
- .trim()
- .split(/\s+/)
- .filter((content) => content.length)
- .map((content, index) => ({ element, attributeName, content, index }));
-}
-function zip(left, right) {
- const length = Math.max(left.length, right.length);
- return Array.from({ length }, (_, index) => [left[index], right[index]]);
-}
-function tokensAreEqual(left, right) {
- return left && right && left.index == right.index && left.content == right.content;
-}
-
-class ValueListObserver {
- constructor(element, attributeName, delegate) {
- this.tokenListObserver = new TokenListObserver(element, attributeName, this);
- this.delegate = delegate;
- this.parseResultsByToken = new WeakMap();
- this.valuesByTokenByElement = new WeakMap();
- }
- get started() {
- return this.tokenListObserver.started;
- }
- start() {
- this.tokenListObserver.start();
- }
- stop() {
- this.tokenListObserver.stop();
- }
- refresh() {
- this.tokenListObserver.refresh();
- }
- get element() {
- return this.tokenListObserver.element;
- }
- get attributeName() {
- return this.tokenListObserver.attributeName;
- }
- tokenMatched(token) {
- const { element } = token;
- const { value } = this.fetchParseResultForToken(token);
- if (value) {
- this.fetchValuesByTokenForElement(element).set(token, value);
- this.delegate.elementMatchedValue(element, value);
- }
- }
- tokenUnmatched(token) {
- const { element } = token;
- const { value } = this.fetchParseResultForToken(token);
- if (value) {
- this.fetchValuesByTokenForElement(element).delete(token);
- this.delegate.elementUnmatchedValue(element, value);
- }
- }
- fetchParseResultForToken(token) {
- let parseResult = this.parseResultsByToken.get(token);
- if (!parseResult) {
- parseResult = this.parseToken(token);
- this.parseResultsByToken.set(token, parseResult);
- }
- return parseResult;
- }
- fetchValuesByTokenForElement(element) {
- let valuesByToken = this.valuesByTokenByElement.get(element);
- if (!valuesByToken) {
- valuesByToken = new Map();
- this.valuesByTokenByElement.set(element, valuesByToken);
- }
- return valuesByToken;
- }
- parseToken(token) {
- try {
- const value = this.delegate.parseValueForToken(token);
- return { value };
- }
- catch (error) {
- return { error };
- }
- }
-}
-
-class BindingObserver {
- constructor(context, delegate) {
- this.context = context;
- this.delegate = delegate;
- this.bindingsByAction = new Map();
- }
- start() {
- if (!this.valueListObserver) {
- this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);
- this.valueListObserver.start();
- }
- }
- stop() {
- if (this.valueListObserver) {
- this.valueListObserver.stop();
- delete this.valueListObserver;
- this.disconnectAllActions();
- }
- }
- get element() {
- return this.context.element;
- }
- get identifier() {
- return this.context.identifier;
- }
- get actionAttribute() {
- return this.schema.actionAttribute;
- }
- get schema() {
- return this.context.schema;
- }
- get bindings() {
- return Array.from(this.bindingsByAction.values());
- }
- connectAction(action) {
- const binding = new Binding(this.context, action);
- this.bindingsByAction.set(action, binding);
- this.delegate.bindingConnected(binding);
- }
- disconnectAction(action) {
- const binding = this.bindingsByAction.get(action);
- if (binding) {
- this.bindingsByAction.delete(action);
- this.delegate.bindingDisconnected(binding);
- }
- }
- disconnectAllActions() {
- this.bindings.forEach((binding) => this.delegate.bindingDisconnected(binding, true));
- this.bindingsByAction.clear();
- }
- parseValueForToken(token) {
- const action = Action.forToken(token, this.schema);
- if (action.identifier == this.identifier) {
- return action;
- }
- }
- elementMatchedValue(element, action) {
- this.connectAction(action);
- }
- elementUnmatchedValue(element, action) {
- this.disconnectAction(action);
- }
-}
-
-class ValueObserver {
- constructor(context, receiver) {
- this.context = context;
- this.receiver = receiver;
- this.stringMapObserver = new StringMapObserver(this.element, this);
- this.valueDescriptorMap = this.controller.valueDescriptorMap;
- }
- start() {
- this.stringMapObserver.start();
- this.invokeChangedCallbacksForDefaultValues();
- }
- stop() {
- this.stringMapObserver.stop();
- }
- get element() {
- return this.context.element;
- }
- get controller() {
- return this.context.controller;
- }
- getStringMapKeyForAttribute(attributeName) {
- if (attributeName in this.valueDescriptorMap) {
- return this.valueDescriptorMap[attributeName].name;
- }
- }
- stringMapKeyAdded(key, attributeName) {
- const descriptor = this.valueDescriptorMap[attributeName];
- if (!this.hasValue(key)) {
- this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));
- }
- }
- stringMapValueChanged(value, name, oldValue) {
- const descriptor = this.valueDescriptorNameMap[name];
- if (value === null)
- return;
- if (oldValue === null) {
- oldValue = descriptor.writer(descriptor.defaultValue);
- }
- this.invokeChangedCallback(name, value, oldValue);
- }
- stringMapKeyRemoved(key, attributeName, oldValue) {
- const descriptor = this.valueDescriptorNameMap[key];
- if (this.hasValue(key)) {
- this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);
- }
- else {
- this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);
- }
- }
- invokeChangedCallbacksForDefaultValues() {
- for (const { key, name, defaultValue, writer } of this.valueDescriptors) {
- if (defaultValue != undefined && !this.controller.data.has(key)) {
- this.invokeChangedCallback(name, writer(defaultValue), undefined);
- }
- }
- }
- invokeChangedCallback(name, rawValue, rawOldValue) {
- const changedMethodName = `${name}Changed`;
- const changedMethod = this.receiver[changedMethodName];
- if (typeof changedMethod == "function") {
- const descriptor = this.valueDescriptorNameMap[name];
- try {
- const value = descriptor.reader(rawValue);
- let oldValue = rawOldValue;
- if (rawOldValue) {
- oldValue = descriptor.reader(rawOldValue);
- }
- changedMethod.call(this.receiver, value, oldValue);
- }
- catch (error) {
- if (error instanceof TypeError) {
- error.message = `Stimulus Value "${this.context.identifier}.${descriptor.name}" - ${error.message}`;
- }
- throw error;
- }
- }
- }
- get valueDescriptors() {
- const { valueDescriptorMap } = this;
- return Object.keys(valueDescriptorMap).map((key) => valueDescriptorMap[key]);
- }
- get valueDescriptorNameMap() {
- const descriptors = {};
- Object.keys(this.valueDescriptorMap).forEach((key) => {
- const descriptor = this.valueDescriptorMap[key];
- descriptors[descriptor.name] = descriptor;
- });
- return descriptors;
- }
- hasValue(attributeName) {
- const descriptor = this.valueDescriptorNameMap[attributeName];
- const hasMethodName = `has${capitalize(descriptor.name)}`;
- return this.receiver[hasMethodName];
- }
-}
-
-class TargetObserver {
- constructor(context, delegate) {
- this.context = context;
- this.delegate = delegate;
- this.targetsByName = new Multimap();
- }
- start() {
- if (!this.tokenListObserver) {
- this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);
- this.tokenListObserver.start();
- }
- }
- stop() {
- if (this.tokenListObserver) {
- this.disconnectAllTargets();
- this.tokenListObserver.stop();
- delete this.tokenListObserver;
- }
- }
- tokenMatched({ element, content: name }) {
- if (this.scope.containsElement(element)) {
- this.connectTarget(element, name);
- }
- }
- tokenUnmatched({ element, content: name }) {
- this.disconnectTarget(element, name);
- }
- connectTarget(element, name) {
- var _a;
- if (!this.targetsByName.has(name, element)) {
- this.targetsByName.add(name, element);
- (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));
- }
- }
- disconnectTarget(element, name) {
- var _a;
- if (this.targetsByName.has(name, element)) {
- this.targetsByName.delete(name, element);
- (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));
- }
- }
- disconnectAllTargets() {
- for (const name of this.targetsByName.keys) {
- for (const element of this.targetsByName.getValuesForKey(name)) {
- this.disconnectTarget(element, name);
- }
- }
- }
- get attributeName() {
- return `data-${this.context.identifier}-target`;
- }
- get element() {
- return this.context.element;
- }
- get scope() {
- return this.context.scope;
- }
-}
-
-function readInheritableStaticArrayValues(constructor, propertyName) {
- const ancestors = getAncestorsForConstructor(constructor);
- return Array.from(ancestors.reduce((values, constructor) => {
- getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));
- return values;
- }, new Set()));
-}
-function readInheritableStaticObjectPairs(constructor, propertyName) {
- const ancestors = getAncestorsForConstructor(constructor);
- return ancestors.reduce((pairs, constructor) => {
- pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));
- return pairs;
- }, []);
-}
-function getAncestorsForConstructor(constructor) {
- const ancestors = [];
- while (constructor) {
- ancestors.push(constructor);
- constructor = Object.getPrototypeOf(constructor);
- }
- return ancestors.reverse();
-}
-function getOwnStaticArrayValues(constructor, propertyName) {
- const definition = constructor[propertyName];
- return Array.isArray(definition) ? definition : [];
-}
-function getOwnStaticObjectPairs(constructor, propertyName) {
- const definition = constructor[propertyName];
- return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];
-}
-
-class OutletObserver {
- constructor(context, delegate) {
- this.started = false;
- this.context = context;
- this.delegate = delegate;
- this.outletsByName = new Multimap();
- this.outletElementsByName = new Multimap();
- this.selectorObserverMap = new Map();
- this.attributeObserverMap = new Map();
- }
- start() {
- if (!this.started) {
- this.outletDefinitions.forEach((outletName) => {
- this.setupSelectorObserverForOutlet(outletName);
- this.setupAttributeObserverForOutlet(outletName);
- });
- this.started = true;
- this.dependentContexts.forEach((context) => context.refresh());
- }
- }
- refresh() {
- this.selectorObserverMap.forEach((observer) => observer.refresh());
- this.attributeObserverMap.forEach((observer) => observer.refresh());
- }
- stop() {
- if (this.started) {
- this.started = false;
- this.disconnectAllOutlets();
- this.stopSelectorObservers();
- this.stopAttributeObservers();
- }
- }
- stopSelectorObservers() {
- if (this.selectorObserverMap.size > 0) {
- this.selectorObserverMap.forEach((observer) => observer.stop());
- this.selectorObserverMap.clear();
- }
- }
- stopAttributeObservers() {
- if (this.attributeObserverMap.size > 0) {
- this.attributeObserverMap.forEach((observer) => observer.stop());
- this.attributeObserverMap.clear();
- }
- }
- selectorMatched(element, _selector, { outletName }) {
- const outlet = this.getOutlet(element, outletName);
- if (outlet) {
- this.connectOutlet(outlet, element, outletName);
- }
- }
- selectorUnmatched(element, _selector, { outletName }) {
- const outlet = this.getOutletFromMap(element, outletName);
- if (outlet) {
- this.disconnectOutlet(outlet, element, outletName);
- }
- }
- selectorMatchElement(element, { outletName }) {
- const selector = this.selector(outletName);
- const hasOutlet = this.hasOutlet(element, outletName);
- const hasOutletController = element.matches(`[${this.schema.controllerAttribute}~=${outletName}]`);
- if (selector) {
- return hasOutlet && hasOutletController && element.matches(selector);
- }
- else {
- return false;
- }
- }
- elementMatchedAttribute(_element, attributeName) {
- const outletName = this.getOutletNameFromOutletAttributeName(attributeName);
- if (outletName) {
- this.updateSelectorObserverForOutlet(outletName);
- }
- }
- elementAttributeValueChanged(_element, attributeName) {
- const outletName = this.getOutletNameFromOutletAttributeName(attributeName);
- if (outletName) {
- this.updateSelectorObserverForOutlet(outletName);
- }
- }
- elementUnmatchedAttribute(_element, attributeName) {
- const outletName = this.getOutletNameFromOutletAttributeName(attributeName);
- if (outletName) {
- this.updateSelectorObserverForOutlet(outletName);
- }
- }
- connectOutlet(outlet, element, outletName) {
- var _a;
- if (!this.outletElementsByName.has(outletName, element)) {
- this.outletsByName.add(outletName, outlet);
- this.outletElementsByName.add(outletName, element);
- (_a = this.selectorObserverMap.get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletConnected(outlet, element, outletName));
- }
- }
- disconnectOutlet(outlet, element, outletName) {
- var _a;
- if (this.outletElementsByName.has(outletName, element)) {
- this.outletsByName.delete(outletName, outlet);
- this.outletElementsByName.delete(outletName, element);
- (_a = this.selectorObserverMap
- .get(outletName)) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.outletDisconnected(outlet, element, outletName));
- }
- }
- disconnectAllOutlets() {
- for (const outletName of this.outletElementsByName.keys) {
- for (const element of this.outletElementsByName.getValuesForKey(outletName)) {
- for (const outlet of this.outletsByName.getValuesForKey(outletName)) {
- this.disconnectOutlet(outlet, element, outletName);
- }
- }
- }
- }
- updateSelectorObserverForOutlet(outletName) {
- const observer = this.selectorObserverMap.get(outletName);
- if (observer) {
- observer.selector = this.selector(outletName);
- }
- }
- setupSelectorObserverForOutlet(outletName) {
- const selector = this.selector(outletName);
- const selectorObserver = new SelectorObserver(document.body, selector, this, { outletName });
- this.selectorObserverMap.set(outletName, selectorObserver);
- selectorObserver.start();
- }
- setupAttributeObserverForOutlet(outletName) {
- const attributeName = this.attributeNameForOutletName(outletName);
- const attributeObserver = new AttributeObserver(this.scope.element, attributeName, this);
- this.attributeObserverMap.set(outletName, attributeObserver);
- attributeObserver.start();
- }
- selector(outletName) {
- return this.scope.outlets.getSelectorForOutletName(outletName);
- }
- attributeNameForOutletName(outletName) {
- return this.scope.schema.outletAttributeForScope(this.identifier, outletName);
- }
- getOutletNameFromOutletAttributeName(attributeName) {
- return this.outletDefinitions.find((outletName) => this.attributeNameForOutletName(outletName) === attributeName);
- }
- get outletDependencies() {
- const dependencies = new Multimap();
- this.router.modules.forEach((module) => {
- const constructor = module.definition.controllerConstructor;
- const outlets = readInheritableStaticArrayValues(constructor, "outlets");
- outlets.forEach((outlet) => dependencies.add(outlet, module.identifier));
- });
- return dependencies;
- }
- get outletDefinitions() {
- return this.outletDependencies.getKeysForValue(this.identifier);
- }
- get dependentControllerIdentifiers() {
- return this.outletDependencies.getValuesForKey(this.identifier);
- }
- get dependentContexts() {
- const identifiers = this.dependentControllerIdentifiers;
- return this.router.contexts.filter((context) => identifiers.includes(context.identifier));
- }
- hasOutlet(element, outletName) {
- return !!this.getOutlet(element, outletName) || !!this.getOutletFromMap(element, outletName);
- }
- getOutlet(element, outletName) {
- return this.application.getControllerForElementAndIdentifier(element, outletName);
- }
- getOutletFromMap(element, outletName) {
- return this.outletsByName.getValuesForKey(outletName).find((outlet) => outlet.element === element);
- }
- get scope() {
- return this.context.scope;
- }
- get schema() {
- return this.context.schema;
- }
- get identifier() {
- return this.context.identifier;
- }
- get application() {
- return this.context.application;
- }
- get router() {
- return this.application.router;
- }
-}
-
-class Context {
- constructor(module, scope) {
- this.logDebugActivity = (functionName, detail = {}) => {
- const { identifier, controller, element } = this;
- detail = Object.assign({ identifier, controller, element }, detail);
- this.application.logDebugActivity(this.identifier, functionName, detail);
- };
- this.module = module;
- this.scope = scope;
- this.controller = new module.controllerConstructor(this);
- this.bindingObserver = new BindingObserver(this, this.dispatcher);
- this.valueObserver = new ValueObserver(this, this.controller);
- this.targetObserver = new TargetObserver(this, this);
- this.outletObserver = new OutletObserver(this, this);
- try {
- this.controller.initialize();
- this.logDebugActivity("initialize");
- }
- catch (error) {
- this.handleError(error, "initializing controller");
- }
- }
- connect() {
- this.bindingObserver.start();
- this.valueObserver.start();
- this.targetObserver.start();
- this.outletObserver.start();
- try {
- this.controller.connect();
- this.logDebugActivity("connect");
- }
- catch (error) {
- this.handleError(error, "connecting controller");
- }
- }
- refresh() {
- this.outletObserver.refresh();
- }
- disconnect() {
- try {
- this.controller.disconnect();
- this.logDebugActivity("disconnect");
- }
- catch (error) {
- this.handleError(error, "disconnecting controller");
- }
- this.outletObserver.stop();
- this.targetObserver.stop();
- this.valueObserver.stop();
- this.bindingObserver.stop();
- }
- get application() {
- return this.module.application;
- }
- get identifier() {
- return this.module.identifier;
- }
- get schema() {
- return this.application.schema;
- }
- get dispatcher() {
- return this.application.dispatcher;
- }
- get element() {
- return this.scope.element;
- }
- get parentElement() {
- return this.element.parentElement;
- }
- handleError(error, message, detail = {}) {
- const { identifier, controller, element } = this;
- detail = Object.assign({ identifier, controller, element }, detail);
- this.application.handleError(error, `Error ${message}`, detail);
- }
- targetConnected(element, name) {
- this.invokeControllerMethod(`${name}TargetConnected`, element);
- }
- targetDisconnected(element, name) {
- this.invokeControllerMethod(`${name}TargetDisconnected`, element);
- }
- outletConnected(outlet, element, name) {
- this.invokeControllerMethod(`${namespaceCamelize(name)}OutletConnected`, outlet, element);
- }
- outletDisconnected(outlet, element, name) {
- this.invokeControllerMethod(`${namespaceCamelize(name)}OutletDisconnected`, outlet, element);
- }
- invokeControllerMethod(methodName, ...args) {
- const controller = this.controller;
- if (typeof controller[methodName] == "function") {
- controller[methodName](...args);
- }
- }
-}
-
-function bless(constructor) {
- return shadow(constructor, getBlessedProperties(constructor));
-}
-function shadow(constructor, properties) {
- const shadowConstructor = extend(constructor);
- const shadowProperties = getShadowProperties(constructor.prototype, properties);
- Object.defineProperties(shadowConstructor.prototype, shadowProperties);
- return shadowConstructor;
-}
-function getBlessedProperties(constructor) {
- const blessings = readInheritableStaticArrayValues(constructor, "blessings");
- return blessings.reduce((blessedProperties, blessing) => {
- const properties = blessing(constructor);
- for (const key in properties) {
- const descriptor = blessedProperties[key] || {};
- blessedProperties[key] = Object.assign(descriptor, properties[key]);
- }
- return blessedProperties;
- }, {});
-}
-function getShadowProperties(prototype, properties) {
- return getOwnKeys(properties).reduce((shadowProperties, key) => {
- const descriptor = getShadowedDescriptor(prototype, properties, key);
- if (descriptor) {
- Object.assign(shadowProperties, { [key]: descriptor });
- }
- return shadowProperties;
- }, {});
-}
-function getShadowedDescriptor(prototype, properties, key) {
- const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);
- const shadowedByValue = shadowingDescriptor && "value" in shadowingDescriptor;
- if (!shadowedByValue) {
- const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;
- if (shadowingDescriptor) {
- descriptor.get = shadowingDescriptor.get || descriptor.get;
- descriptor.set = shadowingDescriptor.set || descriptor.set;
- }
- return descriptor;
- }
-}
-const getOwnKeys = (() => {
- if (typeof Object.getOwnPropertySymbols == "function") {
- return (object) => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];
- }
- else {
- return Object.getOwnPropertyNames;
- }
-})();
-const extend = (() => {
- function extendWithReflect(constructor) {
- function extended() {
- return Reflect.construct(constructor, arguments, new.target);
- }
- extended.prototype = Object.create(constructor.prototype, {
- constructor: { value: extended },
- });
- Reflect.setPrototypeOf(extended, constructor);
- return extended;
- }
- function testReflectExtension() {
- const a = function () {
- this.a.call(this);
- };
- const b = extendWithReflect(a);
- b.prototype.a = function () { };
- return new b();
- }
- try {
- testReflectExtension();
- return extendWithReflect;
- }
- catch (error) {
- return (constructor) => class extended extends constructor {
- };
- }
-})();
-
-function blessDefinition(definition) {
- return {
- identifier: definition.identifier,
- controllerConstructor: bless(definition.controllerConstructor),
- };
-}
-
-class Module {
- constructor(application, definition) {
- this.application = application;
- this.definition = blessDefinition(definition);
- this.contextsByScope = new WeakMap();
- this.connectedContexts = new Set();
- }
- get identifier() {
- return this.definition.identifier;
- }
- get controllerConstructor() {
- return this.definition.controllerConstructor;
- }
- get contexts() {
- return Array.from(this.connectedContexts);
- }
- connectContextForScope(scope) {
- const context = this.fetchContextForScope(scope);
- this.connectedContexts.add(context);
- context.connect();
- }
- disconnectContextForScope(scope) {
- const context = this.contextsByScope.get(scope);
- if (context) {
- this.connectedContexts.delete(context);
- context.disconnect();
- }
- }
- fetchContextForScope(scope) {
- let context = this.contextsByScope.get(scope);
- if (!context) {
- context = new Context(this, scope);
- this.contextsByScope.set(scope, context);
- }
- return context;
- }
-}
-
-class ClassMap {
- constructor(scope) {
- this.scope = scope;
- }
- has(name) {
- return this.data.has(this.getDataKey(name));
- }
- get(name) {
- return this.getAll(name)[0];
- }
- getAll(name) {
- const tokenString = this.data.get(this.getDataKey(name)) || "";
- return tokenize(tokenString);
- }
- getAttributeName(name) {
- return this.data.getAttributeNameForKey(this.getDataKey(name));
- }
- getDataKey(name) {
- return `${name}-class`;
- }
- get data() {
- return this.scope.data;
- }
-}
-
-class DataMap {
- constructor(scope) {
- this.scope = scope;
- }
- get element() {
- return this.scope.element;
- }
- get identifier() {
- return this.scope.identifier;
- }
- get(key) {
- const name = this.getAttributeNameForKey(key);
- return this.element.getAttribute(name);
- }
- set(key, value) {
- const name = this.getAttributeNameForKey(key);
- this.element.setAttribute(name, value);
- return this.get(key);
- }
- has(key) {
- const name = this.getAttributeNameForKey(key);
- return this.element.hasAttribute(name);
- }
- delete(key) {
- if (this.has(key)) {
- const name = this.getAttributeNameForKey(key);
- this.element.removeAttribute(name);
- return true;
- }
- else {
- return false;
- }
- }
- getAttributeNameForKey(key) {
- return `data-${this.identifier}-${dasherize(key)}`;
- }
-}
-
-class Guide {
- constructor(logger) {
- this.warnedKeysByObject = new WeakMap();
- this.logger = logger;
- }
- warn(object, key, message) {
- let warnedKeys = this.warnedKeysByObject.get(object);
- if (!warnedKeys) {
- warnedKeys = new Set();
- this.warnedKeysByObject.set(object, warnedKeys);
- }
- if (!warnedKeys.has(key)) {
- warnedKeys.add(key);
- this.logger.warn(message, object);
- }
- }
-}
-
-function attributeValueContainsToken(attributeName, token) {
- return `[${attributeName}~="${token}"]`;
-}
-
-class TargetSet {
- constructor(scope) {
- this.scope = scope;
- }
- get element() {
- return this.scope.element;
- }
- get identifier() {
- return this.scope.identifier;
- }
- get schema() {
- return this.scope.schema;
- }
- has(targetName) {
- return this.find(targetName) != null;
- }
- find(...targetNames) {
- return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);
- }
- findAll(...targetNames) {
- return targetNames.reduce((targets, targetName) => [
- ...targets,
- ...this.findAllTargets(targetName),
- ...this.findAllLegacyTargets(targetName),
- ], []);
- }
- findTarget(targetName) {
- const selector = this.getSelectorForTargetName(targetName);
- return this.scope.findElement(selector);
- }
- findAllTargets(targetName) {
- const selector = this.getSelectorForTargetName(targetName);
- return this.scope.findAllElements(selector);
- }
- getSelectorForTargetName(targetName) {
- const attributeName = this.schema.targetAttributeForScope(this.identifier);
- return attributeValueContainsToken(attributeName, targetName);
- }
- findLegacyTarget(targetName) {
- const selector = this.getLegacySelectorForTargetName(targetName);
- return this.deprecate(this.scope.findElement(selector), targetName);
- }
- findAllLegacyTargets(targetName) {
- const selector = this.getLegacySelectorForTargetName(targetName);
- return this.scope.findAllElements(selector).map((element) => this.deprecate(element, targetName));
- }
- getLegacySelectorForTargetName(targetName) {
- const targetDescriptor = `${this.identifier}.${targetName}`;
- return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);
- }
- deprecate(element, targetName) {
- if (element) {
- const { identifier } = this;
- const attributeName = this.schema.targetAttribute;
- const revisedAttributeName = this.schema.targetAttributeForScope(identifier);
- this.guide.warn(element, `target:${targetName}`, `Please replace ${attributeName}="${identifier}.${targetName}" with ${revisedAttributeName}="${targetName}". ` +
- `The ${attributeName} attribute is deprecated and will be removed in a future version of Stimulus.`);
- }
- return element;
- }
- get guide() {
- return this.scope.guide;
- }
-}
-
-class OutletSet {
- constructor(scope, controllerElement) {
- this.scope = scope;
- this.controllerElement = controllerElement;
- }
- get element() {
- return this.scope.element;
- }
- get identifier() {
- return this.scope.identifier;
- }
- get schema() {
- return this.scope.schema;
- }
- has(outletName) {
- return this.find(outletName) != null;
- }
- find(...outletNames) {
- return outletNames.reduce((outlet, outletName) => outlet || this.findOutlet(outletName), undefined);
- }
- findAll(...outletNames) {
- return outletNames.reduce((outlets, outletName) => [...outlets, ...this.findAllOutlets(outletName)], []);
- }
- getSelectorForOutletName(outletName) {
- const attributeName = this.schema.outletAttributeForScope(this.identifier, outletName);
- return this.controllerElement.getAttribute(attributeName);
- }
- findOutlet(outletName) {
- const selector = this.getSelectorForOutletName(outletName);
- if (selector)
- return this.findElement(selector, outletName);
- }
- findAllOutlets(outletName) {
- const selector = this.getSelectorForOutletName(outletName);
- return selector ? this.findAllElements(selector, outletName) : [];
- }
- findElement(selector, outletName) {
- const elements = this.scope.queryElements(selector);
- return elements.filter((element) => this.matchesElement(element, selector, outletName))[0];
- }
- findAllElements(selector, outletName) {
- const elements = this.scope.queryElements(selector);
- return elements.filter((element) => this.matchesElement(element, selector, outletName));
- }
- matchesElement(element, selector, outletName) {
- const controllerAttribute = element.getAttribute(this.scope.schema.controllerAttribute) || "";
- return element.matches(selector) && controllerAttribute.split(" ").includes(outletName);
- }
-}
-
-class Scope {
- constructor(schema, element, identifier, logger) {
- this.targets = new TargetSet(this);
- this.classes = new ClassMap(this);
- this.data = new DataMap(this);
- this.containsElement = (element) => {
- return element.closest(this.controllerSelector) === this.element;
- };
- this.schema = schema;
- this.element = element;
- this.identifier = identifier;
- this.guide = new Guide(logger);
- this.outlets = new OutletSet(this.documentScope, element);
- }
- findElement(selector) {
- return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);
- }
- findAllElements(selector) {
- return [
- ...(this.element.matches(selector) ? [this.element] : []),
- ...this.queryElements(selector).filter(this.containsElement),
- ];
- }
- queryElements(selector) {
- return Array.from(this.element.querySelectorAll(selector));
- }
- get controllerSelector() {
- return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);
- }
- get isDocumentScope() {
- return this.element === document.documentElement;
- }
- get documentScope() {
- return this.isDocumentScope
- ? this
- : new Scope(this.schema, document.documentElement, this.identifier, this.guide.logger);
- }
-}
-
-class ScopeObserver {
- constructor(element, schema, delegate) {
- this.element = element;
- this.schema = schema;
- this.delegate = delegate;
- this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);
- this.scopesByIdentifierByElement = new WeakMap();
- this.scopeReferenceCounts = new WeakMap();
- }
- start() {
- this.valueListObserver.start();
- }
- stop() {
- this.valueListObserver.stop();
- }
- get controllerAttribute() {
- return this.schema.controllerAttribute;
- }
- parseValueForToken(token) {
- const { element, content: identifier } = token;
- return this.parseValueForElementAndIdentifier(element, identifier);
- }
- parseValueForElementAndIdentifier(element, identifier) {
- const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);
- let scope = scopesByIdentifier.get(identifier);
- if (!scope) {
- scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);
- scopesByIdentifier.set(identifier, scope);
- }
- return scope;
- }
- elementMatchedValue(element, value) {
- const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;
- this.scopeReferenceCounts.set(value, referenceCount);
- if (referenceCount == 1) {
- this.delegate.scopeConnected(value);
- }
- }
- elementUnmatchedValue(element, value) {
- const referenceCount = this.scopeReferenceCounts.get(value);
- if (referenceCount) {
- this.scopeReferenceCounts.set(value, referenceCount - 1);
- if (referenceCount == 1) {
- this.delegate.scopeDisconnected(value);
- }
- }
- }
- fetchScopesByIdentifierForElement(element) {
- let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);
- if (!scopesByIdentifier) {
- scopesByIdentifier = new Map();
- this.scopesByIdentifierByElement.set(element, scopesByIdentifier);
- }
- return scopesByIdentifier;
- }
-}
-
-class Router {
- constructor(application) {
- this.application = application;
- this.scopeObserver = new ScopeObserver(this.element, this.schema, this);
- this.scopesByIdentifier = new Multimap();
- this.modulesByIdentifier = new Map();
- }
- get element() {
- return this.application.element;
- }
- get schema() {
- return this.application.schema;
- }
- get logger() {
- return this.application.logger;
- }
- get controllerAttribute() {
- return this.schema.controllerAttribute;
- }
- get modules() {
- return Array.from(this.modulesByIdentifier.values());
- }
- get contexts() {
- return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);
- }
- start() {
- this.scopeObserver.start();
- }
- stop() {
- this.scopeObserver.stop();
- }
- loadDefinition(definition) {
- this.unloadIdentifier(definition.identifier);
- const module = new Module(this.application, definition);
- this.connectModule(module);
- const afterLoad = definition.controllerConstructor.afterLoad;
- if (afterLoad) {
- afterLoad.call(definition.controllerConstructor, definition.identifier, this.application);
- }
- }
- unloadIdentifier(identifier) {
- const module = this.modulesByIdentifier.get(identifier);
- if (module) {
- this.disconnectModule(module);
- }
- }
- getContextForElementAndIdentifier(element, identifier) {
- const module = this.modulesByIdentifier.get(identifier);
- if (module) {
- return module.contexts.find((context) => context.element == element);
- }
- }
- proposeToConnectScopeForElementAndIdentifier(element, identifier) {
- const scope = this.scopeObserver.parseValueForElementAndIdentifier(element, identifier);
- if (scope) {
- this.scopeObserver.elementMatchedValue(scope.element, scope);
- }
- else {
- console.error(`Couldn't find or create scope for identifier: "${identifier}" and element:`, element);
- }
- }
- handleError(error, message, detail) {
- this.application.handleError(error, message, detail);
- }
- createScopeForElementAndIdentifier(element, identifier) {
- return new Scope(this.schema, element, identifier, this.logger);
- }
- scopeConnected(scope) {
- this.scopesByIdentifier.add(scope.identifier, scope);
- const module = this.modulesByIdentifier.get(scope.identifier);
- if (module) {
- module.connectContextForScope(scope);
- }
- }
- scopeDisconnected(scope) {
- this.scopesByIdentifier.delete(scope.identifier, scope);
- const module = this.modulesByIdentifier.get(scope.identifier);
- if (module) {
- module.disconnectContextForScope(scope);
- }
- }
- connectModule(module) {
- this.modulesByIdentifier.set(module.identifier, module);
- const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);
- scopes.forEach((scope) => module.connectContextForScope(scope));
- }
- disconnectModule(module) {
- this.modulesByIdentifier.delete(module.identifier);
- const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);
- scopes.forEach((scope) => module.disconnectContextForScope(scope));
- }
-}
-
-const defaultSchema = {
- controllerAttribute: "data-controller",
- actionAttribute: "data-action",
- targetAttribute: "data-target",
- targetAttributeForScope: (identifier) => `data-${identifier}-target`,
- outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,
- keyMappings: Object.assign(Object.assign({ enter: "Enter", tab: "Tab", esc: "Escape", space: " ", up: "ArrowUp", down: "ArrowDown", left: "ArrowLeft", right: "ArrowRight", home: "Home", end: "End", page_up: "PageUp", page_down: "PageDown" }, objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map((c) => [c, c]))), objectFromEntries("0123456789".split("").map((n) => [n, n]))),
-};
-function objectFromEntries(array) {
- return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});
-}
-
-class Application {
- constructor(element = document.documentElement, schema = defaultSchema) {
- this.logger = console;
- this.debug = false;
- this.logDebugActivity = (identifier, functionName, detail = {}) => {
- if (this.debug) {
- this.logFormattedMessage(identifier, functionName, detail);
- }
- };
- this.element = element;
- this.schema = schema;
- this.dispatcher = new Dispatcher(this);
- this.router = new Router(this);
- this.actionDescriptorFilters = Object.assign({}, defaultActionDescriptorFilters);
- }
- static start(element, schema) {
- const application = new this(element, schema);
- application.start();
- return application;
- }
- async start() {
- await domReady();
- this.logDebugActivity("application", "starting");
- this.dispatcher.start();
- this.router.start();
- this.logDebugActivity("application", "start");
- }
- stop() {
- this.logDebugActivity("application", "stopping");
- this.dispatcher.stop();
- this.router.stop();
- this.logDebugActivity("application", "stop");
- }
- register(identifier, controllerConstructor) {
- this.load({ identifier, controllerConstructor });
- }
- registerActionOption(name, filter) {
- this.actionDescriptorFilters[name] = filter;
- }
- load(head, ...rest) {
- const definitions = Array.isArray(head) ? head : [head, ...rest];
- definitions.forEach((definition) => {
- if (definition.controllerConstructor.shouldLoad) {
- this.router.loadDefinition(definition);
- }
- });
- }
- unload(head, ...rest) {
- const identifiers = Array.isArray(head) ? head : [head, ...rest];
- identifiers.forEach((identifier) => this.router.unloadIdentifier(identifier));
- }
- get controllers() {
- return this.router.contexts.map((context) => context.controller);
- }
- getControllerForElementAndIdentifier(element, identifier) {
- const context = this.router.getContextForElementAndIdentifier(element, identifier);
- return context ? context.controller : null;
- }
- handleError(error, message, detail) {
- var _a;
- this.logger.error(`%s\n\n%o\n\n%o`, message, error, detail);
- (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, "", 0, 0, error);
- }
- logFormattedMessage(identifier, functionName, detail = {}) {
- detail = Object.assign({ application: this }, detail);
- this.logger.groupCollapsed(`${identifier} #${functionName}`);
- this.logger.log("details:", Object.assign({}, detail));
- this.logger.groupEnd();
- }
-}
-function domReady() {
- return new Promise((resolve) => {
- if (document.readyState == "loading") {
- document.addEventListener("DOMContentLoaded", () => resolve());
- }
- else {
- resolve();
- }
- });
-}
-
-function ClassPropertiesBlessing(constructor) {
- const classes = readInheritableStaticArrayValues(constructor, "classes");
- return classes.reduce((properties, classDefinition) => {
- return Object.assign(properties, propertiesForClassDefinition(classDefinition));
- }, {});
-}
-function propertiesForClassDefinition(key) {
- return {
- [`${key}Class`]: {
- get() {
- const { classes } = this;
- if (classes.has(key)) {
- return classes.get(key);
- }
- else {
- const attribute = classes.getAttributeName(key);
- throw new Error(`Missing attribute "${attribute}"`);
- }
- },
- },
- [`${key}Classes`]: {
- get() {
- return this.classes.getAll(key);
- },
- },
- [`has${capitalize(key)}Class`]: {
- get() {
- return this.classes.has(key);
- },
- },
- };
-}
-
-function OutletPropertiesBlessing(constructor) {
- const outlets = readInheritableStaticArrayValues(constructor, "outlets");
- return outlets.reduce((properties, outletDefinition) => {
- return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));
- }, {});
-}
-function getOutletController(controller, element, identifier) {
- return controller.application.getControllerForElementAndIdentifier(element, identifier);
-}
-function getControllerAndEnsureConnectedScope(controller, element, outletName) {
- let outletController = getOutletController(controller, element, outletName);
- if (outletController)
- return outletController;
- controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);
- outletController = getOutletController(controller, element, outletName);
- if (outletController)
- return outletController;
-}
-function propertiesForOutletDefinition(name) {
- const camelizedName = namespaceCamelize(name);
- return {
- [`${camelizedName}Outlet`]: {
- get() {
- const outletElement = this.outlets.find(name);
- const selector = this.outlets.getSelectorForOutletName(name);
- if (outletElement) {
- const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);
- if (outletController)
- return outletController;
- throw new Error(`The provided outlet element is missing an outlet controller "${name}" instance for host controller "${this.identifier}"`);
- }
- throw new Error(`Missing outlet element "${name}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${selector}".`);
- },
- },
- [`${camelizedName}Outlets`]: {
- get() {
- const outlets = this.outlets.findAll(name);
- if (outlets.length > 0) {
- return outlets
- .map((outletElement) => {
- const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);
- if (outletController)
- return outletController;
- console.warn(`The provided outlet element is missing an outlet controller "${name}" instance for host controller "${this.identifier}"`, outletElement);
- })
- .filter((controller) => controller);
- }
- return [];
- },
- },
- [`${camelizedName}OutletElement`]: {
- get() {
- const outletElement = this.outlets.find(name);
- const selector = this.outlets.getSelectorForOutletName(name);
- if (outletElement) {
- return outletElement;
- }
- else {
- throw new Error(`Missing outlet element "${name}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${selector}".`);
- }
- },
- },
- [`${camelizedName}OutletElements`]: {
- get() {
- return this.outlets.findAll(name);
- },
- },
- [`has${capitalize(camelizedName)}Outlet`]: {
- get() {
- return this.outlets.has(name);
- },
- },
- };
-}
-
-function TargetPropertiesBlessing(constructor) {
- const targets = readInheritableStaticArrayValues(constructor, "targets");
- return targets.reduce((properties, targetDefinition) => {
- return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));
- }, {});
-}
-function propertiesForTargetDefinition(name) {
- return {
- [`${name}Target`]: {
- get() {
- const target = this.targets.find(name);
- if (target) {
- return target;
- }
- else {
- throw new Error(`Missing target element "${name}" for "${this.identifier}" controller`);
- }
- },
- },
- [`${name}Targets`]: {
- get() {
- return this.targets.findAll(name);
- },
- },
- [`has${capitalize(name)}Target`]: {
- get() {
- return this.targets.has(name);
- },
- },
- };
-}
-
-function ValuePropertiesBlessing(constructor) {
- const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, "values");
- const propertyDescriptorMap = {
- valueDescriptorMap: {
- get() {
- return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {
- const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);
- const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);
- return Object.assign(result, { [attributeName]: valueDescriptor });
- }, {});
- },
- },
- };
- return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {
- return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));
- }, propertyDescriptorMap);
-}
-function propertiesForValueDefinitionPair(valueDefinitionPair, controller) {
- const definition = parseValueDefinitionPair(valueDefinitionPair, controller);
- const { key, name, reader: read, writer: write } = definition;
- return {
- [name]: {
- get() {
- const value = this.data.get(key);
- if (value !== null) {
- return read(value);
- }
- else {
- return definition.defaultValue;
- }
- },
- set(value) {
- if (value === undefined) {
- this.data.delete(key);
- }
- else {
- this.data.set(key, write(value));
- }
- },
- },
- [`has${capitalize(name)}`]: {
- get() {
- return this.data.has(key) || definition.hasCustomDefaultValue;
- },
- },
- };
-}
-function parseValueDefinitionPair([token, typeDefinition], controller) {
- return valueDescriptorForTokenAndTypeDefinition({
- controller,
- token,
- typeDefinition,
- });
-}
-function parseValueTypeConstant(constant) {
- switch (constant) {
- case Array:
- return "array";
- case Boolean:
- return "boolean";
- case Number:
- return "number";
- case Object:
- return "object";
- case String:
- return "string";
- }
-}
-function parseValueTypeDefault(defaultValue) {
- switch (typeof defaultValue) {
- case "boolean":
- return "boolean";
- case "number":
- return "number";
- case "string":
- return "string";
- }
- if (Array.isArray(defaultValue))
- return "array";
- if (Object.prototype.toString.call(defaultValue) === "[object Object]")
- return "object";
-}
-function parseValueTypeObject(payload) {
- const { controller, token, typeObject } = payload;
- const hasType = isSomething(typeObject.type);
- const hasDefault = isSomething(typeObject.default);
- const fullObject = hasType && hasDefault;
- const onlyType = hasType && !hasDefault;
- const onlyDefault = !hasType && hasDefault;
- const typeFromObject = parseValueTypeConstant(typeObject.type);
- const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);
- if (onlyType)
- return typeFromObject;
- if (onlyDefault)
- return typeFromDefaultValue;
- if (typeFromObject !== typeFromDefaultValue) {
- const propertyPath = controller ? `${controller}.${token}` : token;
- throw new Error(`The specified default value for the Stimulus Value "${propertyPath}" must match the defined type "${typeFromObject}". The provided default value of "${typeObject.default}" is of type "${typeFromDefaultValue}".`);
- }
- if (fullObject)
- return typeFromObject;
-}
-function parseValueTypeDefinition(payload) {
- const { controller, token, typeDefinition } = payload;
- const typeObject = { controller, token, typeObject: typeDefinition };
- const typeFromObject = parseValueTypeObject(typeObject);
- const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);
- const typeFromConstant = parseValueTypeConstant(typeDefinition);
- const type = typeFromObject || typeFromDefaultValue || typeFromConstant;
- if (type)
- return type;
- const propertyPath = controller ? `${controller}.${typeDefinition}` : token;
- throw new Error(`Unknown value type "${propertyPath}" for "${token}" value`);
-}
-function defaultValueForDefinition(typeDefinition) {
- const constant = parseValueTypeConstant(typeDefinition);
- if (constant)
- return defaultValuesByType[constant];
- const hasDefault = hasProperty(typeDefinition, "default");
- const hasType = hasProperty(typeDefinition, "type");
- const typeObject = typeDefinition;
- if (hasDefault)
- return typeObject.default;
- if (hasType) {
- const { type } = typeObject;
- const constantFromType = parseValueTypeConstant(type);
- if (constantFromType)
- return defaultValuesByType[constantFromType];
- }
- return typeDefinition;
-}
-function valueDescriptorForTokenAndTypeDefinition(payload) {
- const { token, typeDefinition } = payload;
- const key = `${dasherize(token)}-value`;
- const type = parseValueTypeDefinition(payload);
- return {
- type,
- key,
- name: camelize(key),
- get defaultValue() {
- return defaultValueForDefinition(typeDefinition);
- },
- get hasCustomDefaultValue() {
- return parseValueTypeDefault(typeDefinition) !== undefined;
- },
- reader: readers[type],
- writer: writers[type] || writers.default,
- };
-}
-const defaultValuesByType = {
- get array() {
- return [];
- },
- boolean: false,
- number: 0,
- get object() {
- return {};
- },
- string: "",
-};
-const readers = {
- array(value) {
- const array = JSON.parse(value);
- if (!Array.isArray(array)) {
- throw new TypeError(`expected value of type "array" but instead got value "${value}" of type "${parseValueTypeDefault(array)}"`);
- }
- return array;
- },
- boolean(value) {
- return !(value == "0" || String(value).toLowerCase() == "false");
- },
- number(value) {
- return Number(value.replace(/_/g, ""));
- },
- object(value) {
- const object = JSON.parse(value);
- if (object === null || typeof object != "object" || Array.isArray(object)) {
- throw new TypeError(`expected value of type "object" but instead got value "${value}" of type "${parseValueTypeDefault(object)}"`);
- }
- return object;
- },
- string(value) {
- return value;
- },
-};
-const writers = {
- default: writeString,
- array: writeJSON,
- object: writeJSON,
-};
-function writeJSON(value) {
- return JSON.stringify(value);
-}
-function writeString(value) {
- return `${value}`;
-}
-
-class Controller {
- constructor(context) {
- this.context = context;
- }
- static get shouldLoad() {
- return true;
- }
- static afterLoad(_identifier, _application) {
- return;
- }
- get application() {
- return this.context.application;
- }
- get scope() {
- return this.context.scope;
- }
- get element() {
- return this.scope.element;
- }
- get identifier() {
- return this.scope.identifier;
- }
- get targets() {
- return this.scope.targets;
- }
- get outlets() {
- return this.scope.outlets;
- }
- get classes() {
- return this.scope.classes;
- }
- get data() {
- return this.scope.data;
- }
- initialize() {
- }
- connect() {
- }
- disconnect() {
- }
- dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {
- const type = prefix ? `${prefix}:${eventName}` : eventName;
- const event = new CustomEvent(type, { detail, bubbles, cancelable });
- target.dispatchEvent(event);
- return event;
- }
-}
-Controller.blessings = [
- ClassPropertiesBlessing,
- TargetPropertiesBlessing,
- ValuePropertiesBlessing,
- OutletPropertiesBlessing,
-];
-Controller.targets = [];
-Controller.outlets = [];
-Controller.values = {};
-
-
-
-
-/***/ }),
-
-/***/ "./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js":
-/*!***************************************************************!*\
- !*** ./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js ***!
- \***************************************************************/
-/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
-
-"use strict";
-__webpack_require__.r(__webpack_exports__);
-/* harmony export */ __webpack_require__.d(__webpack_exports__, {
-/* harmony export */ FrameElement: () => (/* binding */ FrameElement),
-/* harmony export */ FrameLoadingStyle: () => (/* binding */ FrameLoadingStyle),
-/* harmony export */ FrameRenderer: () => (/* binding */ FrameRenderer),
-/* harmony export */ PageRenderer: () => (/* binding */ PageRenderer),
-/* harmony export */ PageSnapshot: () => (/* binding */ PageSnapshot),
-/* harmony export */ StreamActions: () => (/* binding */ StreamActions),
-/* harmony export */ StreamElement: () => (/* binding */ StreamElement),
-/* harmony export */ StreamSourceElement: () => (/* binding */ StreamSourceElement),
-/* harmony export */ cache: () => (/* binding */ cache),
-/* harmony export */ clearCache: () => (/* binding */ clearCache),
-/* harmony export */ connectStreamSource: () => (/* binding */ connectStreamSource),
-/* harmony export */ disconnectStreamSource: () => (/* binding */ disconnectStreamSource),
-/* harmony export */ navigator: () => (/* binding */ navigator$1),
-/* harmony export */ registerAdapter: () => (/* binding */ registerAdapter),
-/* harmony export */ renderStreamMessage: () => (/* binding */ renderStreamMessage),
-/* harmony export */ session: () => (/* binding */ session),
-/* harmony export */ setConfirmMethod: () => (/* binding */ setConfirmMethod),
-/* harmony export */ setFormMode: () => (/* binding */ setFormMode),
-/* harmony export */ setProgressBarDelay: () => (/* binding */ setProgressBarDelay),
-/* harmony export */ start: () => (/* binding */ start),
-/* harmony export */ visit: () => (/* binding */ visit)
-/* harmony export */ });
-/*
-Turbo 7.3.0
-Copyright © 2023 37signals LLC
- */
-(function () {
- if (window.Reflect === undefined ||
- window.customElements === undefined ||
- window.customElements.polyfillWrapFlushCallback) {
- return;
- }
- const BuiltInHTMLElement = HTMLElement;
- const wrapperForTheName = {
- HTMLElement: function HTMLElement() {
- return Reflect.construct(BuiltInHTMLElement, [], this.constructor);
- },
- };
- window.HTMLElement = wrapperForTheName["HTMLElement"];
- HTMLElement.prototype = BuiltInHTMLElement.prototype;
- HTMLElement.prototype.constructor = HTMLElement;
- Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);
-})();
-
-/**
- * The MIT License (MIT)
- *
- * Copyright (c) 2019 Javan Makhmali
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-(function(prototype) {
- if (typeof prototype.requestSubmit == "function") return
-
- prototype.requestSubmit = function(submitter) {
- if (submitter) {
- validateSubmitter(submitter, this);
- submitter.click();
- } else {
- submitter = document.createElement("input");
- submitter.type = "submit";
- submitter.hidden = true;
- this.appendChild(submitter);
- submitter.click();
- this.removeChild(submitter);
- }
- };
-
- function validateSubmitter(submitter, form) {
- submitter instanceof HTMLElement || raise(TypeError, "parameter 1 is not of type 'HTMLElement'");
- submitter.type == "submit" || raise(TypeError, "The specified element is not a submit button");
- submitter.form == form || raise(DOMException, "The specified element is not owned by this form element", "NotFoundError");
- }
-
- function raise(errorConstructor, message, name) {
- throw new errorConstructor("Failed to execute 'requestSubmit' on 'HTMLFormElement': " + message + ".", name)
- }
-})(HTMLFormElement.prototype);
-
-const submittersByForm = new WeakMap();
-function findSubmitterFromClickTarget(target) {
- const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;
- const candidate = element ? element.closest("input, button") : null;
- return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == "submit" ? candidate : null;
-}
-function clickCaptured(event) {
- const submitter = findSubmitterFromClickTarget(event.target);
- if (submitter && submitter.form) {
- submittersByForm.set(submitter.form, submitter);
- }
-}
-(function () {
- if ("submitter" in Event.prototype)
- return;
- let prototype = window.Event.prototype;
- if ("SubmitEvent" in window && /Apple Computer/.test(navigator.vendor)) {
- prototype = window.SubmitEvent.prototype;
- }
- else if ("SubmitEvent" in window) {
- return;
- }
- addEventListener("click", clickCaptured, true);
- Object.defineProperty(prototype, "submitter", {
- get() {
- if (this.type == "submit" && this.target instanceof HTMLFormElement) {
- return submittersByForm.get(this.target);
- }
- },
- });
-})();
-
-var FrameLoadingStyle;
-(function (FrameLoadingStyle) {
- FrameLoadingStyle["eager"] = "eager";
- FrameLoadingStyle["lazy"] = "lazy";
-})(FrameLoadingStyle || (FrameLoadingStyle = {}));
-class FrameElement extends HTMLElement {
- static get observedAttributes() {
- return ["disabled", "complete", "loading", "src"];
- }
- constructor() {
- super();
- this.loaded = Promise.resolve();
- this.delegate = new FrameElement.delegateConstructor(this);
- }
- connectedCallback() {
- this.delegate.connect();
- }
- disconnectedCallback() {
- this.delegate.disconnect();
- }
- reload() {
- return this.delegate.sourceURLReloaded();
- }
- attributeChangedCallback(name) {
- if (name == "loading") {
- this.delegate.loadingStyleChanged();
- }
- else if (name == "complete") {
- this.delegate.completeChanged();
- }
- else if (name == "src") {
- this.delegate.sourceURLChanged();
- }
- else {
- this.delegate.disabledChanged();
- }
- }
- get src() {
- return this.getAttribute("src");
- }
- set src(value) {
- if (value) {
- this.setAttribute("src", value);
- }
- else {
- this.removeAttribute("src");
- }
- }
- get loading() {
- return frameLoadingStyleFromString(this.getAttribute("loading") || "");
- }
- set loading(value) {
- if (value) {
- this.setAttribute("loading", value);
- }
- else {
- this.removeAttribute("loading");
- }
- }
- get disabled() {
- return this.hasAttribute("disabled");
- }
- set disabled(value) {
- if (value) {
- this.setAttribute("disabled", "");
- }
- else {
- this.removeAttribute("disabled");
- }
- }
- get autoscroll() {
- return this.hasAttribute("autoscroll");
- }
- set autoscroll(value) {
- if (value) {
- this.setAttribute("autoscroll", "");
- }
- else {
- this.removeAttribute("autoscroll");
- }
- }
- get complete() {
- return !this.delegate.isLoading;
- }
- get isActive() {
- return this.ownerDocument === document && !this.isPreview;
- }
- get isPreview() {
- var _a, _b;
- return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute("data-turbo-preview");
- }
-}
-function frameLoadingStyleFromString(style) {
- switch (style.toLowerCase()) {
- case "lazy":
- return FrameLoadingStyle.lazy;
- default:
- return FrameLoadingStyle.eager;
- }
-}
-
-function expandURL(locatable) {
- return new URL(locatable.toString(), document.baseURI);
-}
-function getAnchor(url) {
- let anchorMatch;
- if (url.hash) {
- return url.hash.slice(1);
- }
- else if ((anchorMatch = url.href.match(/#(.*)$/))) {
- return anchorMatch[1];
- }
-}
-function getAction(form, submitter) {
- const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formaction")) || form.getAttribute("action") || form.action;
- return expandURL(action);
-}
-function getExtension(url) {
- return (getLastPathComponent(url).match(/\.[^.]*$/) || [])[0] || "";
-}
-function isHTML(url) {
- return !!getExtension(url).match(/^(?:|\.(?:htm|html|xhtml|php))$/);
-}
-function isPrefixedBy(baseURL, url) {
- const prefix = getPrefix(url);
- return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);
-}
-function locationIsVisitable(location, rootLocation) {
- return isPrefixedBy(location, rootLocation) && isHTML(location);
-}
-function getRequestURL(url) {
- const anchor = getAnchor(url);
- return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;
-}
-function toCacheKey(url) {
- return getRequestURL(url);
-}
-function urlsAreEqual(left, right) {
- return expandURL(left).href == expandURL(right).href;
-}
-function getPathComponents(url) {
- return url.pathname.split("/").slice(1);
-}
-function getLastPathComponent(url) {
- return getPathComponents(url).slice(-1)[0];
-}
-function getPrefix(url) {
- return addTrailingSlash(url.origin + url.pathname);
-}
-function addTrailingSlash(value) {
- return value.endsWith("/") ? value : value + "/";
-}
-
-class FetchResponse {
- constructor(response) {
- this.response = response;
- }
- get succeeded() {
- return this.response.ok;
- }
- get failed() {
- return !this.succeeded;
- }
- get clientError() {
- return this.statusCode >= 400 && this.statusCode <= 499;
- }
- get serverError() {
- return this.statusCode >= 500 && this.statusCode <= 599;
- }
- get redirected() {
- return this.response.redirected;
- }
- get location() {
- return expandURL(this.response.url);
- }
- get isHTML() {
- return this.contentType && this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/);
- }
- get statusCode() {
- return this.response.status;
- }
- get contentType() {
- return this.header("Content-Type");
- }
- get responseText() {
- return this.response.clone().text();
- }
- get responseHTML() {
- if (this.isHTML) {
- return this.response.clone().text();
- }
- else {
- return Promise.resolve(undefined);
- }
- }
- header(name) {
- return this.response.headers.get(name);
- }
-}
-
-function activateScriptElement(element) {
- if (element.getAttribute("data-turbo-eval") == "false") {
- return element;
- }
- else {
- const createdScriptElement = document.createElement("script");
- const cspNonce = getMetaContent("csp-nonce");
- if (cspNonce) {
- createdScriptElement.nonce = cspNonce;
- }
- createdScriptElement.textContent = element.textContent;
- createdScriptElement.async = false;
- copyElementAttributes(createdScriptElement, element);
- return createdScriptElement;
- }
-}
-function copyElementAttributes(destinationElement, sourceElement) {
- for (const { name, value } of sourceElement.attributes) {
- destinationElement.setAttribute(name, value);
- }
-}
-function createDocumentFragment(html) {
- const template = document.createElement("template");
- template.innerHTML = html;
- return template.content;
-}
-function dispatch(eventName, { target, cancelable, detail } = {}) {
- const event = new CustomEvent(eventName, {
- cancelable,
- bubbles: true,
- composed: true,
- detail,
- });
- if (target && target.isConnected) {
- target.dispatchEvent(event);
- }
- else {
- document.documentElement.dispatchEvent(event);
- }
- return event;
-}
-function nextAnimationFrame() {
- return new Promise((resolve) => requestAnimationFrame(() => resolve()));
-}
-function nextEventLoopTick() {
- return new Promise((resolve) => setTimeout(() => resolve(), 0));
-}
-function nextMicrotask() {
- return Promise.resolve();
-}
-function parseHTMLDocument(html = "") {
- return new DOMParser().parseFromString(html, "text/html");
-}
-function unindent(strings, ...values) {
- const lines = interpolate(strings, values).replace(/^\n/, "").split("\n");
- const match = lines[0].match(/^\s+/);
- const indent = match ? match[0].length : 0;
- return lines.map((line) => line.slice(indent)).join("\n");
-}
-function interpolate(strings, values) {
- return strings.reduce((result, string, i) => {
- const value = values[i] == undefined ? "" : values[i];
- return result + string + value;
- }, "");
-}
-function uuid() {
- return Array.from({ length: 36 })
- .map((_, i) => {
- if (i == 8 || i == 13 || i == 18 || i == 23) {
- return "-";
- }
- else if (i == 14) {
- return "4";
- }
- else if (i == 19) {
- return (Math.floor(Math.random() * 4) + 8).toString(16);
- }
- else {
- return Math.floor(Math.random() * 15).toString(16);
- }
- })
- .join("");
-}
-function getAttribute(attributeName, ...elements) {
- for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {
- if (typeof value == "string")
- return value;
- }
- return null;
-}
-function hasAttribute(attributeName, ...elements) {
- return elements.some((element) => element && element.hasAttribute(attributeName));
-}
-function markAsBusy(...elements) {
- for (const element of elements) {
- if (element.localName == "turbo-frame") {
- element.setAttribute("busy", "");
- }
- element.setAttribute("aria-busy", "true");
- }
-}
-function clearBusyState(...elements) {
- for (const element of elements) {
- if (element.localName == "turbo-frame") {
- element.removeAttribute("busy");
- }
- element.removeAttribute("aria-busy");
- }
-}
-function waitForLoad(element, timeoutInMilliseconds = 2000) {
- return new Promise((resolve) => {
- const onComplete = () => {
- element.removeEventListener("error", onComplete);
- element.removeEventListener("load", onComplete);
- resolve();
- };
- element.addEventListener("load", onComplete, { once: true });
- element.addEventListener("error", onComplete, { once: true });
- setTimeout(resolve, timeoutInMilliseconds);
- });
-}
-function getHistoryMethodForAction(action) {
- switch (action) {
- case "replace":
- return history.replaceState;
- case "advance":
- case "restore":
- return history.pushState;
- }
-}
-function isAction(action) {
- return action == "advance" || action == "replace" || action == "restore";
-}
-function getVisitAction(...elements) {
- const action = getAttribute("data-turbo-action", ...elements);
- return isAction(action) ? action : null;
-}
-function getMetaElement(name) {
- return document.querySelector(`meta[name="${name}"]`);
-}
-function getMetaContent(name) {
- const element = getMetaElement(name);
- return element && element.content;
-}
-function setMetaContent(name, content) {
- let element = getMetaElement(name);
- if (!element) {
- element = document.createElement("meta");
- element.setAttribute("name", name);
- document.head.appendChild(element);
- }
- element.setAttribute("content", content);
- return element;
-}
-function findClosestRecursively(element, selector) {
- var _a;
- if (element instanceof Element) {
- return (element.closest(selector) ||
- findClosestRecursively(element.assignedSlot || ((_a = element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host), selector));
- }
-}
-
-var FetchMethod;
-(function (FetchMethod) {
- FetchMethod[FetchMethod["get"] = 0] = "get";
- FetchMethod[FetchMethod["post"] = 1] = "post";
- FetchMethod[FetchMethod["put"] = 2] = "put";
- FetchMethod[FetchMethod["patch"] = 3] = "patch";
- FetchMethod[FetchMethod["delete"] = 4] = "delete";
-})(FetchMethod || (FetchMethod = {}));
-function fetchMethodFromString(method) {
- switch (method.toLowerCase()) {
- case "get":
- return FetchMethod.get;
- case "post":
- return FetchMethod.post;
- case "put":
- return FetchMethod.put;
- case "patch":
- return FetchMethod.patch;
- case "delete":
- return FetchMethod.delete;
- }
-}
-class FetchRequest {
- constructor(delegate, method, location, body = new URLSearchParams(), target = null) {
- this.abortController = new AbortController();
- this.resolveRequestPromise = (_value) => { };
- this.delegate = delegate;
- this.method = method;
- this.headers = this.defaultHeaders;
- this.body = body;
- this.url = location;
- this.target = target;
- }
- get location() {
- return this.url;
- }
- get params() {
- return this.url.searchParams;
- }
- get entries() {
- return this.body ? Array.from(this.body.entries()) : [];
- }
- cancel() {
- this.abortController.abort();
- }
- async perform() {
- const { fetchOptions } = this;
- this.delegate.prepareRequest(this);
- await this.allowRequestToBeIntercepted(fetchOptions);
- try {
- this.delegate.requestStarted(this);
- const response = await fetch(this.url.href, fetchOptions);
- return await this.receive(response);
- }
- catch (error) {
- if (error.name !== "AbortError") {
- if (this.willDelegateErrorHandling(error)) {
- this.delegate.requestErrored(this, error);
- }
- throw error;
- }
- }
- finally {
- this.delegate.requestFinished(this);
- }
- }
- async receive(response) {
- const fetchResponse = new FetchResponse(response);
- const event = dispatch("turbo:before-fetch-response", {
- cancelable: true,
- detail: { fetchResponse },
- target: this.target,
- });
- if (event.defaultPrevented) {
- this.delegate.requestPreventedHandlingResponse(this, fetchResponse);
- }
- else if (fetchResponse.succeeded) {
- this.delegate.requestSucceededWithResponse(this, fetchResponse);
- }
- else {
- this.delegate.requestFailedWithResponse(this, fetchResponse);
- }
- return fetchResponse;
- }
- get fetchOptions() {
- var _a;
- return {
- method: FetchMethod[this.method].toUpperCase(),
- credentials: "same-origin",
- headers: this.headers,
- redirect: "follow",
- body: this.isSafe ? null : this.body,
- signal: this.abortSignal,
- referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,
- };
- }
- get defaultHeaders() {
- return {
- Accept: "text/html, application/xhtml+xml",
- };
- }
- get isSafe() {
- return this.method === FetchMethod.get;
- }
- get abortSignal() {
- return this.abortController.signal;
- }
- acceptResponseType(mimeType) {
- this.headers["Accept"] = [mimeType, this.headers["Accept"]].join(", ");
- }
- async allowRequestToBeIntercepted(fetchOptions) {
- const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));
- const event = dispatch("turbo:before-fetch-request", {
- cancelable: true,
- detail: {
- fetchOptions,
- url: this.url,
- resume: this.resolveRequestPromise,
- },
- target: this.target,
- });
- if (event.defaultPrevented)
- await requestInterception;
- }
- willDelegateErrorHandling(error) {
- const event = dispatch("turbo:fetch-request-error", {
- target: this.target,
- cancelable: true,
- detail: { request: this, error: error },
- });
- return !event.defaultPrevented;
- }
-}
-
-class AppearanceObserver {
- constructor(delegate, element) {
- this.started = false;
- this.intersect = (entries) => {
- const lastEntry = entries.slice(-1)[0];
- if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {
- this.delegate.elementAppearedInViewport(this.element);
- }
- };
- this.delegate = delegate;
- this.element = element;
- this.intersectionObserver = new IntersectionObserver(this.intersect);
- }
- start() {
- if (!this.started) {
- this.started = true;
- this.intersectionObserver.observe(this.element);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- this.intersectionObserver.unobserve(this.element);
- }
- }
-}
-
-class StreamMessage {
- static wrap(message) {
- if (typeof message == "string") {
- return new this(createDocumentFragment(message));
- }
- else {
- return message;
- }
- }
- constructor(fragment) {
- this.fragment = importStreamElements(fragment);
- }
-}
-StreamMessage.contentType = "text/vnd.turbo-stream.html";
-function importStreamElements(fragment) {
- for (const element of fragment.querySelectorAll("turbo-stream")) {
- const streamElement = document.importNode(element, true);
- for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll("script")) {
- inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));
- }
- element.replaceWith(streamElement);
- }
- return fragment;
-}
-
-var FormSubmissionState;
-(function (FormSubmissionState) {
- FormSubmissionState[FormSubmissionState["initialized"] = 0] = "initialized";
- FormSubmissionState[FormSubmissionState["requesting"] = 1] = "requesting";
- FormSubmissionState[FormSubmissionState["waiting"] = 2] = "waiting";
- FormSubmissionState[FormSubmissionState["receiving"] = 3] = "receiving";
- FormSubmissionState[FormSubmissionState["stopping"] = 4] = "stopping";
- FormSubmissionState[FormSubmissionState["stopped"] = 5] = "stopped";
-})(FormSubmissionState || (FormSubmissionState = {}));
-var FormEnctype;
-(function (FormEnctype) {
- FormEnctype["urlEncoded"] = "application/x-www-form-urlencoded";
- FormEnctype["multipart"] = "multipart/form-data";
- FormEnctype["plain"] = "text/plain";
-})(FormEnctype || (FormEnctype = {}));
-function formEnctypeFromString(encoding) {
- switch (encoding.toLowerCase()) {
- case FormEnctype.multipart:
- return FormEnctype.multipart;
- case FormEnctype.plain:
- return FormEnctype.plain;
- default:
- return FormEnctype.urlEncoded;
- }
-}
-class FormSubmission {
- static confirmMethod(message, _element, _submitter) {
- return Promise.resolve(confirm(message));
- }
- constructor(delegate, formElement, submitter, mustRedirect = false) {
- this.state = FormSubmissionState.initialized;
- this.delegate = delegate;
- this.formElement = formElement;
- this.submitter = submitter;
- this.formData = buildFormData(formElement, submitter);
- this.location = expandURL(this.action);
- if (this.method == FetchMethod.get) {
- mergeFormDataEntries(this.location, [...this.body.entries()]);
- }
- this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);
- this.mustRedirect = mustRedirect;
- }
- get method() {
- var _a;
- const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formmethod")) || this.formElement.getAttribute("method") || "";
- return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;
- }
- get action() {
- var _a;
- const formElementAction = typeof this.formElement.action === "string" ? this.formElement.action : null;
- if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute("formaction")) {
- return this.submitter.getAttribute("formaction") || "";
- }
- else {
- return this.formElement.getAttribute("action") || formElementAction || "";
- }
- }
- get body() {
- if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {
- return new URLSearchParams(this.stringFormData);
- }
- else {
- return this.formData;
- }
- }
- get enctype() {
- var _a;
- return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("formenctype")) || this.formElement.enctype);
- }
- get isSafe() {
- return this.fetchRequest.isSafe;
- }
- get stringFormData() {
- return [...this.formData].reduce((entries, [name, value]) => {
- return entries.concat(typeof value == "string" ? [[name, value]] : []);
- }, []);
- }
- async start() {
- const { initialized, requesting } = FormSubmissionState;
- const confirmationMessage = getAttribute("data-turbo-confirm", this.submitter, this.formElement);
- if (typeof confirmationMessage === "string") {
- const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);
- if (!answer) {
- return;
- }
- }
- if (this.state == initialized) {
- this.state = requesting;
- return this.fetchRequest.perform();
- }
- }
- stop() {
- const { stopping, stopped } = FormSubmissionState;
- if (this.state != stopping && this.state != stopped) {
- this.state = stopping;
- this.fetchRequest.cancel();
- return true;
- }
- }
- prepareRequest(request) {
- if (!request.isSafe) {
- const token = getCookieValue(getMetaContent("csrf-param")) || getMetaContent("csrf-token");
- if (token) {
- request.headers["X-CSRF-Token"] = token;
- }
- }
- if (this.requestAcceptsTurboStreamResponse(request)) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted(_request) {
- var _a;
- this.state = FormSubmissionState.waiting;
- (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute("disabled", "");
- this.setSubmitsWith();
- dispatch("turbo:submit-start", {
- target: this.formElement,
- detail: { formSubmission: this },
- });
- this.delegate.formSubmissionStarted(this);
- }
- requestPreventedHandlingResponse(request, response) {
- this.result = { success: response.succeeded, fetchResponse: response };
- }
- requestSucceededWithResponse(request, response) {
- if (response.clientError || response.serverError) {
- this.delegate.formSubmissionFailedWithResponse(this, response);
- }
- else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {
- const error = new Error("Form responses must redirect to another location");
- this.delegate.formSubmissionErrored(this, error);
- }
- else {
- this.state = FormSubmissionState.receiving;
- this.result = { success: true, fetchResponse: response };
- this.delegate.formSubmissionSucceededWithResponse(this, response);
- }
- }
- requestFailedWithResponse(request, response) {
- this.result = { success: false, fetchResponse: response };
- this.delegate.formSubmissionFailedWithResponse(this, response);
- }
- requestErrored(request, error) {
- this.result = { success: false, error };
- this.delegate.formSubmissionErrored(this, error);
- }
- requestFinished(_request) {
- var _a;
- this.state = FormSubmissionState.stopped;
- (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute("disabled");
- this.resetSubmitterText();
- dispatch("turbo:submit-end", {
- target: this.formElement,
- detail: Object.assign({ formSubmission: this }, this.result),
- });
- this.delegate.formSubmissionFinished(this);
- }
- setSubmitsWith() {
- if (!this.submitter || !this.submitsWith)
- return;
- if (this.submitter.matches("button")) {
- this.originalSubmitText = this.submitter.innerHTML;
- this.submitter.innerHTML = this.submitsWith;
- }
- else if (this.submitter.matches("input")) {
- const input = this.submitter;
- this.originalSubmitText = input.value;
- input.value = this.submitsWith;
- }
- }
- resetSubmitterText() {
- if (!this.submitter || !this.originalSubmitText)
- return;
- if (this.submitter.matches("button")) {
- this.submitter.innerHTML = this.originalSubmitText;
- }
- else if (this.submitter.matches("input")) {
- const input = this.submitter;
- input.value = this.originalSubmitText;
- }
- }
- requestMustRedirect(request) {
- return !request.isSafe && this.mustRedirect;
- }
- requestAcceptsTurboStreamResponse(request) {
- return !request.isSafe || hasAttribute("data-turbo-stream", this.submitter, this.formElement);
- }
- get submitsWith() {
- var _a;
- return (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute("data-turbo-submits-with");
- }
-}
-function buildFormData(formElement, submitter) {
- const formData = new FormData(formElement);
- const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("name");
- const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("value");
- if (name) {
- formData.append(name, value || "");
- }
- return formData;
-}
-function getCookieValue(cookieName) {
- if (cookieName != null) {
- const cookies = document.cookie ? document.cookie.split("; ") : [];
- const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));
- if (cookie) {
- const value = cookie.split("=").slice(1).join("=");
- return value ? decodeURIComponent(value) : undefined;
- }
- }
-}
-function responseSucceededWithoutRedirect(response) {
- return response.statusCode == 200 && !response.redirected;
-}
-function mergeFormDataEntries(url, entries) {
- const searchParams = new URLSearchParams();
- for (const [name, value] of entries) {
- if (value instanceof File)
- continue;
- searchParams.append(name, value);
- }
- url.search = searchParams.toString();
- return url;
-}
-
-class Snapshot {
- constructor(element) {
- this.element = element;
- }
- get activeElement() {
- return this.element.ownerDocument.activeElement;
- }
- get children() {
- return [...this.element.children];
- }
- hasAnchor(anchor) {
- return this.getElementForAnchor(anchor) != null;
- }
- getElementForAnchor(anchor) {
- return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;
- }
- get isConnected() {
- return this.element.isConnected;
- }
- get firstAutofocusableElement() {
- const inertDisabledOrHidden = "[inert], :disabled, [hidden], details:not([open]), dialog:not([open])";
- for (const element of this.element.querySelectorAll("[autofocus]")) {
- if (element.closest(inertDisabledOrHidden) == null)
- return element;
- else
- continue;
- }
- return null;
- }
- get permanentElements() {
- return queryPermanentElementsAll(this.element);
- }
- getPermanentElementById(id) {
- return getPermanentElementById(this.element, id);
- }
- getPermanentElementMapForSnapshot(snapshot) {
- const permanentElementMap = {};
- for (const currentPermanentElement of this.permanentElements) {
- const { id } = currentPermanentElement;
- const newPermanentElement = snapshot.getPermanentElementById(id);
- if (newPermanentElement) {
- permanentElementMap[id] = [currentPermanentElement, newPermanentElement];
- }
- }
- return permanentElementMap;
- }
-}
-function getPermanentElementById(node, id) {
- return node.querySelector(`#${id}[data-turbo-permanent]`);
-}
-function queryPermanentElementsAll(node) {
- return node.querySelectorAll("[id][data-turbo-permanent]");
-}
-
-class FormSubmitObserver {
- constructor(delegate, eventTarget) {
- this.started = false;
- this.submitCaptured = () => {
- this.eventTarget.removeEventListener("submit", this.submitBubbled, false);
- this.eventTarget.addEventListener("submit", this.submitBubbled, false);
- };
- this.submitBubbled = ((event) => {
- if (!event.defaultPrevented) {
- const form = event.target instanceof HTMLFormElement ? event.target : undefined;
- const submitter = event.submitter || undefined;
- if (form &&
- submissionDoesNotDismissDialog(form, submitter) &&
- submissionDoesNotTargetIFrame(form, submitter) &&
- this.delegate.willSubmitForm(form, submitter)) {
- event.preventDefault();
- event.stopImmediatePropagation();
- this.delegate.formSubmitted(form, submitter);
- }
- }
- });
- this.delegate = delegate;
- this.eventTarget = eventTarget;
- }
- start() {
- if (!this.started) {
- this.eventTarget.addEventListener("submit", this.submitCaptured, true);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- this.eventTarget.removeEventListener("submit", this.submitCaptured, true);
- this.started = false;
- }
- }
-}
-function submissionDoesNotDismissDialog(form, submitter) {
- const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formmethod")) || form.getAttribute("method");
- return method != "dialog";
-}
-function submissionDoesNotTargetIFrame(form, submitter) {
- if ((submitter === null || submitter === void 0 ? void 0 : submitter.hasAttribute("formtarget")) || form.hasAttribute("target")) {
- const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("formtarget")) || form.target;
- for (const element of document.getElementsByName(target)) {
- if (element instanceof HTMLIFrameElement)
- return false;
- }
- return true;
- }
- else {
- return true;
- }
-}
-
-class View {
- constructor(delegate, element) {
- this.resolveRenderPromise = (_value) => { };
- this.resolveInterceptionPromise = (_value) => { };
- this.delegate = delegate;
- this.element = element;
- }
- scrollToAnchor(anchor) {
- const element = this.snapshot.getElementForAnchor(anchor);
- if (element) {
- this.scrollToElement(element);
- this.focusElement(element);
- }
- else {
- this.scrollToPosition({ x: 0, y: 0 });
- }
- }
- scrollToAnchorFromLocation(location) {
- this.scrollToAnchor(getAnchor(location));
- }
- scrollToElement(element) {
- element.scrollIntoView();
- }
- focusElement(element) {
- if (element instanceof HTMLElement) {
- if (element.hasAttribute("tabindex")) {
- element.focus();
- }
- else {
- element.setAttribute("tabindex", "-1");
- element.focus();
- element.removeAttribute("tabindex");
- }
- }
- }
- scrollToPosition({ x, y }) {
- this.scrollRoot.scrollTo(x, y);
- }
- scrollToTop() {
- this.scrollToPosition({ x: 0, y: 0 });
- }
- get scrollRoot() {
- return window;
- }
- async render(renderer) {
- const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;
- if (shouldRender) {
- try {
- this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));
- this.renderer = renderer;
- await this.prepareToRenderSnapshot(renderer);
- const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));
- const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };
- const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);
- if (!immediateRender)
- await renderInterception;
- await this.renderSnapshot(renderer);
- this.delegate.viewRenderedSnapshot(snapshot, isPreview);
- this.delegate.preloadOnLoadLinksForView(this.element);
- this.finishRenderingSnapshot(renderer);
- }
- finally {
- delete this.renderer;
- this.resolveRenderPromise(undefined);
- delete this.renderPromise;
- }
- }
- else {
- this.invalidate(renderer.reloadReason);
- }
- }
- invalidate(reason) {
- this.delegate.viewInvalidated(reason);
- }
- async prepareToRenderSnapshot(renderer) {
- this.markAsPreview(renderer.isPreview);
- await renderer.prepareToRender();
- }
- markAsPreview(isPreview) {
- if (isPreview) {
- this.element.setAttribute("data-turbo-preview", "");
- }
- else {
- this.element.removeAttribute("data-turbo-preview");
- }
- }
- async renderSnapshot(renderer) {
- await renderer.render();
- }
- finishRenderingSnapshot(renderer) {
- renderer.finishRendering();
- }
-}
-
-class FrameView extends View {
- missing() {
- this.element.innerHTML = `Content missing`;
- }
- get snapshot() {
- return new Snapshot(this.element);
- }
-}
-
-class LinkInterceptor {
- constructor(delegate, element) {
- this.clickBubbled = (event) => {
- if (this.respondsToEventTarget(event.target)) {
- this.clickEvent = event;
- }
- else {
- delete this.clickEvent;
- }
- };
- this.linkClicked = ((event) => {
- if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {
- if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {
- this.clickEvent.preventDefault();
- event.preventDefault();
- this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);
- }
- }
- delete this.clickEvent;
- });
- this.willVisit = ((_event) => {
- delete this.clickEvent;
- });
- this.delegate = delegate;
- this.element = element;
- }
- start() {
- this.element.addEventListener("click", this.clickBubbled);
- document.addEventListener("turbo:click", this.linkClicked);
- document.addEventListener("turbo:before-visit", this.willVisit);
- }
- stop() {
- this.element.removeEventListener("click", this.clickBubbled);
- document.removeEventListener("turbo:click", this.linkClicked);
- document.removeEventListener("turbo:before-visit", this.willVisit);
- }
- respondsToEventTarget(target) {
- const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;
- return element && element.closest("turbo-frame, html") == this.element;
- }
-}
-
-class LinkClickObserver {
- constructor(delegate, eventTarget) {
- this.started = false;
- this.clickCaptured = () => {
- this.eventTarget.removeEventListener("click", this.clickBubbled, false);
- this.eventTarget.addEventListener("click", this.clickBubbled, false);
- };
- this.clickBubbled = (event) => {
- if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {
- const target = (event.composedPath && event.composedPath()[0]) || event.target;
- const link = this.findLinkFromClickTarget(target);
- if (link && doesNotTargetIFrame(link)) {
- const location = this.getLocationForLink(link);
- if (this.delegate.willFollowLinkToLocation(link, location, event)) {
- event.preventDefault();
- this.delegate.followedLinkToLocation(link, location);
- }
- }
- }
- };
- this.delegate = delegate;
- this.eventTarget = eventTarget;
- }
- start() {
- if (!this.started) {
- this.eventTarget.addEventListener("click", this.clickCaptured, true);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- this.eventTarget.removeEventListener("click", this.clickCaptured, true);
- this.started = false;
- }
- }
- clickEventIsSignificant(event) {
- return !((event.target && event.target.isContentEditable) ||
- event.defaultPrevented ||
- event.which > 1 ||
- event.altKey ||
- event.ctrlKey ||
- event.metaKey ||
- event.shiftKey);
- }
- findLinkFromClickTarget(target) {
- return findClosestRecursively(target, "a[href]:not([target^=_]):not([download])");
- }
- getLocationForLink(link) {
- return expandURL(link.getAttribute("href") || "");
- }
-}
-function doesNotTargetIFrame(anchor) {
- if (anchor.hasAttribute("target")) {
- for (const element of document.getElementsByName(anchor.target)) {
- if (element instanceof HTMLIFrameElement)
- return false;
- }
- return true;
- }
- else {
- return true;
- }
-}
-
-class FormLinkClickObserver {
- constructor(delegate, element) {
- this.delegate = delegate;
- this.linkInterceptor = new LinkClickObserver(this, element);
- }
- start() {
- this.linkInterceptor.start();
- }
- stop() {
- this.linkInterceptor.stop();
- }
- willFollowLinkToLocation(link, location, originalEvent) {
- return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&
- link.hasAttribute("data-turbo-method"));
- }
- followedLinkToLocation(link, location) {
- const form = document.createElement("form");
- const type = "hidden";
- for (const [name, value] of location.searchParams) {
- form.append(Object.assign(document.createElement("input"), { type, name, value }));
- }
- const action = Object.assign(location, { search: "" });
- form.setAttribute("data-turbo", "true");
- form.setAttribute("action", action.href);
- form.setAttribute("hidden", "");
- const method = link.getAttribute("data-turbo-method");
- if (method)
- form.setAttribute("method", method);
- const turboFrame = link.getAttribute("data-turbo-frame");
- if (turboFrame)
- form.setAttribute("data-turbo-frame", turboFrame);
- const turboAction = getVisitAction(link);
- if (turboAction)
- form.setAttribute("data-turbo-action", turboAction);
- const turboConfirm = link.getAttribute("data-turbo-confirm");
- if (turboConfirm)
- form.setAttribute("data-turbo-confirm", turboConfirm);
- const turboStream = link.hasAttribute("data-turbo-stream");
- if (turboStream)
- form.setAttribute("data-turbo-stream", "");
- this.delegate.submittedFormLinkToLocation(link, location, form);
- document.body.appendChild(form);
- form.addEventListener("turbo:submit-end", () => form.remove(), { once: true });
- requestAnimationFrame(() => form.requestSubmit());
- }
-}
-
-class Bardo {
- static async preservingPermanentElements(delegate, permanentElementMap, callback) {
- const bardo = new this(delegate, permanentElementMap);
- bardo.enter();
- await callback();
- bardo.leave();
- }
- constructor(delegate, permanentElementMap) {
- this.delegate = delegate;
- this.permanentElementMap = permanentElementMap;
- }
- enter() {
- for (const id in this.permanentElementMap) {
- const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];
- this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);
- this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);
- }
- }
- leave() {
- for (const id in this.permanentElementMap) {
- const [currentPermanentElement] = this.permanentElementMap[id];
- this.replaceCurrentPermanentElementWithClone(currentPermanentElement);
- this.replacePlaceholderWithPermanentElement(currentPermanentElement);
- this.delegate.leavingBardo(currentPermanentElement);
- }
- }
- replaceNewPermanentElementWithPlaceholder(permanentElement) {
- const placeholder = createPlaceholderForPermanentElement(permanentElement);
- permanentElement.replaceWith(placeholder);
- }
- replaceCurrentPermanentElementWithClone(permanentElement) {
- const clone = permanentElement.cloneNode(true);
- permanentElement.replaceWith(clone);
- }
- replacePlaceholderWithPermanentElement(permanentElement) {
- const placeholder = this.getPlaceholderById(permanentElement.id);
- placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);
- }
- getPlaceholderById(id) {
- return this.placeholders.find((element) => element.content == id);
- }
- get placeholders() {
- return [...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")];
- }
-}
-function createPlaceholderForPermanentElement(permanentElement) {
- const element = document.createElement("meta");
- element.setAttribute("name", "turbo-permanent-placeholder");
- element.setAttribute("content", permanentElement.id);
- return element;
-}
-
-class Renderer {
- constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {
- this.activeElement = null;
- this.currentSnapshot = currentSnapshot;
- this.newSnapshot = newSnapshot;
- this.isPreview = isPreview;
- this.willRender = willRender;
- this.renderElement = renderElement;
- this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));
- }
- get shouldRender() {
- return true;
- }
- get reloadReason() {
- return;
- }
- prepareToRender() {
- return;
- }
- finishRendering() {
- if (this.resolvingFunctions) {
- this.resolvingFunctions.resolve();
- delete this.resolvingFunctions;
- }
- }
- async preservingPermanentElements(callback) {
- await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);
- }
- focusFirstAutofocusableElement() {
- const element = this.connectedSnapshot.firstAutofocusableElement;
- if (elementIsFocusable(element)) {
- element.focus();
- }
- }
- enteringBardo(currentPermanentElement) {
- if (this.activeElement)
- return;
- if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {
- this.activeElement = this.currentSnapshot.activeElement;
- }
- }
- leavingBardo(currentPermanentElement) {
- if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {
- this.activeElement.focus();
- this.activeElement = null;
- }
- }
- get connectedSnapshot() {
- return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;
- }
- get currentElement() {
- return this.currentSnapshot.element;
- }
- get newElement() {
- return this.newSnapshot.element;
- }
- get permanentElementMap() {
- return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);
- }
-}
-function elementIsFocusable(element) {
- return element && typeof element.focus == "function";
-}
-
-class FrameRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- var _a;
- const destinationRange = document.createRange();
- destinationRange.selectNodeContents(currentElement);
- destinationRange.deleteContents();
- const frameElement = newElement;
- const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();
- if (sourceRange) {
- sourceRange.selectNodeContents(frameElement);
- currentElement.appendChild(sourceRange.extractContents());
- }
- }
- constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {
- super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);
- this.delegate = delegate;
- }
- get shouldRender() {
- return true;
- }
- async render() {
- await nextAnimationFrame();
- this.preservingPermanentElements(() => {
- this.loadFrameElement();
- });
- this.scrollFrameIntoView();
- await nextAnimationFrame();
- this.focusFirstAutofocusableElement();
- await nextAnimationFrame();
- this.activateScriptElements();
- }
- loadFrameElement() {
- this.delegate.willRenderFrame(this.currentElement, this.newElement);
- this.renderElement(this.currentElement, this.newElement);
- }
- scrollFrameIntoView() {
- if (this.currentElement.autoscroll || this.newElement.autoscroll) {
- const element = this.currentElement.firstElementChild;
- const block = readScrollLogicalPosition(this.currentElement.getAttribute("data-autoscroll-block"), "end");
- const behavior = readScrollBehavior(this.currentElement.getAttribute("data-autoscroll-behavior"), "auto");
- if (element) {
- element.scrollIntoView({ block, behavior });
- return true;
- }
- }
- return false;
- }
- activateScriptElements() {
- for (const inertScriptElement of this.newScriptElements) {
- const activatedScriptElement = activateScriptElement(inertScriptElement);
- inertScriptElement.replaceWith(activatedScriptElement);
- }
- }
- get newScriptElements() {
- return this.currentElement.querySelectorAll("script");
- }
-}
-function readScrollLogicalPosition(value, defaultValue) {
- if (value == "end" || value == "start" || value == "center" || value == "nearest") {
- return value;
- }
- else {
- return defaultValue;
- }
-}
-function readScrollBehavior(value, defaultValue) {
- if (value == "auto" || value == "smooth") {
- return value;
- }
- else {
- return defaultValue;
- }
-}
-
-class ProgressBar {
- static get defaultCSS() {
- return unindent `
- .turbo-progress-bar {
- position: fixed;
- display: block;
- top: 0;
- left: 0;
- height: 3px;
- background: #0076ff;
- z-index: 2147483647;
- transition:
- width ${ProgressBar.animationDuration}ms ease-out,
- opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;
- transform: translate3d(0, 0, 0);
- }
- `;
- }
- constructor() {
- this.hiding = false;
- this.value = 0;
- this.visible = false;
- this.trickle = () => {
- this.setValue(this.value + Math.random() / 100);
- };
- this.stylesheetElement = this.createStylesheetElement();
- this.progressElement = this.createProgressElement();
- this.installStylesheetElement();
- this.setValue(0);
- }
- show() {
- if (!this.visible) {
- this.visible = true;
- this.installProgressElement();
- this.startTrickling();
- }
- }
- hide() {
- if (this.visible && !this.hiding) {
- this.hiding = true;
- this.fadeProgressElement(() => {
- this.uninstallProgressElement();
- this.stopTrickling();
- this.visible = false;
- this.hiding = false;
- });
- }
- }
- setValue(value) {
- this.value = value;
- this.refresh();
- }
- installStylesheetElement() {
- document.head.insertBefore(this.stylesheetElement, document.head.firstChild);
- }
- installProgressElement() {
- this.progressElement.style.width = "0";
- this.progressElement.style.opacity = "1";
- document.documentElement.insertBefore(this.progressElement, document.body);
- this.refresh();
- }
- fadeProgressElement(callback) {
- this.progressElement.style.opacity = "0";
- setTimeout(callback, ProgressBar.animationDuration * 1.5);
- }
- uninstallProgressElement() {
- if (this.progressElement.parentNode) {
- document.documentElement.removeChild(this.progressElement);
- }
- }
- startTrickling() {
- if (!this.trickleInterval) {
- this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);
- }
- }
- stopTrickling() {
- window.clearInterval(this.trickleInterval);
- delete this.trickleInterval;
- }
- refresh() {
- requestAnimationFrame(() => {
- this.progressElement.style.width = `${10 + this.value * 90}%`;
- });
- }
- createStylesheetElement() {
- const element = document.createElement("style");
- element.type = "text/css";
- element.textContent = ProgressBar.defaultCSS;
- if (this.cspNonce) {
- element.nonce = this.cspNonce;
- }
- return element;
- }
- createProgressElement() {
- const element = document.createElement("div");
- element.className = "turbo-progress-bar";
- return element;
- }
- get cspNonce() {
- return getMetaContent("csp-nonce");
- }
-}
-ProgressBar.animationDuration = 300;
-
-class HeadSnapshot extends Snapshot {
- constructor() {
- super(...arguments);
- this.detailsByOuterHTML = this.children
- .filter((element) => !elementIsNoscript(element))
- .map((element) => elementWithoutNonce(element))
- .reduce((result, element) => {
- const { outerHTML } = element;
- const details = outerHTML in result
- ? result[outerHTML]
- : {
- type: elementType(element),
- tracked: elementIsTracked(element),
- elements: [],
- };
- return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });
- }, {});
- }
- get trackedElementSignature() {
- return Object.keys(this.detailsByOuterHTML)
- .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)
- .join("");
- }
- getScriptElementsNotInSnapshot(snapshot) {
- return this.getElementsMatchingTypeNotInSnapshot("script", snapshot);
- }
- getStylesheetElementsNotInSnapshot(snapshot) {
- return this.getElementsMatchingTypeNotInSnapshot("stylesheet", snapshot);
- }
- getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {
- return Object.keys(this.detailsByOuterHTML)
- .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))
- .map((outerHTML) => this.detailsByOuterHTML[outerHTML])
- .filter(({ type }) => type == matchedType)
- .map(({ elements: [element] }) => element);
- }
- get provisionalElements() {
- return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {
- const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];
- if (type == null && !tracked) {
- return [...result, ...elements];
- }
- else if (elements.length > 1) {
- return [...result, ...elements.slice(1)];
- }
- else {
- return result;
- }
- }, []);
- }
- getMetaValue(name) {
- const element = this.findMetaElementByName(name);
- return element ? element.getAttribute("content") : null;
- }
- findMetaElementByName(name) {
- return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {
- const { elements: [element], } = this.detailsByOuterHTML[outerHTML];
- return elementIsMetaElementWithName(element, name) ? element : result;
- }, undefined);
- }
-}
-function elementType(element) {
- if (elementIsScript(element)) {
- return "script";
- }
- else if (elementIsStylesheet(element)) {
- return "stylesheet";
- }
-}
-function elementIsTracked(element) {
- return element.getAttribute("data-turbo-track") == "reload";
-}
-function elementIsScript(element) {
- const tagName = element.localName;
- return tagName == "script";
-}
-function elementIsNoscript(element) {
- const tagName = element.localName;
- return tagName == "noscript";
-}
-function elementIsStylesheet(element) {
- const tagName = element.localName;
- return tagName == "style" || (tagName == "link" && element.getAttribute("rel") == "stylesheet");
-}
-function elementIsMetaElementWithName(element, name) {
- const tagName = element.localName;
- return tagName == "meta" && element.getAttribute("name") == name;
-}
-function elementWithoutNonce(element) {
- if (element.hasAttribute("nonce")) {
- element.setAttribute("nonce", "");
- }
- return element;
-}
-
-class PageSnapshot extends Snapshot {
- static fromHTMLString(html = "") {
- return this.fromDocument(parseHTMLDocument(html));
- }
- static fromElement(element) {
- return this.fromDocument(element.ownerDocument);
- }
- static fromDocument({ head, body }) {
- return new this(body, new HeadSnapshot(head));
- }
- constructor(element, headSnapshot) {
- super(element);
- this.headSnapshot = headSnapshot;
- }
- clone() {
- const clonedElement = this.element.cloneNode(true);
- const selectElements = this.element.querySelectorAll("select");
- const clonedSelectElements = clonedElement.querySelectorAll("select");
- for (const [index, source] of selectElements.entries()) {
- const clone = clonedSelectElements[index];
- for (const option of clone.selectedOptions)
- option.selected = false;
- for (const option of source.selectedOptions)
- clone.options[option.index].selected = true;
- }
- for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type="password"]')) {
- clonedPasswordInput.value = "";
- }
- return new PageSnapshot(clonedElement, this.headSnapshot);
- }
- get headElement() {
- return this.headSnapshot.element;
- }
- get rootLocation() {
- var _a;
- const root = (_a = this.getSetting("root")) !== null && _a !== void 0 ? _a : "/";
- return expandURL(root);
- }
- get cacheControlValue() {
- return this.getSetting("cache-control");
- }
- get isPreviewable() {
- return this.cacheControlValue != "no-preview";
- }
- get isCacheable() {
- return this.cacheControlValue != "no-cache";
- }
- get isVisitable() {
- return this.getSetting("visit-control") != "reload";
- }
- getSetting(name) {
- return this.headSnapshot.getMetaValue(`turbo-${name}`);
- }
-}
-
-var TimingMetric;
-(function (TimingMetric) {
- TimingMetric["visitStart"] = "visitStart";
- TimingMetric["requestStart"] = "requestStart";
- TimingMetric["requestEnd"] = "requestEnd";
- TimingMetric["visitEnd"] = "visitEnd";
-})(TimingMetric || (TimingMetric = {}));
-var VisitState;
-(function (VisitState) {
- VisitState["initialized"] = "initialized";
- VisitState["started"] = "started";
- VisitState["canceled"] = "canceled";
- VisitState["failed"] = "failed";
- VisitState["completed"] = "completed";
-})(VisitState || (VisitState = {}));
-const defaultOptions = {
- action: "advance",
- historyChanged: false,
- visitCachedSnapshot: () => { },
- willRender: true,
- updateHistory: true,
- shouldCacheSnapshot: true,
- acceptsStreamResponse: false,
-};
-var SystemStatusCode;
-(function (SystemStatusCode) {
- SystemStatusCode[SystemStatusCode["networkFailure"] = 0] = "networkFailure";
- SystemStatusCode[SystemStatusCode["timeoutFailure"] = -1] = "timeoutFailure";
- SystemStatusCode[SystemStatusCode["contentTypeMismatch"] = -2] = "contentTypeMismatch";
-})(SystemStatusCode || (SystemStatusCode = {}));
-class Visit {
- constructor(delegate, location, restorationIdentifier, options = {}) {
- this.identifier = uuid();
- this.timingMetrics = {};
- this.followedRedirect = false;
- this.historyChanged = false;
- this.scrolled = false;
- this.shouldCacheSnapshot = true;
- this.acceptsStreamResponse = false;
- this.snapshotCached = false;
- this.state = VisitState.initialized;
- this.delegate = delegate;
- this.location = location;
- this.restorationIdentifier = restorationIdentifier || uuid();
- const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);
- this.action = action;
- this.historyChanged = historyChanged;
- this.referrer = referrer;
- this.snapshot = snapshot;
- this.snapshotHTML = snapshotHTML;
- this.response = response;
- this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);
- this.visitCachedSnapshot = visitCachedSnapshot;
- this.willRender = willRender;
- this.updateHistory = updateHistory;
- this.scrolled = !willRender;
- this.shouldCacheSnapshot = shouldCacheSnapshot;
- this.acceptsStreamResponse = acceptsStreamResponse;
- }
- get adapter() {
- return this.delegate.adapter;
- }
- get view() {
- return this.delegate.view;
- }
- get history() {
- return this.delegate.history;
- }
- get restorationData() {
- return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);
- }
- get silent() {
- return this.isSamePage;
- }
- start() {
- if (this.state == VisitState.initialized) {
- this.recordTimingMetric(TimingMetric.visitStart);
- this.state = VisitState.started;
- this.adapter.visitStarted(this);
- this.delegate.visitStarted(this);
- }
- }
- cancel() {
- if (this.state == VisitState.started) {
- if (this.request) {
- this.request.cancel();
- }
- this.cancelRender();
- this.state = VisitState.canceled;
- }
- }
- complete() {
- if (this.state == VisitState.started) {
- this.recordTimingMetric(TimingMetric.visitEnd);
- this.state = VisitState.completed;
- this.followRedirect();
- if (!this.followedRedirect) {
- this.adapter.visitCompleted(this);
- this.delegate.visitCompleted(this);
- }
- }
- }
- fail() {
- if (this.state == VisitState.started) {
- this.state = VisitState.failed;
- this.adapter.visitFailed(this);
- }
- }
- changeHistory() {
- var _a;
- if (!this.historyChanged && this.updateHistory) {
- const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? "replace" : this.action;
- const method = getHistoryMethodForAction(actionForHistory);
- this.history.update(method, this.location, this.restorationIdentifier);
- this.historyChanged = true;
- }
- }
- issueRequest() {
- if (this.hasPreloadedResponse()) {
- this.simulateRequest();
- }
- else if (this.shouldIssueRequest() && !this.request) {
- this.request = new FetchRequest(this, FetchMethod.get, this.location);
- this.request.perform();
- }
- }
- simulateRequest() {
- if (this.response) {
- this.startRequest();
- this.recordResponse();
- this.finishRequest();
- }
- }
- startRequest() {
- this.recordTimingMetric(TimingMetric.requestStart);
- this.adapter.visitRequestStarted(this);
- }
- recordResponse(response = this.response) {
- this.response = response;
- if (response) {
- const { statusCode } = response;
- if (isSuccessful(statusCode)) {
- this.adapter.visitRequestCompleted(this);
- }
- else {
- this.adapter.visitRequestFailedWithStatusCode(this, statusCode);
- }
- }
- }
- finishRequest() {
- this.recordTimingMetric(TimingMetric.requestEnd);
- this.adapter.visitRequestFinished(this);
- }
- loadResponse() {
- if (this.response) {
- const { statusCode, responseHTML } = this.response;
- this.render(async () => {
- if (this.shouldCacheSnapshot)
- this.cacheSnapshot();
- if (this.view.renderPromise)
- await this.view.renderPromise;
- if (isSuccessful(statusCode) && responseHTML != null) {
- await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);
- this.performScroll();
- this.adapter.visitRendered(this);
- this.complete();
- }
- else {
- await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);
- this.adapter.visitRendered(this);
- this.fail();
- }
- });
- }
- }
- getCachedSnapshot() {
- const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();
- if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {
- if (this.action == "restore" || snapshot.isPreviewable) {
- return snapshot;
- }
- }
- }
- getPreloadedSnapshot() {
- if (this.snapshotHTML) {
- return PageSnapshot.fromHTMLString(this.snapshotHTML);
- }
- }
- hasCachedSnapshot() {
- return this.getCachedSnapshot() != null;
- }
- loadCachedSnapshot() {
- const snapshot = this.getCachedSnapshot();
- if (snapshot) {
- const isPreview = this.shouldIssueRequest();
- this.render(async () => {
- this.cacheSnapshot();
- if (this.isSamePage) {
- this.adapter.visitRendered(this);
- }
- else {
- if (this.view.renderPromise)
- await this.view.renderPromise;
- await this.view.renderPage(snapshot, isPreview, this.willRender, this);
- this.performScroll();
- this.adapter.visitRendered(this);
- if (!isPreview) {
- this.complete();
- }
- }
- });
- }
- }
- followRedirect() {
- var _a;
- if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {
- this.adapter.visitProposedToLocation(this.redirectedToLocation, {
- action: "replace",
- response: this.response,
- shouldCacheSnapshot: false,
- willRender: false,
- });
- this.followedRedirect = true;
- }
- }
- goToSamePageAnchor() {
- if (this.isSamePage) {
- this.render(async () => {
- this.cacheSnapshot();
- this.performScroll();
- this.changeHistory();
- this.adapter.visitRendered(this);
- });
- }
- }
- prepareRequest(request) {
- if (this.acceptsStreamResponse) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted() {
- this.startRequest();
- }
- requestPreventedHandlingResponse(_request, _response) { }
- async requestSucceededWithResponse(request, response) {
- const responseHTML = await response.responseHTML;
- const { redirected, statusCode } = response;
- if (responseHTML == undefined) {
- this.recordResponse({
- statusCode: SystemStatusCode.contentTypeMismatch,
- redirected,
- });
- }
- else {
- this.redirectedToLocation = response.redirected ? response.location : undefined;
- this.recordResponse({ statusCode: statusCode, responseHTML, redirected });
- }
- }
- async requestFailedWithResponse(request, response) {
- const responseHTML = await response.responseHTML;
- const { redirected, statusCode } = response;
- if (responseHTML == undefined) {
- this.recordResponse({
- statusCode: SystemStatusCode.contentTypeMismatch,
- redirected,
- });
- }
- else {
- this.recordResponse({ statusCode: statusCode, responseHTML, redirected });
- }
- }
- requestErrored(_request, _error) {
- this.recordResponse({
- statusCode: SystemStatusCode.networkFailure,
- redirected: false,
- });
- }
- requestFinished() {
- this.finishRequest();
- }
- performScroll() {
- if (!this.scrolled && !this.view.forceReloaded) {
- if (this.action == "restore") {
- this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();
- }
- else {
- this.scrollToAnchor() || this.view.scrollToTop();
- }
- if (this.isSamePage) {
- this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);
- }
- this.scrolled = true;
- }
- }
- scrollToRestoredPosition() {
- const { scrollPosition } = this.restorationData;
- if (scrollPosition) {
- this.view.scrollToPosition(scrollPosition);
- return true;
- }
- }
- scrollToAnchor() {
- const anchor = getAnchor(this.location);
- if (anchor != null) {
- this.view.scrollToAnchor(anchor);
- return true;
- }
- }
- recordTimingMetric(metric) {
- this.timingMetrics[metric] = new Date().getTime();
- }
- getTimingMetrics() {
- return Object.assign({}, this.timingMetrics);
- }
- getHistoryMethodForAction(action) {
- switch (action) {
- case "replace":
- return history.replaceState;
- case "advance":
- case "restore":
- return history.pushState;
- }
- }
- hasPreloadedResponse() {
- return typeof this.response == "object";
- }
- shouldIssueRequest() {
- if (this.isSamePage) {
- return false;
- }
- else if (this.action == "restore") {
- return !this.hasCachedSnapshot();
- }
- else {
- return this.willRender;
- }
- }
- cacheSnapshot() {
- if (!this.snapshotCached) {
- this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));
- this.snapshotCached = true;
- }
- }
- async render(callback) {
- this.cancelRender();
- await new Promise((resolve) => {
- this.frame = requestAnimationFrame(() => resolve());
- });
- await callback();
- delete this.frame;
- }
- cancelRender() {
- if (this.frame) {
- cancelAnimationFrame(this.frame);
- delete this.frame;
- }
- }
-}
-function isSuccessful(statusCode) {
- return statusCode >= 200 && statusCode < 300;
-}
-
-class BrowserAdapter {
- constructor(session) {
- this.progressBar = new ProgressBar();
- this.showProgressBar = () => {
- this.progressBar.show();
- };
- this.session = session;
- }
- visitProposedToLocation(location, options) {
- this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);
- }
- visitStarted(visit) {
- this.location = visit.location;
- visit.loadCachedSnapshot();
- visit.issueRequest();
- visit.goToSamePageAnchor();
- }
- visitRequestStarted(visit) {
- this.progressBar.setValue(0);
- if (visit.hasCachedSnapshot() || visit.action != "restore") {
- this.showVisitProgressBarAfterDelay();
- }
- else {
- this.showProgressBar();
- }
- }
- visitRequestCompleted(visit) {
- visit.loadResponse();
- }
- visitRequestFailedWithStatusCode(visit, statusCode) {
- switch (statusCode) {
- case SystemStatusCode.networkFailure:
- case SystemStatusCode.timeoutFailure:
- case SystemStatusCode.contentTypeMismatch:
- return this.reload({
- reason: "request_failed",
- context: {
- statusCode,
- },
- });
- default:
- return visit.loadResponse();
- }
- }
- visitRequestFinished(_visit) {
- this.progressBar.setValue(1);
- this.hideVisitProgressBar();
- }
- visitCompleted(_visit) { }
- pageInvalidated(reason) {
- this.reload(reason);
- }
- visitFailed(_visit) { }
- visitRendered(_visit) { }
- formSubmissionStarted(_formSubmission) {
- this.progressBar.setValue(0);
- this.showFormProgressBarAfterDelay();
- }
- formSubmissionFinished(_formSubmission) {
- this.progressBar.setValue(1);
- this.hideFormProgressBar();
- }
- showVisitProgressBarAfterDelay() {
- this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);
- }
- hideVisitProgressBar() {
- this.progressBar.hide();
- if (this.visitProgressBarTimeout != null) {
- window.clearTimeout(this.visitProgressBarTimeout);
- delete this.visitProgressBarTimeout;
- }
- }
- showFormProgressBarAfterDelay() {
- if (this.formProgressBarTimeout == null) {
- this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);
- }
- }
- hideFormProgressBar() {
- this.progressBar.hide();
- if (this.formProgressBarTimeout != null) {
- window.clearTimeout(this.formProgressBarTimeout);
- delete this.formProgressBarTimeout;
- }
- }
- reload(reason) {
- var _a;
- dispatch("turbo:reload", { detail: reason });
- window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;
- }
- get navigator() {
- return this.session.navigator;
- }
-}
-
-class CacheObserver {
- constructor() {
- this.selector = "[data-turbo-temporary]";
- this.deprecatedSelector = "[data-turbo-cache=false]";
- this.started = false;
- this.removeTemporaryElements = ((_event) => {
- for (const element of this.temporaryElements) {
- element.remove();
- }
- });
- }
- start() {
- if (!this.started) {
- this.started = true;
- addEventListener("turbo:before-cache", this.removeTemporaryElements, false);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- removeEventListener("turbo:before-cache", this.removeTemporaryElements, false);
- }
- }
- get temporaryElements() {
- return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation];
- }
- get temporaryElementsWithDeprecation() {
- const elements = document.querySelectorAll(this.deprecatedSelector);
- if (elements.length) {
- console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);
- }
- return [...elements];
- }
-}
-
-class FrameRedirector {
- constructor(session, element) {
- this.session = session;
- this.element = element;
- this.linkInterceptor = new LinkInterceptor(this, element);
- this.formSubmitObserver = new FormSubmitObserver(this, element);
- }
- start() {
- this.linkInterceptor.start();
- this.formSubmitObserver.start();
- }
- stop() {
- this.linkInterceptor.stop();
- this.formSubmitObserver.stop();
- }
- shouldInterceptLinkClick(element, _location, _event) {
- return this.shouldRedirect(element);
- }
- linkClickIntercepted(element, url, event) {
- const frame = this.findFrameElement(element);
- if (frame) {
- frame.delegate.linkClickIntercepted(element, url, event);
- }
- }
- willSubmitForm(element, submitter) {
- return (element.closest("turbo-frame") == null &&
- this.shouldSubmit(element, submitter) &&
- this.shouldRedirect(element, submitter));
- }
- formSubmitted(element, submitter) {
- const frame = this.findFrameElement(element, submitter);
- if (frame) {
- frame.delegate.formSubmitted(element, submitter);
- }
- }
- shouldSubmit(form, submitter) {
- var _a;
- const action = getAction(form, submitter);
- const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`);
- const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : "/");
- return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);
- }
- shouldRedirect(element, submitter) {
- const isNavigatable = element instanceof HTMLFormElement
- ? this.session.submissionIsNavigatable(element, submitter)
- : this.session.elementIsNavigatable(element);
- if (isNavigatable) {
- const frame = this.findFrameElement(element, submitter);
- return frame ? frame != element.closest("turbo-frame") : false;
- }
- else {
- return false;
- }
- }
- findFrameElement(element, submitter) {
- const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute("data-turbo-frame")) || element.getAttribute("data-turbo-frame");
- if (id && id != "_top") {
- const frame = this.element.querySelector(`#${id}:not([disabled])`);
- if (frame instanceof FrameElement) {
- return frame;
- }
- }
- }
-}
-
-class History {
- constructor(delegate) {
- this.restorationIdentifier = uuid();
- this.restorationData = {};
- this.started = false;
- this.pageLoaded = false;
- this.onPopState = (event) => {
- if (this.shouldHandlePopState()) {
- const { turbo } = event.state || {};
- if (turbo) {
- this.location = new URL(window.location.href);
- const { restorationIdentifier } = turbo;
- this.restorationIdentifier = restorationIdentifier;
- this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);
- }
- }
- };
- this.onPageLoad = async (_event) => {
- await nextMicrotask();
- this.pageLoaded = true;
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- addEventListener("popstate", this.onPopState, false);
- addEventListener("load", this.onPageLoad, false);
- this.started = true;
- this.replace(new URL(window.location.href));
- }
- }
- stop() {
- if (this.started) {
- removeEventListener("popstate", this.onPopState, false);
- removeEventListener("load", this.onPageLoad, false);
- this.started = false;
- }
- }
- push(location, restorationIdentifier) {
- this.update(history.pushState, location, restorationIdentifier);
- }
- replace(location, restorationIdentifier) {
- this.update(history.replaceState, location, restorationIdentifier);
- }
- update(method, location, restorationIdentifier = uuid()) {
- const state = { turbo: { restorationIdentifier } };
- method.call(history, state, "", location.href);
- this.location = location;
- this.restorationIdentifier = restorationIdentifier;
- }
- getRestorationDataForIdentifier(restorationIdentifier) {
- return this.restorationData[restorationIdentifier] || {};
- }
- updateRestorationData(additionalData) {
- const { restorationIdentifier } = this;
- const restorationData = this.restorationData[restorationIdentifier];
- this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);
- }
- assumeControlOfScrollRestoration() {
- var _a;
- if (!this.previousScrollRestoration) {
- this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : "auto";
- history.scrollRestoration = "manual";
- }
- }
- relinquishControlOfScrollRestoration() {
- if (this.previousScrollRestoration) {
- history.scrollRestoration = this.previousScrollRestoration;
- delete this.previousScrollRestoration;
- }
- }
- shouldHandlePopState() {
- return this.pageIsLoaded();
- }
- pageIsLoaded() {
- return this.pageLoaded || document.readyState == "complete";
- }
-}
-
-class Navigator {
- constructor(delegate) {
- this.delegate = delegate;
- }
- proposeVisit(location, options = {}) {
- if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {
- if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {
- this.delegate.visitProposedToLocation(location, options);
- }
- else {
- window.location.href = location.toString();
- }
- }
- }
- startVisit(locatable, restorationIdentifier, options = {}) {
- this.stop();
- this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));
- this.currentVisit.start();
- }
- submitForm(form, submitter) {
- this.stop();
- this.formSubmission = new FormSubmission(this, form, submitter, true);
- this.formSubmission.start();
- }
- stop() {
- if (this.formSubmission) {
- this.formSubmission.stop();
- delete this.formSubmission;
- }
- if (this.currentVisit) {
- this.currentVisit.cancel();
- delete this.currentVisit;
- }
- }
- get adapter() {
- return this.delegate.adapter;
- }
- get view() {
- return this.delegate.view;
- }
- get history() {
- return this.delegate.history;
- }
- formSubmissionStarted(formSubmission) {
- if (typeof this.adapter.formSubmissionStarted === "function") {
- this.adapter.formSubmissionStarted(formSubmission);
- }
- }
- async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {
- if (formSubmission == this.formSubmission) {
- const responseHTML = await fetchResponse.responseHTML;
- if (responseHTML) {
- const shouldCacheSnapshot = formSubmission.isSafe;
- if (!shouldCacheSnapshot) {
- this.view.clearSnapshotCache();
- }
- const { statusCode, redirected } = fetchResponse;
- const action = this.getActionForFormSubmission(formSubmission);
- const visitOptions = {
- action,
- shouldCacheSnapshot,
- response: { statusCode, responseHTML, redirected },
- };
- this.proposeVisit(fetchResponse.location, visitOptions);
- }
- }
- }
- async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {
- const responseHTML = await fetchResponse.responseHTML;
- if (responseHTML) {
- const snapshot = PageSnapshot.fromHTMLString(responseHTML);
- if (fetchResponse.serverError) {
- await this.view.renderError(snapshot, this.currentVisit);
- }
- else {
- await this.view.renderPage(snapshot, false, true, this.currentVisit);
- }
- this.view.scrollToTop();
- this.view.clearSnapshotCache();
- }
- }
- formSubmissionErrored(formSubmission, error) {
- console.error(error);
- }
- formSubmissionFinished(formSubmission) {
- if (typeof this.adapter.formSubmissionFinished === "function") {
- this.adapter.formSubmissionFinished(formSubmission);
- }
- }
- visitStarted(visit) {
- this.delegate.visitStarted(visit);
- }
- visitCompleted(visit) {
- this.delegate.visitCompleted(visit);
- }
- locationWithActionIsSamePage(location, action) {
- const anchor = getAnchor(location);
- const currentAnchor = getAnchor(this.view.lastRenderedLocation);
- const isRestorationToTop = action === "restore" && typeof anchor === "undefined";
- return (action !== "replace" &&
- getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&
- (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));
- }
- visitScrolledToSamePageLocation(oldURL, newURL) {
- this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);
- }
- get location() {
- return this.history.location;
- }
- get restorationIdentifier() {
- return this.history.restorationIdentifier;
- }
- getActionForFormSubmission({ submitter, formElement }) {
- return getVisitAction(submitter, formElement) || "advance";
- }
-}
-
-var PageStage;
-(function (PageStage) {
- PageStage[PageStage["initial"] = 0] = "initial";
- PageStage[PageStage["loading"] = 1] = "loading";
- PageStage[PageStage["interactive"] = 2] = "interactive";
- PageStage[PageStage["complete"] = 3] = "complete";
-})(PageStage || (PageStage = {}));
-class PageObserver {
- constructor(delegate) {
- this.stage = PageStage.initial;
- this.started = false;
- this.interpretReadyState = () => {
- const { readyState } = this;
- if (readyState == "interactive") {
- this.pageIsInteractive();
- }
- else if (readyState == "complete") {
- this.pageIsComplete();
- }
- };
- this.pageWillUnload = () => {
- this.delegate.pageWillUnload();
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- if (this.stage == PageStage.initial) {
- this.stage = PageStage.loading;
- }
- document.addEventListener("readystatechange", this.interpretReadyState, false);
- addEventListener("pagehide", this.pageWillUnload, false);
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- document.removeEventListener("readystatechange", this.interpretReadyState, false);
- removeEventListener("pagehide", this.pageWillUnload, false);
- this.started = false;
- }
- }
- pageIsInteractive() {
- if (this.stage == PageStage.loading) {
- this.stage = PageStage.interactive;
- this.delegate.pageBecameInteractive();
- }
- }
- pageIsComplete() {
- this.pageIsInteractive();
- if (this.stage == PageStage.interactive) {
- this.stage = PageStage.complete;
- this.delegate.pageLoaded();
- }
- }
- get readyState() {
- return document.readyState;
- }
-}
-
-class ScrollObserver {
- constructor(delegate) {
- this.started = false;
- this.onScroll = () => {
- this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- addEventListener("scroll", this.onScroll, false);
- this.onScroll();
- this.started = true;
- }
- }
- stop() {
- if (this.started) {
- removeEventListener("scroll", this.onScroll, false);
- this.started = false;
- }
- }
- updatePosition(position) {
- this.delegate.scrollPositionChanged(position);
- }
-}
-
-class StreamMessageRenderer {
- render({ fragment }) {
- Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));
- }
- enteringBardo(currentPermanentElement, newPermanentElement) {
- newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));
- }
- leavingBardo() { }
-}
-function getPermanentElementMapForFragment(fragment) {
- const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);
- const permanentElementMap = {};
- for (const permanentElementInDocument of permanentElementsInDocument) {
- const { id } = permanentElementInDocument;
- for (const streamElement of fragment.querySelectorAll("turbo-stream")) {
- const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);
- if (elementInStream) {
- permanentElementMap[id] = [permanentElementInDocument, elementInStream];
- }
- }
- }
- return permanentElementMap;
-}
-
-class StreamObserver {
- constructor(delegate) {
- this.sources = new Set();
- this.started = false;
- this.inspectFetchResponse = ((event) => {
- const response = fetchResponseFromEvent(event);
- if (response && fetchResponseIsStream(response)) {
- event.preventDefault();
- this.receiveMessageResponse(response);
- }
- });
- this.receiveMessageEvent = (event) => {
- if (this.started && typeof event.data == "string") {
- this.receiveMessageHTML(event.data);
- }
- };
- this.delegate = delegate;
- }
- start() {
- if (!this.started) {
- this.started = true;
- addEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false);
- }
- }
- stop() {
- if (this.started) {
- this.started = false;
- removeEventListener("turbo:before-fetch-response", this.inspectFetchResponse, false);
- }
- }
- connectStreamSource(source) {
- if (!this.streamSourceIsConnected(source)) {
- this.sources.add(source);
- source.addEventListener("message", this.receiveMessageEvent, false);
- }
- }
- disconnectStreamSource(source) {
- if (this.streamSourceIsConnected(source)) {
- this.sources.delete(source);
- source.removeEventListener("message", this.receiveMessageEvent, false);
- }
- }
- streamSourceIsConnected(source) {
- return this.sources.has(source);
- }
- async receiveMessageResponse(response) {
- const html = await response.responseHTML;
- if (html) {
- this.receiveMessageHTML(html);
- }
- }
- receiveMessageHTML(html) {
- this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));
- }
-}
-function fetchResponseFromEvent(event) {
- var _a;
- const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;
- if (fetchResponse instanceof FetchResponse) {
- return fetchResponse;
- }
-}
-function fetchResponseIsStream(response) {
- var _a;
- const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : "";
- return contentType.startsWith(StreamMessage.contentType);
-}
-
-class ErrorRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- const { documentElement, body } = document;
- documentElement.replaceChild(newElement, body);
- }
- async render() {
- this.replaceHeadAndBody();
- this.activateScriptElements();
- }
- replaceHeadAndBody() {
- const { documentElement, head } = document;
- documentElement.replaceChild(this.newHead, head);
- this.renderElement(this.currentElement, this.newElement);
- }
- activateScriptElements() {
- for (const replaceableElement of this.scriptElements) {
- const parentNode = replaceableElement.parentNode;
- if (parentNode) {
- const element = activateScriptElement(replaceableElement);
- parentNode.replaceChild(element, replaceableElement);
- }
- }
- }
- get newHead() {
- return this.newSnapshot.headSnapshot.element;
- }
- get scriptElements() {
- return document.documentElement.querySelectorAll("script");
- }
-}
-
-class PageRenderer extends Renderer {
- static renderElement(currentElement, newElement) {
- if (document.body && newElement instanceof HTMLBodyElement) {
- document.body.replaceWith(newElement);
- }
- else {
- document.documentElement.appendChild(newElement);
- }
- }
- get shouldRender() {
- return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;
- }
- get reloadReason() {
- if (!this.newSnapshot.isVisitable) {
- return {
- reason: "turbo_visit_control_is_reload",
- };
- }
- if (!this.trackedElementsAreIdentical) {
- return {
- reason: "tracked_element_mismatch",
- };
- }
- }
- async prepareToRender() {
- await this.mergeHead();
- }
- async render() {
- if (this.willRender) {
- await this.replaceBody();
- }
- }
- finishRendering() {
- super.finishRendering();
- if (!this.isPreview) {
- this.focusFirstAutofocusableElement();
- }
- }
- get currentHeadSnapshot() {
- return this.currentSnapshot.headSnapshot;
- }
- get newHeadSnapshot() {
- return this.newSnapshot.headSnapshot;
- }
- get newElement() {
- return this.newSnapshot.element;
- }
- async mergeHead() {
- const mergedHeadElements = this.mergeProvisionalElements();
- const newStylesheetElements = this.copyNewHeadStylesheetElements();
- this.copyNewHeadScriptElements();
- await mergedHeadElements;
- await newStylesheetElements;
- }
- async replaceBody() {
- await this.preservingPermanentElements(async () => {
- this.activateNewBody();
- await this.assignNewBody();
- });
- }
- get trackedElementsAreIdentical() {
- return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;
- }
- async copyNewHeadStylesheetElements() {
- const loadingElements = [];
- for (const element of this.newHeadStylesheetElements) {
- loadingElements.push(waitForLoad(element));
- document.head.appendChild(element);
- }
- await Promise.all(loadingElements);
- }
- copyNewHeadScriptElements() {
- for (const element of this.newHeadScriptElements) {
- document.head.appendChild(activateScriptElement(element));
- }
- }
- async mergeProvisionalElements() {
- const newHeadElements = [...this.newHeadProvisionalElements];
- for (const element of this.currentHeadProvisionalElements) {
- if (!this.isCurrentElementInElementList(element, newHeadElements)) {
- document.head.removeChild(element);
- }
- }
- for (const element of newHeadElements) {
- document.head.appendChild(element);
- }
- }
- isCurrentElementInElementList(element, elementList) {
- for (const [index, newElement] of elementList.entries()) {
- if (element.tagName == "TITLE") {
- if (newElement.tagName != "TITLE") {
- continue;
- }
- if (element.innerHTML == newElement.innerHTML) {
- elementList.splice(index, 1);
- return true;
- }
- }
- if (newElement.isEqualNode(element)) {
- elementList.splice(index, 1);
- return true;
- }
- }
- return false;
- }
- removeCurrentHeadProvisionalElements() {
- for (const element of this.currentHeadProvisionalElements) {
- document.head.removeChild(element);
- }
- }
- copyNewHeadProvisionalElements() {
- for (const element of this.newHeadProvisionalElements) {
- document.head.appendChild(element);
- }
- }
- activateNewBody() {
- document.adoptNode(this.newElement);
- this.activateNewBodyScriptElements();
- }
- activateNewBodyScriptElements() {
- for (const inertScriptElement of this.newBodyScriptElements) {
- const activatedScriptElement = activateScriptElement(inertScriptElement);
- inertScriptElement.replaceWith(activatedScriptElement);
- }
- }
- async assignNewBody() {
- await this.renderElement(this.currentElement, this.newElement);
- }
- get newHeadStylesheetElements() {
- return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);
- }
- get newHeadScriptElements() {
- return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);
- }
- get currentHeadProvisionalElements() {
- return this.currentHeadSnapshot.provisionalElements;
- }
- get newHeadProvisionalElements() {
- return this.newHeadSnapshot.provisionalElements;
- }
- get newBodyScriptElements() {
- return this.newElement.querySelectorAll("script");
- }
-}
-
-class SnapshotCache {
- constructor(size) {
- this.keys = [];
- this.snapshots = {};
- this.size = size;
- }
- has(location) {
- return toCacheKey(location) in this.snapshots;
- }
- get(location) {
- if (this.has(location)) {
- const snapshot = this.read(location);
- this.touch(location);
- return snapshot;
- }
- }
- put(location, snapshot) {
- this.write(location, snapshot);
- this.touch(location);
- return snapshot;
- }
- clear() {
- this.snapshots = {};
- }
- read(location) {
- return this.snapshots[toCacheKey(location)];
- }
- write(location, snapshot) {
- this.snapshots[toCacheKey(location)] = snapshot;
- }
- touch(location) {
- const key = toCacheKey(location);
- const index = this.keys.indexOf(key);
- if (index > -1)
- this.keys.splice(index, 1);
- this.keys.unshift(key);
- this.trim();
- }
- trim() {
- for (const key of this.keys.splice(this.size)) {
- delete this.snapshots[key];
- }
- }
-}
-
-class PageView extends View {
- constructor() {
- super(...arguments);
- this.snapshotCache = new SnapshotCache(10);
- this.lastRenderedLocation = new URL(location.href);
- this.forceReloaded = false;
- }
- renderPage(snapshot, isPreview = false, willRender = true, visit) {
- const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);
- if (!renderer.shouldRender) {
- this.forceReloaded = true;
- }
- else {
- visit === null || visit === void 0 ? void 0 : visit.changeHistory();
- }
- return this.render(renderer);
- }
- renderError(snapshot, visit) {
- visit === null || visit === void 0 ? void 0 : visit.changeHistory();
- const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);
- return this.render(renderer);
- }
- clearSnapshotCache() {
- this.snapshotCache.clear();
- }
- async cacheSnapshot(snapshot = this.snapshot) {
- if (snapshot.isCacheable) {
- this.delegate.viewWillCacheSnapshot();
- const { lastRenderedLocation: location } = this;
- await nextEventLoopTick();
- const cachedSnapshot = snapshot.clone();
- this.snapshotCache.put(location, cachedSnapshot);
- return cachedSnapshot;
- }
- }
- getCachedSnapshotForLocation(location) {
- return this.snapshotCache.get(location);
- }
- get snapshot() {
- return PageSnapshot.fromElement(this.element);
- }
-}
-
-class Preloader {
- constructor(delegate) {
- this.selector = "a[data-turbo-preload]";
- this.delegate = delegate;
- }
- get snapshotCache() {
- return this.delegate.navigator.view.snapshotCache;
- }
- start() {
- if (document.readyState === "loading") {
- return document.addEventListener("DOMContentLoaded", () => {
- this.preloadOnLoadLinksForView(document.body);
- });
- }
- else {
- this.preloadOnLoadLinksForView(document.body);
- }
- }
- preloadOnLoadLinksForView(element) {
- for (const link of element.querySelectorAll(this.selector)) {
- this.preloadURL(link);
- }
- }
- async preloadURL(link) {
- const location = new URL(link.href);
- if (this.snapshotCache.has(location)) {
- return;
- }
- try {
- const response = await fetch(location.toString(), { headers: { "VND.PREFETCH": "true", Accept: "text/html" } });
- const responseText = await response.text();
- const snapshot = PageSnapshot.fromHTMLString(responseText);
- this.snapshotCache.put(location, snapshot);
- }
- catch (_) {
- }
- }
-}
-
-class Session {
- constructor() {
- this.navigator = new Navigator(this);
- this.history = new History(this);
- this.preloader = new Preloader(this);
- this.view = new PageView(this, document.documentElement);
- this.adapter = new BrowserAdapter(this);
- this.pageObserver = new PageObserver(this);
- this.cacheObserver = new CacheObserver();
- this.linkClickObserver = new LinkClickObserver(this, window);
- this.formSubmitObserver = new FormSubmitObserver(this, document);
- this.scrollObserver = new ScrollObserver(this);
- this.streamObserver = new StreamObserver(this);
- this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);
- this.frameRedirector = new FrameRedirector(this, document.documentElement);
- this.streamMessageRenderer = new StreamMessageRenderer();
- this.drive = true;
- this.enabled = true;
- this.progressBarDelay = 500;
- this.started = false;
- this.formMode = "on";
- }
- start() {
- if (!this.started) {
- this.pageObserver.start();
- this.cacheObserver.start();
- this.formLinkClickObserver.start();
- this.linkClickObserver.start();
- this.formSubmitObserver.start();
- this.scrollObserver.start();
- this.streamObserver.start();
- this.frameRedirector.start();
- this.history.start();
- this.preloader.start();
- this.started = true;
- this.enabled = true;
- }
- }
- disable() {
- this.enabled = false;
- }
- stop() {
- if (this.started) {
- this.pageObserver.stop();
- this.cacheObserver.stop();
- this.formLinkClickObserver.stop();
- this.linkClickObserver.stop();
- this.formSubmitObserver.stop();
- this.scrollObserver.stop();
- this.streamObserver.stop();
- this.frameRedirector.stop();
- this.history.stop();
- this.started = false;
- }
- }
- registerAdapter(adapter) {
- this.adapter = adapter;
- }
- visit(location, options = {}) {
- const frameElement = options.frame ? document.getElementById(options.frame) : null;
- if (frameElement instanceof FrameElement) {
- frameElement.src = location.toString();
- frameElement.loaded;
- }
- else {
- this.navigator.proposeVisit(expandURL(location), options);
- }
- }
- connectStreamSource(source) {
- this.streamObserver.connectStreamSource(source);
- }
- disconnectStreamSource(source) {
- this.streamObserver.disconnectStreamSource(source);
- }
- renderStreamMessage(message) {
- this.streamMessageRenderer.render(StreamMessage.wrap(message));
- }
- clearCache() {
- this.view.clearSnapshotCache();
- }
- setProgressBarDelay(delay) {
- this.progressBarDelay = delay;
- }
- setFormMode(mode) {
- this.formMode = mode;
- }
- get location() {
- return this.history.location;
- }
- get restorationIdentifier() {
- return this.history.restorationIdentifier;
- }
- historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {
- if (this.enabled) {
- this.navigator.startVisit(location, restorationIdentifier, {
- action: "restore",
- historyChanged: true,
- });
- }
- else {
- this.adapter.pageInvalidated({
- reason: "turbo_disabled",
- });
- }
- }
- scrollPositionChanged(position) {
- this.history.updateRestorationData({ scrollPosition: position });
- }
- willSubmitFormLinkToLocation(link, location) {
- return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);
- }
- submittedFormLinkToLocation() { }
- willFollowLinkToLocation(link, location, event) {
- return (this.elementIsNavigatable(link) &&
- locationIsVisitable(location, this.snapshot.rootLocation) &&
- this.applicationAllowsFollowingLinkToLocation(link, location, event));
- }
- followedLinkToLocation(link, location) {
- const action = this.getActionForLink(link);
- const acceptsStreamResponse = link.hasAttribute("data-turbo-stream");
- this.visit(location.href, { action, acceptsStreamResponse });
- }
- allowsVisitingLocationWithAction(location, action) {
- return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);
- }
- visitProposedToLocation(location, options) {
- extendURLWithDeprecatedProperties(location);
- this.adapter.visitProposedToLocation(location, options);
- }
- visitStarted(visit) {
- if (!visit.acceptsStreamResponse) {
- markAsBusy(document.documentElement);
- }
- extendURLWithDeprecatedProperties(visit.location);
- if (!visit.silent) {
- this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);
- }
- }
- visitCompleted(visit) {
- clearBusyState(document.documentElement);
- this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());
- }
- locationWithActionIsSamePage(location, action) {
- return this.navigator.locationWithActionIsSamePage(location, action);
- }
- visitScrolledToSamePageLocation(oldURL, newURL) {
- this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);
- }
- willSubmitForm(form, submitter) {
- const action = getAction(form, submitter);
- return (this.submissionIsNavigatable(form, submitter) &&
- locationIsVisitable(expandURL(action), this.snapshot.rootLocation));
- }
- formSubmitted(form, submitter) {
- this.navigator.submitForm(form, submitter);
- }
- pageBecameInteractive() {
- this.view.lastRenderedLocation = this.location;
- this.notifyApplicationAfterPageLoad();
- }
- pageLoaded() {
- this.history.assumeControlOfScrollRestoration();
- }
- pageWillUnload() {
- this.history.relinquishControlOfScrollRestoration();
- }
- receivedMessageFromStream(message) {
- this.renderStreamMessage(message);
- }
- viewWillCacheSnapshot() {
- var _a;
- if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {
- this.notifyApplicationBeforeCachingSnapshot();
- }
- }
- allowsImmediateRender({ element }, options) {
- const event = this.notifyApplicationBeforeRender(element, options);
- const { defaultPrevented, detail: { render }, } = event;
- if (this.view.renderer && render) {
- this.view.renderer.renderElement = render;
- }
- return !defaultPrevented;
- }
- viewRenderedSnapshot(_snapshot, _isPreview) {
- this.view.lastRenderedLocation = this.history.location;
- this.notifyApplicationAfterRender();
- }
- preloadOnLoadLinksForView(element) {
- this.preloader.preloadOnLoadLinksForView(element);
- }
- viewInvalidated(reason) {
- this.adapter.pageInvalidated(reason);
- }
- frameLoaded(frame) {
- this.notifyApplicationAfterFrameLoad(frame);
- }
- frameRendered(fetchResponse, frame) {
- this.notifyApplicationAfterFrameRender(fetchResponse, frame);
- }
- applicationAllowsFollowingLinkToLocation(link, location, ev) {
- const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);
- return !event.defaultPrevented;
- }
- applicationAllowsVisitingLocation(location) {
- const event = this.notifyApplicationBeforeVisitingLocation(location);
- return !event.defaultPrevented;
- }
- notifyApplicationAfterClickingLinkToLocation(link, location, event) {
- return dispatch("turbo:click", {
- target: link,
- detail: { url: location.href, originalEvent: event },
- cancelable: true,
- });
- }
- notifyApplicationBeforeVisitingLocation(location) {
- return dispatch("turbo:before-visit", {
- detail: { url: location.href },
- cancelable: true,
- });
- }
- notifyApplicationAfterVisitingLocation(location, action) {
- return dispatch("turbo:visit", { detail: { url: location.href, action } });
- }
- notifyApplicationBeforeCachingSnapshot() {
- return dispatch("turbo:before-cache");
- }
- notifyApplicationBeforeRender(newBody, options) {
- return dispatch("turbo:before-render", {
- detail: Object.assign({ newBody }, options),
- cancelable: true,
- });
- }
- notifyApplicationAfterRender() {
- return dispatch("turbo:render");
- }
- notifyApplicationAfterPageLoad(timing = {}) {
- return dispatch("turbo:load", {
- detail: { url: this.location.href, timing },
- });
- }
- notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {
- dispatchEvent(new HashChangeEvent("hashchange", {
- oldURL: oldURL.toString(),
- newURL: newURL.toString(),
- }));
- }
- notifyApplicationAfterFrameLoad(frame) {
- return dispatch("turbo:frame-load", { target: frame });
- }
- notifyApplicationAfterFrameRender(fetchResponse, frame) {
- return dispatch("turbo:frame-render", {
- detail: { fetchResponse },
- target: frame,
- cancelable: true,
- });
- }
- submissionIsNavigatable(form, submitter) {
- if (this.formMode == "off") {
- return false;
- }
- else {
- const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;
- if (this.formMode == "optin") {
- return submitterIsNavigatable && form.closest('[data-turbo="true"]') != null;
- }
- else {
- return submitterIsNavigatable && this.elementIsNavigatable(form);
- }
- }
- }
- elementIsNavigatable(element) {
- const container = findClosestRecursively(element, "[data-turbo]");
- const withinFrame = findClosestRecursively(element, "turbo-frame");
- if (this.drive || withinFrame) {
- if (container) {
- return container.getAttribute("data-turbo") != "false";
- }
- else {
- return true;
- }
- }
- else {
- if (container) {
- return container.getAttribute("data-turbo") == "true";
- }
- else {
- return false;
- }
- }
- }
- getActionForLink(link) {
- return getVisitAction(link) || "advance";
- }
- get snapshot() {
- return this.view.snapshot;
- }
-}
-function extendURLWithDeprecatedProperties(url) {
- Object.defineProperties(url, deprecatedLocationPropertyDescriptors);
-}
-const deprecatedLocationPropertyDescriptors = {
- absoluteURL: {
- get() {
- return this.toString();
- },
- },
-};
-
-class Cache {
- constructor(session) {
- this.session = session;
- }
- clear() {
- this.session.clearCache();
- }
- resetCacheControl() {
- this.setCacheControl("");
- }
- exemptPageFromCache() {
- this.setCacheControl("no-cache");
- }
- exemptPageFromPreview() {
- this.setCacheControl("no-preview");
- }
- setCacheControl(value) {
- setMetaContent("turbo-cache-control", value);
- }
-}
-
-const StreamActions = {
- after() {
- this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });
- },
- append() {
- this.removeDuplicateTargetChildren();
- this.targetElements.forEach((e) => e.append(this.templateContent));
- },
- before() {
- this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });
- },
- prepend() {
- this.removeDuplicateTargetChildren();
- this.targetElements.forEach((e) => e.prepend(this.templateContent));
- },
- remove() {
- this.targetElements.forEach((e) => e.remove());
- },
- replace() {
- this.targetElements.forEach((e) => e.replaceWith(this.templateContent));
- },
- update() {
- this.targetElements.forEach((targetElement) => {
- targetElement.innerHTML = "";
- targetElement.append(this.templateContent);
- });
- },
-};
-
-const session = new Session();
-const cache = new Cache(session);
-const { navigator: navigator$1 } = session;
-function start() {
- session.start();
-}
-function registerAdapter(adapter) {
- session.registerAdapter(adapter);
-}
-function visit(location, options) {
- session.visit(location, options);
-}
-function connectStreamSource(source) {
- session.connectStreamSource(source);
-}
-function disconnectStreamSource(source) {
- session.disconnectStreamSource(source);
-}
-function renderStreamMessage(message) {
- session.renderStreamMessage(message);
-}
-function clearCache() {
- console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`");
- session.clearCache();
-}
-function setProgressBarDelay(delay) {
- session.setProgressBarDelay(delay);
-}
-function setConfirmMethod(confirmMethod) {
- FormSubmission.confirmMethod = confirmMethod;
-}
-function setFormMode(mode) {
- session.setFormMode(mode);
-}
-
-var Turbo = /*#__PURE__*/Object.freeze({
- __proto__: null,
- navigator: navigator$1,
- session: session,
- cache: cache,
- PageRenderer: PageRenderer,
- PageSnapshot: PageSnapshot,
- FrameRenderer: FrameRenderer,
- start: start,
- registerAdapter: registerAdapter,
- visit: visit,
- connectStreamSource: connectStreamSource,
- disconnectStreamSource: disconnectStreamSource,
- renderStreamMessage: renderStreamMessage,
- clearCache: clearCache,
- setProgressBarDelay: setProgressBarDelay,
- setConfirmMethod: setConfirmMethod,
- setFormMode: setFormMode,
- StreamActions: StreamActions
-});
-
-class TurboFrameMissingError extends Error {
-}
-
-class FrameController {
- constructor(element) {
- this.fetchResponseLoaded = (_fetchResponse) => { };
- this.currentFetchRequest = null;
- this.resolveVisitPromise = () => { };
- this.connected = false;
- this.hasBeenLoaded = false;
- this.ignoredAttributes = new Set();
- this.action = null;
- this.visitCachedSnapshot = ({ element }) => {
- const frame = element.querySelector("#" + this.element.id);
- if (frame && this.previousFrameElement) {
- frame.replaceChildren(...this.previousFrameElement.children);
- }
- delete this.previousFrameElement;
- };
- this.element = element;
- this.view = new FrameView(this, this.element);
- this.appearanceObserver = new AppearanceObserver(this, this.element);
- this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);
- this.linkInterceptor = new LinkInterceptor(this, this.element);
- this.restorationIdentifier = uuid();
- this.formSubmitObserver = new FormSubmitObserver(this, this.element);
- }
- connect() {
- if (!this.connected) {
- this.connected = true;
- if (this.loadingStyle == FrameLoadingStyle.lazy) {
- this.appearanceObserver.start();
- }
- else {
- this.loadSourceURL();
- }
- this.formLinkClickObserver.start();
- this.linkInterceptor.start();
- this.formSubmitObserver.start();
- }
- }
- disconnect() {
- if (this.connected) {
- this.connected = false;
- this.appearanceObserver.stop();
- this.formLinkClickObserver.stop();
- this.linkInterceptor.stop();
- this.formSubmitObserver.stop();
- }
- }
- disabledChanged() {
- if (this.loadingStyle == FrameLoadingStyle.eager) {
- this.loadSourceURL();
- }
- }
- sourceURLChanged() {
- if (this.isIgnoringChangesTo("src"))
- return;
- if (this.element.isConnected) {
- this.complete = false;
- }
- if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {
- this.loadSourceURL();
- }
- }
- sourceURLReloaded() {
- const { src } = this.element;
- this.ignoringChangesToAttribute("complete", () => {
- this.element.removeAttribute("complete");
- });
- this.element.src = null;
- this.element.src = src;
- return this.element.loaded;
- }
- completeChanged() {
- if (this.isIgnoringChangesTo("complete"))
- return;
- this.loadSourceURL();
- }
- loadingStyleChanged() {
- if (this.loadingStyle == FrameLoadingStyle.lazy) {
- this.appearanceObserver.start();
- }
- else {
- this.appearanceObserver.stop();
- this.loadSourceURL();
- }
- }
- async loadSourceURL() {
- if (this.enabled && this.isActive && !this.complete && this.sourceURL) {
- this.element.loaded = this.visit(expandURL(this.sourceURL));
- this.appearanceObserver.stop();
- await this.element.loaded;
- this.hasBeenLoaded = true;
- }
- }
- async loadResponse(fetchResponse) {
- if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {
- this.sourceURL = fetchResponse.response.url;
- }
- try {
- const html = await fetchResponse.responseHTML;
- if (html) {
- const document = parseHTMLDocument(html);
- const pageSnapshot = PageSnapshot.fromDocument(document);
- if (pageSnapshot.isVisitable) {
- await this.loadFrameResponse(fetchResponse, document);
- }
- else {
- await this.handleUnvisitableFrameResponse(fetchResponse);
- }
- }
- }
- finally {
- this.fetchResponseLoaded = () => { };
- }
- }
- elementAppearedInViewport(element) {
- this.proposeVisitIfNavigatedWithAction(element, element);
- this.loadSourceURL();
- }
- willSubmitFormLinkToLocation(link) {
- return this.shouldInterceptNavigation(link);
- }
- submittedFormLinkToLocation(link, _location, form) {
- const frame = this.findFrameElement(link);
- if (frame)
- form.setAttribute("data-turbo-frame", frame.id);
- }
- shouldInterceptLinkClick(element, _location, _event) {
- return this.shouldInterceptNavigation(element);
- }
- linkClickIntercepted(element, location) {
- this.navigateFrame(element, location);
- }
- willSubmitForm(element, submitter) {
- return element.closest("turbo-frame") == this.element && this.shouldInterceptNavigation(element, submitter);
- }
- formSubmitted(element, submitter) {
- if (this.formSubmission) {
- this.formSubmission.stop();
- }
- this.formSubmission = new FormSubmission(this, element, submitter);
- const { fetchRequest } = this.formSubmission;
- this.prepareRequest(fetchRequest);
- this.formSubmission.start();
- }
- prepareRequest(request) {
- var _a;
- request.headers["Turbo-Frame"] = this.id;
- if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute("data-turbo-stream")) {
- request.acceptResponseType(StreamMessage.contentType);
- }
- }
- requestStarted(_request) {
- markAsBusy(this.element);
- }
- requestPreventedHandlingResponse(_request, _response) {
- this.resolveVisitPromise();
- }
- async requestSucceededWithResponse(request, response) {
- await this.loadResponse(response);
- this.resolveVisitPromise();
- }
- async requestFailedWithResponse(request, response) {
- await this.loadResponse(response);
- this.resolveVisitPromise();
- }
- requestErrored(request, error) {
- console.error(error);
- this.resolveVisitPromise();
- }
- requestFinished(_request) {
- clearBusyState(this.element);
- }
- formSubmissionStarted({ formElement }) {
- markAsBusy(formElement, this.findFrameElement(formElement));
- }
- formSubmissionSucceededWithResponse(formSubmission, response) {
- const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);
- frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);
- frame.delegate.loadResponse(response);
- if (!formSubmission.isSafe) {
- session.clearCache();
- }
- }
- formSubmissionFailedWithResponse(formSubmission, fetchResponse) {
- this.element.delegate.loadResponse(fetchResponse);
- session.clearCache();
- }
- formSubmissionErrored(formSubmission, error) {
- console.error(error);
- }
- formSubmissionFinished({ formElement }) {
- clearBusyState(formElement, this.findFrameElement(formElement));
- }
- allowsImmediateRender({ element: newFrame }, options) {
- const event = dispatch("turbo:before-frame-render", {
- target: this.element,
- detail: Object.assign({ newFrame }, options),
- cancelable: true,
- });
- const { defaultPrevented, detail: { render }, } = event;
- if (this.view.renderer && render) {
- this.view.renderer.renderElement = render;
- }
- return !defaultPrevented;
- }
- viewRenderedSnapshot(_snapshot, _isPreview) { }
- preloadOnLoadLinksForView(element) {
- session.preloadOnLoadLinksForView(element);
- }
- viewInvalidated() { }
- willRenderFrame(currentElement, _newElement) {
- this.previousFrameElement = currentElement.cloneNode(true);
- }
- async loadFrameResponse(fetchResponse, document) {
- const newFrameElement = await this.extractForeignFrameElement(document.body);
- if (newFrameElement) {
- const snapshot = new Snapshot(newFrameElement);
- const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);
- if (this.view.renderPromise)
- await this.view.renderPromise;
- this.changeHistory();
- await this.view.render(renderer);
- this.complete = true;
- session.frameRendered(fetchResponse, this.element);
- session.frameLoaded(this.element);
- this.fetchResponseLoaded(fetchResponse);
- }
- else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {
- this.handleFrameMissingFromResponse(fetchResponse);
- }
- }
- async visit(url) {
- var _a;
- const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);
- (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();
- this.currentFetchRequest = request;
- return new Promise((resolve) => {
- this.resolveVisitPromise = () => {
- this.resolveVisitPromise = () => { };
- this.currentFetchRequest = null;
- resolve();
- };
- request.perform();
- });
- }
- navigateFrame(element, url, submitter) {
- const frame = this.findFrameElement(element, submitter);
- frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);
- this.withCurrentNavigationElement(element, () => {
- frame.src = url;
- });
- }
- proposeVisitIfNavigatedWithAction(frame, element, submitter) {
- this.action = getVisitAction(submitter, element, frame);
- if (this.action) {
- const pageSnapshot = PageSnapshot.fromElement(frame).clone();
- const { visitCachedSnapshot } = frame.delegate;
- frame.delegate.fetchResponseLoaded = (fetchResponse) => {
- if (frame.src) {
- const { statusCode, redirected } = fetchResponse;
- const responseHTML = frame.ownerDocument.documentElement.outerHTML;
- const response = { statusCode, redirected, responseHTML };
- const options = {
- response,
- visitCachedSnapshot,
- willRender: false,
- updateHistory: false,
- restorationIdentifier: this.restorationIdentifier,
- snapshot: pageSnapshot,
- };
- if (this.action)
- options.action = this.action;
- session.visit(frame.src, options);
- }
- };
- }
- }
- changeHistory() {
- if (this.action) {
- const method = getHistoryMethodForAction(this.action);
- session.history.update(method, expandURL(this.element.src || ""), this.restorationIdentifier);
- }
- }
- async handleUnvisitableFrameResponse(fetchResponse) {
- console.warn(`The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`);
- await this.visitResponse(fetchResponse.response);
- }
- willHandleFrameMissingFromResponse(fetchResponse) {
- this.element.setAttribute("complete", "");
- const response = fetchResponse.response;
- const visit = async (url, options = {}) => {
- if (url instanceof Response) {
- this.visitResponse(url);
- }
- else {
- session.visit(url, options);
- }
- };
- const event = dispatch("turbo:frame-missing", {
- target: this.element,
- detail: { response, visit },
- cancelable: true,
- });
- return !event.defaultPrevented;
- }
- handleFrameMissingFromResponse(fetchResponse) {
- this.view.missing();
- this.throwFrameMissingError(fetchResponse);
- }
- throwFrameMissingError(fetchResponse) {
- const message = `The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;
- throw new TurboFrameMissingError(message);
- }
- async visitResponse(response) {
- const wrapped = new FetchResponse(response);
- const responseHTML = await wrapped.responseHTML;
- const { location, redirected, statusCode } = wrapped;
- return session.visit(location, { response: { redirected, statusCode, responseHTML } });
- }
- findFrameElement(element, submitter) {
- var _a;
- const id = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target");
- return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;
- }
- async extractForeignFrameElement(container) {
- let element;
- const id = CSS.escape(this.id);
- try {
- element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);
- if (element) {
- return element;
- }
- element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);
- if (element) {
- await element.loaded;
- return await this.extractForeignFrameElement(element);
- }
- }
- catch (error) {
- console.error(error);
- return new FrameElement();
- }
- return null;
- }
- formActionIsVisitable(form, submitter) {
- const action = getAction(form, submitter);
- return locationIsVisitable(expandURL(action), this.rootLocation);
- }
- shouldInterceptNavigation(element, submitter) {
- const id = getAttribute("data-turbo-frame", submitter, element) || this.element.getAttribute("target");
- if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {
- return false;
- }
- if (!this.enabled || id == "_top") {
- return false;
- }
- if (id) {
- const frameElement = getFrameElementById(id);
- if (frameElement) {
- return !frameElement.disabled;
- }
- }
- if (!session.elementIsNavigatable(element)) {
- return false;
- }
- if (submitter && !session.elementIsNavigatable(submitter)) {
- return false;
- }
- return true;
- }
- get id() {
- return this.element.id;
- }
- get enabled() {
- return !this.element.disabled;
- }
- get sourceURL() {
- if (this.element.src) {
- return this.element.src;
- }
- }
- set sourceURL(sourceURL) {
- this.ignoringChangesToAttribute("src", () => {
- this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;
- });
- }
- get loadingStyle() {
- return this.element.loading;
- }
- get isLoading() {
- return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;
- }
- get complete() {
- return this.element.hasAttribute("complete");
- }
- set complete(value) {
- this.ignoringChangesToAttribute("complete", () => {
- if (value) {
- this.element.setAttribute("complete", "");
- }
- else {
- this.element.removeAttribute("complete");
- }
- });
- }
- get isActive() {
- return this.element.isActive && this.connected;
- }
- get rootLocation() {
- var _a;
- const meta = this.element.ownerDocument.querySelector(`meta[name="turbo-root"]`);
- const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : "/";
- return expandURL(root);
- }
- isIgnoringChangesTo(attributeName) {
- return this.ignoredAttributes.has(attributeName);
- }
- ignoringChangesToAttribute(attributeName, callback) {
- this.ignoredAttributes.add(attributeName);
- callback();
- this.ignoredAttributes.delete(attributeName);
- }
- withCurrentNavigationElement(element, callback) {
- this.currentNavigationElement = element;
- callback();
- delete this.currentNavigationElement;
- }
-}
-function getFrameElementById(id) {
- if (id != null) {
- const element = document.getElementById(id);
- if (element instanceof FrameElement) {
- return element;
- }
- }
-}
-function activateElement(element, currentURL) {
- if (element) {
- const src = element.getAttribute("src");
- if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {
- throw new Error(`Matching element has a source URL which references itself`);
- }
- if (element.ownerDocument !== document) {
- element = document.importNode(element, true);
- }
- if (element instanceof FrameElement) {
- element.connectedCallback();
- element.disconnectedCallback();
- return element;
- }
- }
-}
-
-class StreamElement extends HTMLElement {
- static async renderElement(newElement) {
- await newElement.performAction();
- }
- async connectedCallback() {
- try {
- await this.render();
- }
- catch (error) {
- console.error(error);
- }
- finally {
- this.disconnect();
- }
- }
- async render() {
- var _a;
- return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {
- const event = this.beforeRenderEvent;
- if (this.dispatchEvent(event)) {
- await nextAnimationFrame();
- await event.detail.render(this);
- }
- })()));
- }
- disconnect() {
- try {
- this.remove();
- }
- catch (_a) { }
- }
- removeDuplicateTargetChildren() {
- this.duplicateChildren.forEach((c) => c.remove());
- }
- get duplicateChildren() {
- var _a;
- const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);
- const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);
- return existingChildren.filter((c) => newChildrenIds.includes(c.id));
- }
- get performAction() {
- if (this.action) {
- const actionFunction = StreamActions[this.action];
- if (actionFunction) {
- return actionFunction;
- }
- this.raise("unknown action");
- }
- this.raise("action attribute is missing");
- }
- get targetElements() {
- if (this.target) {
- return this.targetElementsById;
- }
- else if (this.targets) {
- return this.targetElementsByQuery;
- }
- else {
- this.raise("target or targets attribute is missing");
- }
- }
- get templateContent() {
- return this.templateElement.content.cloneNode(true);
- }
- get templateElement() {
- if (this.firstElementChild === null) {
- const template = this.ownerDocument.createElement("template");
- this.appendChild(template);
- return template;
- }
- else if (this.firstElementChild instanceof HTMLTemplateElement) {
- return this.firstElementChild;
- }
- this.raise("first child element must be a element");
- }
- get action() {
- return this.getAttribute("action");
- }
- get target() {
- return this.getAttribute("target");
- }
- get targets() {
- return this.getAttribute("targets");
- }
- raise(message) {
- throw new Error(`${this.description}: ${message}`);
- }
- get description() {
- var _a, _b;
- return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : "";
- }
- get beforeRenderEvent() {
- return new CustomEvent("turbo:before-stream-render", {
- bubbles: true,
- cancelable: true,
- detail: { newStream: this, render: StreamElement.renderElement },
- });
- }
- get targetElementsById() {
- var _a;
- const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);
- if (element !== null) {
- return [element];
- }
- else {
- return [];
- }
- }
- get targetElementsByQuery() {
- var _a;
- const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);
- if (elements.length !== 0) {
- return Array.prototype.slice.call(elements);
- }
- else {
- return [];
- }
- }
-}
-
-class StreamSourceElement extends HTMLElement {
- constructor() {
- super(...arguments);
- this.streamSource = null;
- }
- connectedCallback() {
- this.streamSource = this.src.match(/^ws{1,2}:/) ? new WebSocket(this.src) : new EventSource(this.src);
- connectStreamSource(this.streamSource);
- }
- disconnectedCallback() {
- if (this.streamSource) {
- disconnectStreamSource(this.streamSource);
- }
- }
- get src() {
- return this.getAttribute("src") || "";
- }
-}
-
-FrameElement.delegateConstructor = FrameController;
-if (customElements.get("turbo-frame") === undefined) {
- customElements.define("turbo-frame", FrameElement);
-}
-if (customElements.get("turbo-stream") === undefined) {
- customElements.define("turbo-stream", StreamElement);
-}
-if (customElements.get("turbo-stream-source") === undefined) {
- customElements.define("turbo-stream-source", StreamSourceElement);
-}
-
-(() => {
- let element = document.currentScript;
- if (!element)
- return;
- if (element.hasAttribute("data-turbo-suppress-warning"))
- return;
- element = element.parentElement;
- while (element) {
- if (element == document.body) {
- return console.warn(unindent `
- You are loading Turbo from a