+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/signup.html b/signup.html
new file mode 100644
index 0000000..e44622f
--- /dev/null
+++ b/signup.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/css/main_style.css b/static/css/main_style.css
new file mode 100644
index 0000000..373693a
--- /dev/null
+++ b/static/css/main_style.css
@@ -0,0 +1,1298 @@
+@charset "utf-8";
+
+/***********
+1. Fonts
+***********/
+
+@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800');
+@font-face
+{
+ font-family: 'Beyond';
+ src: url('../fonts/beyond_the_mountains.otf') format('truetype'),
+ url('../fonts/beyond_the_mountains.ttf') format('opentype');
+}
+
+/*********************************
+2. Body and some general stuff
+*********************************/
+
+*
+{
+ margin: 0;
+ padding: 0;
+ -webkit-font-smoothing: antialiased;
+ -webkit-text-shadow: rgba(0,0,0,.01) 0 0 1px;
+ text-shadow: rgba(0,0,0,.01) 0 0 1px;
+}
+body
+{
+ font-family: 'Open Sans', sans-serif;
+ font-size: 14px;
+ font-weight: 400;
+ background: #FFFFFF;
+ color: #a5a5a5;
+}
+div
+{
+ display: block;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+ul
+{
+ list-style: none;
+ margin-bottom: 0px;
+}
+p
+{
+ font-family: 'Open Sans', sans-serif;
+ font-size: 14px;
+ line-height: 2;
+ font-weight: 400;
+ color: #929191;
+ -webkit-font-smoothing: antialiased;
+ -webkit-text-shadow: rgba(0,0,0,.01) 0 0 1px;
+ text-shadow: rgba(0,0,0,.01) 0 0 1px;
+}
+p a
+{
+ display: inline;
+ position: relative;
+ color: inherit;
+ border-bottom: solid 1px #ffa07f;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+a, a:hover, a:visited, a:active, a:link
+{
+ text-decoration: none;
+ -webkit-font-smoothing: antialiased;
+ -webkit-text-shadow: rgba(0,0,0,.01) 0 0 1px;
+ text-shadow: rgba(0,0,0,.01) 0 0 1px;
+}
+p a:active
+{
+ position: relative;
+ color: #FF6347;
+}
+p a:hover
+{
+ color: #FFFFFF;
+ background: #ffa07f;
+}
+p a:hover::after
+{
+ opacity: 0.2;
+}
+::selection
+{
+
+}
+p::selection
+{
+
+}
+h1{font-size: 48px;}
+h2{font-size: 36px;}
+h3{font-size: 24px;}
+h4{font-size: 18px;}
+h5{font-size: 14px;}
+h1, h2, h3, h4, h5, h6
+{
+ font-family: 'Open Sans', sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -webkit-text-shadow: rgba(0,0,0,.01) 0 0 1px;
+ text-shadow: rgba(0,0,0,.01) 0 0 1px;
+}
+h1::selection,
+h2::selection,
+h3::selection,
+h4::selection,
+h5::selection,
+h6::selection
+{
+
+}
+.form-control
+{
+ color: #db5246;
+}
+section
+{
+ display: block;
+ position: relative;
+ box-sizing: border-box;
+}
+.clear
+{
+ clear: both;
+}
+.clearfix::before, .clearfix::after
+{
+ content: "";
+ display: table;
+}
+.clearfix::after
+{
+ clear: both;
+}
+.clearfix
+{
+ zoom: 1;
+}
+.float_left
+{
+ float: left;
+}
+.float_right
+{
+ float: right;
+}
+.trans_200
+{
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.trans_300
+{
+ -webkit-transition: all 300ms ease;
+ -moz-transition: all 300ms ease;
+ -ms-transition: all 300ms ease;
+ -o-transition: all 300ms ease;
+ transition: all 300ms ease;
+}
+.trans_400
+{
+ -webkit-transition: all 400ms ease;
+ -moz-transition: all 400ms ease;
+ -ms-transition: all 400ms ease;
+ -o-transition: all 400ms ease;
+ transition: all 400ms ease;
+}
+.trans_500
+{
+ -webkit-transition: all 500ms ease;
+ -moz-transition: all 500ms ease;
+ -ms-transition: all 500ms ease;
+ -o-transition: all 500ms ease;
+ transition: all 500ms ease;
+}
+.fill_height
+{
+ height: 100%;
+}
+.super_container
+{
+ width: 100%;
+ overflow: hidden;
+}
+.prlx_parent
+{
+ overflow: hidden;
+}
+.prlx
+{
+ height: 130% !important;
+}
+.nopadding
+{
+ padding: 0px !important;
+}
+.button
+{
+ display: inline-block;
+ height: 53px;
+ border-radius: 27px;
+ overflow: hidden;
+}
+.button_bcg
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 200%;
+ height: 100%;
+ background: linear-gradient(to right, #00aa88, #f0ec0b, #00aa88);
+ z-index: -1;
+ -webkit-transition: all 400ms ease;
+ -moz-transition: all 400ms ease;
+ -ms-transition: all 400ms ease;
+ -o-transition: all 400ms ease;
+ transition: all 400ms ease;
+}
+.button:hover .button_bcg
+{
+ left: -100%;
+}
+.button a
+{
+ display: block;
+ font-size: 13px;
+ font-weight: 700;
+ color: #fff;
+ text-transform: uppercase;
+ line-height: 53px;
+ padding-left: 46px;
+ padding-right: 46px;
+ white-space: nowrap;
+ z-index: 2;
+}
+.button span
+{
+ display: inline-block;
+ vertical-align: middle;
+ width: 5.75px;
+ height: 5.63px;
+ background: #FFFFFF;
+ border-radius: 50%;
+ margin-right: 2px;
+}
+.button span:first-child
+{
+ margin-left: 10px;
+}
+.button span:nth-child(2)
+{
+ opacity: 0.6;
+}
+.button span:last-child
+{
+ opacity: 0.4;
+ margin-right: 0px;
+}
+
+/*********************************
+3. Header
+*********************************/
+
+.header
+{
+ position: fixed;
+ width: 100%;
+ background: rgba(9, 169, 136, 0.4);
+ z-index: 12;
+}
+.header.scrolled
+{
+ background: rgba(11, 131, 65, 0.85);
+}
+
+/*********************************
+3.1 Top Bar
+*********************************/
+
+.top_bar
+{
+ width: 100%;
+ height: 36px;
+ background: #308c79d9;
+ -webkit-transition: all 400ms ease;
+ -moz-transition: all 400ms ease;
+ -ms-transition: all 400ms ease;
+ -o-transition: all 400ms ease;
+ transition: all 400ms ease;
+}
+.header.scrolled .top_bar
+{
+ visibility: hidden;
+ opacity: 0;
+ height: 0px;
+}
+.phone
+{
+ display: inline-block;
+ margin-right: 36px;
+ line-height: 36px;
+ font-size: 10px;
+ font-weight: 600;
+ color: #FFFFFF;
+}
+.social_list_item a:hover
+{
+ color: #FFFFFF;
+}
+.user_box_link
+{
+ display: inline-block;
+}
+.user_box_link a
+{
+ display: block;
+ font-size: 10px;
+ line-height: 36px;
+ font-weight: 600;
+ color: #FFFFFF;
+ text-transform: uppercase;
+}
+.user_box_link a:hover
+{
+ color: #fa9e1c;
+}
+.user_box_login
+{
+ margin-right: 15px;
+}
+.user_box_login::after
+{
+ display: block;
+ position: absolute;
+ top: 15px;
+ right: -9px;
+ background: #FFFFFF;
+ width: 1px;
+ height: 9px;
+ content: '';
+}
+.main_nav_col
+{
+ height: 143px;
+ -webkit-transition: all 400ms ease;
+ -moz-transition: all 400ms ease;
+ -ms-transition: all 400ms ease;
+ -o-transition: all 400ms ease;
+ transition: all 400ms ease;
+}
+.header.scrolled .main_nav_col
+{
+ height: 100px;
+}
+
+/*********************************
+3.2 Logo
+*********************************/
+
+.logo_container
+{
+ -webkit-transform: translateY(-6px);
+ -moz-transform: translateY(-6px);
+ -ms-transform: translateY(-6px);
+ -o-transform: translateY(-6px);
+ transform: translateY(-6px);
+}
+.header.scrolled .logo_container
+{
+ -webkit-transform: none;
+ -moz-transform: none;
+ -ms-transform: none;
+ -o-transform: none;
+ transform: none;
+}
+.logo a
+{
+ font-family: 'Open Sans', sans-serif;
+ font-size: 30px;
+ color: #f4f4f8;
+ font-weight: 800;
+ text-transform: uppercase;
+}
+.logo a img
+{
+ display: inline-block;
+ vertical-align: baseline;
+ margin-right: 9px;
+ -webkit-transform: translateY(2px);
+ -moz-transform: translateY(2px);
+ -ms-transform: translateY(2px);
+ -o-transform: translateY(2px);
+ transform: translateY(2px);
+}
+
+/*********************************
+3.3 Main Nav
+*********************************/
+
+.main_nav_container
+{
+ margin-right: 221px;
+}
+.main_nav_item
+{
+ position: relative;
+ display: inline-block;
+ margin-right: 40px;
+}
+.main_nav_item:last-child
+{
+ margin-right: 0px;
+}
+.main_nav_item a
+{
+ font-family: 'Open Sans', sans-serif;
+ font-size: 13px;
+ font-weight: 600;
+ color: #000000;
+ text-transform: uppercase;
+ padding-bottom: 10px;
+ padding-top: 10px;
+}
+.main_nav_item::after
+{
+ display: block;
+ position: absolute;
+ left: -1px;
+ bottom: -11px;
+ width: calc(100% + 2px);
+ height: 2px;
+ background: linear-gradient(to right, #f0ec0b, #00aa88);
+ content: '';
+ opacity: 0;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.main_nav_item:hover::after
+{
+ opacity: 1;
+}
+.content_search
+{
+ -webkit-transform: translateY(-1px);
+ -moz-transform: translateY(-1px);
+ -ms-transform: translateY(-1px);
+ -o-transform: translateY(-1px);
+ transform: translateY(-1px);
+ cursor: pointer;
+}
+.header.scrolled .content_search
+{
+ -webkit-transform: none;
+ -moz-transform: none;
+ -ms-transform: none;
+ -o-transform: none;
+ transform: none;
+}
+.mag_glass
+{
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.content_search img
+{
+ width: 17px;
+ height: 17px;
+}
+.content_search:hover .mag_glass
+{
+ fill: #fa9e1c;
+}
+.search_form
+{
+ position: absolute;
+ right: 15px;
+ top: 120px;
+ width: 237px;
+ height: 40px;
+ visibility: hidden;
+ opacity: 0;
+}
+.search_form.active
+{
+ top: 105px;
+ visibility: visible;
+ opacity: 1;
+}
+.search_content_input
+{
+ width: 100%;
+ height: 100%;
+ background: #FFFFFF;
+ color: #002b22;
+ padding-left: 20px;
+ outline: none !important;
+ border: none !important;
+ box-shadow: 0px 8px 20px rgba(0,0,0,0.15);
+}
+.bez_1
+{
+ -webkit-transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
+ -moz-transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
+ -ms-transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
+ -o-transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
+ transition: all 0.3s cubic-bezier(0.7, 0, 0.3, 1);
+}
+
+/*********************************
+3.4 Menu
+*********************************/
+
+.hamburger
+{
+ display: none;
+ -webkit-transform: translateY(-3px);
+ -moz-transform: translateY(-3px);
+ -ms-transform: translateY(-3px);
+ -o-transform: translateY(-3px);
+ transform: translateY(-3px);
+ cursor: pointer;
+ margin-left: 20px;
+}
+.header.scrolled .hamburger
+{
+ -webkit-transform: none;
+ -moz-transform: none;
+ -ms-transform: none;
+ -o-transform: none;
+ transform: none;
+}
+.hamburger i
+{
+ font-size: 24px;
+ color: #FFFFFF;
+}
+.hamburger:hover i
+{
+ color: #f0ec0b;
+}
+.menu
+{
+ position: fixed;
+ width: 100vw;
+ height: 100vh;
+ background: linear-gradient(to right, #9b9931, #3fc4a9);
+ z-index: 100;
+ opacity: 0;
+ visibility: hidden;
+}
+.menu.active
+{
+ opacity: 0.95;
+ visibility: visible;
+}
+.menu_content
+{
+ width: 100%;
+ height: 100%;
+}
+.menu_item
+{
+ position: relative;
+ margin-bottom: 3px;
+}
+.menu_item:last-child
+{
+ margin-bottom: 0px;
+}
+.menu_logo
+{
+ margin-bottom: 28px;
+}
+.menu_logo a img
+{
+ width: 40px !important;
+}
+.menu_item a
+{
+ display: inline-block;
+ position: relative;
+ font-family: 'Beyond';
+ font-size: 36px;
+ color: #FFFFFF;
+ font-weight: 400;
+}
+.menu_item a::after
+{
+ display: block;
+ position: absolute;
+ top: 60%;
+ left: 0;
+ width: 0;
+ height: 4px;
+ background: #FFFFFF;
+ letter-spacing: 2px;
+ content: '';
+ z-index: 10;
+ pointer-events: none;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 400ms ease;
+}
+.menu_item:hover a::after
+{
+ width: 100%;
+}
+.menu_close_container
+{
+ position: absolute;
+ top: 94px;
+ right: 122px;
+ width: 21px;
+ height: 21px;
+ cursor: pointer;
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -ms-transform: rotate(45deg);
+ -o-transform: rotate(45deg);
+ transform: rotate(45deg);
+}
+.menu_close
+{
+ top: 9px;
+ width: 21px;
+ height: 3px;
+ background: #FFFFFF;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.menu_close::after
+{
+ display: block;
+ position: absolute;
+ top: -9px;
+ left: 9px;
+ content: '';
+ width: 3px;
+ height: 21px;
+ background: #FFFFFF;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.menu_close_container:hover .menu_close,
+.menu_close_container:hover .menu_close::after
+{
+ background: #f0ec0b;
+}
+
+/*********************************
+4. Home
+*********************************/
+
+.home
+{
+ width: 100%;
+ height: 100vh;
+}
+
+.firstSectionBG{
+ background-image: url(../../static/img/intro.png);
+ height: 40rem;
+ left: 800px;
+ top: 80px;
+ background-repeat: no-repeat;
+
+ }
+ .writeUP {
+ padding-top:20%;
+ padding-bottom: 50%;
+ right: 800px;
+ bottom: 100px;
+ }
+
+
+
+/*********************************
+8. CTA
+*********************************/
+
+.cta
+{
+ padding-top: 125px;
+ padding-bottom: 116px;
+ background: linear-gradient(to right, red, green);
+}
+.cta_background
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center center;
+ opacity: 0.27;
+}
+
+/*********************************
+8.1 CTA Slider
+*********************************/
+
+.cta_slider_container
+{
+
+}
+.cta_item
+{
+ padding-top: 75px;
+ padding-bottom: 61px;
+ padding-left: 90px;
+ padding-right: 90px;
+ background: #FFFFFF;
+}
+.cta_title
+{
+ font-size: 30px;
+ font-weight: 700;
+ color: #2d2c2c;
+ text-transform: uppercase;
+}
+.cta_text
+{
+ font-weight: 600;
+ line-height: 2.29;
+ margin-top: 14px;
+ margin-bottom: 0px;
+}
+.cta_button
+{
+ margin-top: 38px;
+}
+.rating_r i::before
+{
+ font-family: 'FontAwesome';
+ content: "\f006";
+ font-style: normal;
+ font-size: 19px;
+ margin-right: 4px;
+}
+.rating_r_1 i:first-child::before{color: #ffeb8d; content: "\f005";}
+.rating_r_2 i:first-child::before{color: #ffeb8d; content: "\f005";}
+.rating_r_2 i:nth-child(2)::before{color: #fed46b; content: "\f005";}
+.rating_r_3 i:first-child::before{color: #ffeb8d; content: "\f005";}
+.rating_r_3 i:nth-child(2)::before{color: #fed46b; content: "\f005";}
+.rating_r_3 i:nth-child(3)::before{color: #fbb53d; content: "\f005";}
+.rating_r_4 i:first-child::before{color: #ffeb8d; content: "\f005";}
+.rating_r_4 i:nth-child(2)::before{color: #fed46b; content: "\f005";}
+.rating_r_4 i:nth-child(3)::before{color: #fbb53d; content: "\f005";}
+.rating_r_4 i:nth-child(4)::before{color: #fa9e1b; content: "\f005";}
+.rating_r_5 i:first-child::before{color: #ffeb8d; content: "\f005";}
+.rating_r_5 i:nth-child(2)::before{color: #fed46b; content: "\f005";}
+.rating_r_5 i:nth-child(3)::before{color: #fbb53d; content: "\f005";}
+.rating_r_5 i:nth-child(4)::before{color: #fa9e1b; content: "\f005";}
+.rating_r_5 i:nth-child(5)::before{color: #ef910a; content: "\f005";}
+.cta_slider_nav
+{
+ position: absolute;
+ top: 50%;
+ -webkit-transform: translateY(-50%);
+ -moz-transform: translateY(-50%);
+ -ms-transform: translateY(-50%);
+ -o-transform: translateY(-50%);
+ transform: translateY(-50%);
+ z-index: 10;
+ cursor: pointer;
+}
+.cta_slider_prev
+{
+ left: -75px;
+}
+.cta_slider_next
+{
+ right: -75px;
+}
+.cta_slider_prev:hover .nav_path,
+.cta_slider_prev:hover .nav_arrow
+{
+ fill: url(#cta_grad_prev);
+}
+.cta_slider_next:hover .nav_path,
+.cta_slider_next:hover .nav_arrow
+{
+ fill: url(#cta_grad_next);
+}
+
+/*********************************
+9. Offers
+*********************************/
+
+.offers
+{
+ width: 100%;
+ padding-top: 105px;
+ padding-bottom: 43px;
+ background: #f3f6f9;
+}
+.offers_items
+{
+ margin-top: 90px;
+}
+.offers_col
+{
+ margin-bottom: 83px;
+}
+.offers_item
+{
+
+}
+.offers_image_container
+{
+ width: 100%;
+ height: 100%;
+}
+.offers_image_background
+{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center center;
+}
+.offer_name
+{
+ position: absolute;
+ left: 0;
+ bottom: 27px;
+ width: 180px;
+ height: 33px;
+ background: #fa9e1b;
+ overflow: hidden;
+}
+.offer_name a
+{
+ display: block;
+ font-size: 16px;
+ font-weight: 700;
+ color: #FFFFFF;
+ text-transform: uppercase;
+ line-height: 35px;
+ padding-left: 22px;
+}
+.offers_content
+{
+
+}
+.offers_price
+{
+ display: inline-block;
+ font-size: 36px;
+ font-weight: 700;
+ color: #eda84a;
+ line-height: 25px;
+}
+.offers_price span
+{
+ font-size: 14px;
+ font-weight: 400;
+ color: #929191;
+ margin-left: 12px;
+}
+.offers_rating
+{
+
+}
+.offers_rating i::before
+{
+ font-size: 13px;
+ margin-right: 2px;
+}
+.offers_text
+{
+ font-size: 14px;
+ font-weight: 400;
+ color: #929191;
+ margin-top: 16px;
+}
+.offers_icons
+{
+ margin-top: 17px;
+}
+.offers_icons_item
+{
+ display: inline-block;
+ margin-right: 15px;
+}
+.offers_icons_item:last-child
+{
+ margin-right: 0px;
+}
+.offers_link
+{
+ margin-top: 54px;
+}
+.offers_link a
+{
+ font-size: 12px;
+ font-weight: 700;
+ color: #2d2c2c;
+ text-transform: uppercase;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.offers_link a:hover
+{
+ color: #fa9e1b;
+}
+
+
+/*********************************
+12. Contact
+*********************************/
+
+.contact
+{
+ width: 100%;
+ padding-bottom: 105px;
+}
+.contact_background
+{
+ position: absolute;
+ bottom: -34px;
+ left: 0;
+ width: 100%;
+ height: 104%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center center;
+}
+.contact_title
+{
+ font-size: 30px;
+ font-weight: 700;
+ color: #FFFFFF;
+ text-transform: uppercase;
+}
+.contact_form_container
+{
+ padding-top: 74px;
+ padding-left: 48px;
+ padding-right: 48px;
+ padding-bottom: 88px;
+ background: linear-gradient(to top right, #f0ec0b, #00aa88);
+}
+.contact_form
+{
+ margin-top: 52px;
+ font-size: 0px;
+}
+.input_field
+{
+ height: 48px;
+ font-size: 12px;
+ font-weight: 400;
+ border: none;
+ outline: none;
+ background: transparent;
+ color: #FFFFFF;
+ border-bottom: solid 2px #e1e1e1;
+}
+.contact_form_name
+{
+ width: calc((100% - 30px) / 2);
+ margin-right: 30px;
+}
+.contact_form_email
+{
+ width: calc((100% - 30px) / 2);
+}
+.contact_form_subject
+{
+ width: 100%;
+ margin-top: 11px;
+}
+.contact_form_message
+{
+ height: 126px;
+ width: 100%;
+ border: none;
+ outline: none;
+ margin-top: 19px;
+ background: transparent;
+ font-size: 12px;
+ font-weight: 400;
+ color: #FFFFFF;
+ border-bottom: solid 2px #e1e1e1;
+ padding-top: 11px;
+}
+.form_submit_button
+{
+ font-size: 13px;
+ font-weight: 700;
+ color: #fff;
+ text-transform: uppercase;
+ line-height: 53px;
+ padding-left: 29px;
+ padding-right: 29px;
+ background: #005544d9;
+ -webkit-transform: translateY(15px);
+ -moz-transform: translateY(15px);
+ -ms-transform: translateY(15px);
+ -o-transform: translateY(15px);
+ transform: translateY(15px);
+ border: none;
+ outline: none;
+ margin-top: 37px;
+ cursor: pointer;
+}
+.form_submit_button:hover
+{
+ opacity: 0.8;
+}
+.input_field::-webkit-input-placeholder,
+.text_field::-webkit-input-placeholder
+{
+ font-size: 12px !important;
+ font-weight: 400 !important;
+ color: #FFFFFF !important;
+}
+.input_field:-moz-placeholder,
+.text_field:-moz-placeholder
+{
+ font-size: 12px !important;
+ font-weight: 400 !important;
+ color: #FFFFFF !important;
+}
+.input_field::-moz-placeholder,
+.text_field::-moz-placeholder
+{
+ font-size: 12px !important;
+ font-weight: 400 !important;
+ color: #FFFFFF !important;
+}
+.input_field:-ms-input-placeholder,
+.text_field:-ms-input-placeholder
+{
+ font-size: 12px !important;
+ font-weight: 400 !important;
+ color: #FFFFFF !important;
+}
+.input_field::input-placeholder,
+.text_field::input-placeholder
+{
+ font-size: 12px !important;
+ font-weight: 400 !important;
+ color: #FFFFFF !important;
+}
+
+/*********************************
+13. Footer
+*********************************/
+
+.footer
+{
+ width: 100%;
+ padding-top: 113px;
+ padding-bottom: 104px;
+ background: #005544d9;
+}
+.footer_title
+{
+ font-size: 15px;
+ font-weight: 700;
+ color: #FFFFFF;
+ text-transform: uppercase;
+}
+
+/*********************************
+13.1 Footer - About
+*********************************/
+
+.footer_about
+{
+ padding-top: 67px;
+}
+.footer_logo
+{
+ position: absolute;
+ left: 0;
+ top: -24px;
+}
+.footer_about_text
+{
+ font-size: 14px;
+ font-weight: 600;
+ color: #FFFFFF;
+}
+.footer_social_item
+{
+ display: inline-block;
+ width: 31px;
+ height: 31px;
+ border: solid 1px #fa9e1b;
+ border-radius: 50%;
+ text-align: center;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+ margin-right: 9px;
+}
+.footer_social_item:last-child
+{
+ margin-right: 0px;
+}
+.footer_social_item a
+{
+ display: block;
+ position: relative;
+ width: 100%;
+ height: 100%;
+}
+.footer_social_item a i
+{
+ display: block;
+ position: relative;
+ color: #FFFFFF;
+ top: 50%;
+ -webkit-transform: translateY(-50%);
+ -moz-transform: translateY(-50%);
+ -ms-transform: translateY(-50%);
+ -o-transform: translateY(-50%);
+ transform: translateY(-50%);
+ font-size: 12px;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.footer_social_item:hover
+{
+ background: #fa9e1b;
+}
+.footer_social_item:hover a i
+{
+ color: #333;
+}
+
+/*********************************
+13.2 Footer - Blog
+*********************************/
+
+.footer_blog
+{
+ margin-top: 39px;
+}
+.footer_blog_item
+{
+ margin-bottom: 21px;
+}
+.footer_blog_item:last-child
+{
+ margin-bottom: 0px;
+}
+.footer_blog_image
+{
+ width: 60px;
+ height: 60px;
+ float: left;
+}
+.footer_blog_image img
+{
+ width: 100%;
+}
+.footer_blog_content
+{
+ padding-left: 81px;
+}
+.footer_blog_title
+{
+ margin-top: -4px;
+ padding-left: 1px;
+}
+.footer_blog_title a
+{
+ font-size: 14px;
+ font-weight: 400;
+ color: #FFFFFF;
+}
+.footer_blog_title a:hover
+{
+ color: #fa9e1b;
+}
+.footer_blog_date
+{
+ font-size: 12px;
+ font-weight: 400;
+ color: #fa9e1b;
+ margin-top: 7px;
+}
+
+/*********************************
+13.3 Footer - Tags
+*********************************/
+
+.footer_tags
+{
+ margin-top: 40px;
+}
+.tag_item
+{
+ height: 35px;
+ float: left;
+ margin-right: 9px;
+ margin-bottom: 9px;
+ border: solid 1px #fa9e1b;
+ -webkit-transition: all 200ms ease;
+ -moz-transition: all 200ms ease;
+ -ms-transition: all 200ms ease;
+ -o-transition: all 200ms ease;
+ transition: all 200ms ease;
+}
+.tag_item:hover
+{
+ background: #fa9e1b;
+}
+.tag_item a
+{
+ display: block;
+ font-size: 12px;
+ font-weight: 600;
+ color: #FFFFFF;
+ line-height: 33px;
+ padding-left: 25px;
+ padding-right: 25px;
+}
+
+/*********************************
+13.4 Footer - Contact Info
+*********************************/
+
+.contact_info_list
+{
+ margin-top: 40px;
+}
+.contact_info_item
+{
+ margin-bottom: 22px;
+}
+.contact_info_icon
+{
+ width: 20px;
+ height: 20px;
+ margin-right: 10px;
+}
+.contact_info_icon img
+{
+ display: block;
+ width: 100%;
+}
+.contact_info_text,
+.contact_info_text a
+{
+ color: #FFFFFF;
+ line-height: 2.14;
+ margin-top: -4px;
+}
+.contact_info_item:hover .contact_info_text,
+.contact_info_item:hover .contact_info_text a
+{
+ color: #fa9e1b;
+}
+
diff --git a/static/css/style.css b/static/css/style.css
deleted file mode 100644
index 1cadf95..0000000
--- a/static/css/style.css
+++ /dev/null
@@ -1,77 +0,0 @@
-.firstSectionBG{
- background-image: url('../../static/img/svg/undraw_best_place_r685.svg');
- height: 32rem;
- background-repeat:round ;
-}
-.triangle {
- border-top: 100px solid transparent;
- border-right: 100px solid transparent;
- border-bottom: 100px solid transparent;
- border-left: 100px solid #71ce47;
- margin: 40px;
- color: #943a3a;
- padding: 2% 1.5%;
- }
-
-/********* Simple or original overlay *******/
-/* Main container */
-.overlay-image {
- position: relative;
- width: 100%;
- }
- /* Original image */
- .overlay-image .image {
- display: block;
- width: 100%;
- height: auto;
- }
- /* Original text overlay */
- .overlay-image .text {
- color: #fff;
- font-size: 30px;
- line-height: 1.5em;
- text-shadow: 2px 2px 2px #000;
- text-align: center;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 100%;
- }
-
-/********* Overlay on hover *******/
-/* New overlay on hover */
-.overlay-image .hover {
- position: absolute;
- top: 10px;
- height: 93%;
- width: 85%;
- opacity: 0;
- transition: .5s ease;
-}
-/* New overlay appearance on hover */
-.overlay-image:hover .hover {
- opacity: 1;
-}
-.overlay-image .normal {
- transition: .5s ease;
-}
-.overlay-image:hover .normal {
- opacity: 0;
-}
-.overlay-image .hover {
- background-color: rgba(0,0,0,0.5);
-}
-
-/* Signup form style starts here */
-.formResize{
- width: auto;
- margin: auto;
-}
-/* Signup form style starts here */
-
-.signUpBG{
- background-image: url('../../static/img/svg/undraw_build_your__home_csh6.svg');
- background-repeat: no-repeat;
- background: cover;
-}
\ No newline at end of file
diff --git a/static/img/1049042_v6.webp b/static/img/1049042_v6.webp
new file mode 100644
index 0000000..269a8d7
Binary files /dev/null and b/static/img/1049042_v6.webp differ
diff --git a/static/img/657161-217711_0_0_1400_900_1400_900.rc.jpg b/static/img/657161-217711_0_0_1400_900_1400_900.rc.jpg
new file mode 100644
index 0000000..2b8608f
Binary files /dev/null and b/static/img/657161-217711_0_0_1400_900_1400_900.rc.jpg differ
diff --git a/static/img/Avante Studio Suite 04 AP0615 CRPD1600x760.jpg b/static/img/Avante Studio Suite 04 AP0615 CRPD1600x760.jpg
new file mode 100644
index 0000000..c5b7a6b
Binary files /dev/null and b/static/img/Avante Studio Suite 04 AP0615 CRPD1600x760.jpg differ
diff --git a/static/img/Dhaka-Hotels.jpg b/static/img/Dhaka-Hotels.jpg
new file mode 100644
index 0000000..515bea0
Binary files /dev/null and b/static/img/Dhaka-Hotels.jpg differ
diff --git a/static/img/Hostel10.png b/static/img/Hostel10.png
new file mode 100644
index 0000000..13e5b3e
Binary files /dev/null and b/static/img/Hostel10.png differ
diff --git a/static/img/Hostel11.png b/static/img/Hostel11.png
new file mode 100644
index 0000000..fa734fb
Binary files /dev/null and b/static/img/Hostel11.png differ
diff --git a/static/img/Hostel2.jpg b/static/img/Hostel2.jpg
new file mode 100644
index 0000000..bfe1f02
Binary files /dev/null and b/static/img/Hostel2.jpg differ
diff --git a/static/img/Hostel3.jpg b/static/img/Hostel3.jpg
new file mode 100644
index 0000000..e04962e
Binary files /dev/null and b/static/img/Hostel3.jpg differ
diff --git a/static/img/Hostel4.jpg b/static/img/Hostel4.jpg
new file mode 100644
index 0000000..d47ef57
Binary files /dev/null and b/static/img/Hostel4.jpg differ
diff --git a/static/img/Hostel5.jpg b/static/img/Hostel5.jpg
new file mode 100644
index 0000000..9ee99c8
Binary files /dev/null and b/static/img/Hostel5.jpg differ
diff --git a/static/img/Hostel5.png b/static/img/Hostel5.png
new file mode 100644
index 0000000..c22bbef
Binary files /dev/null and b/static/img/Hostel5.png differ
diff --git a/static/img/Hostel6.jpg b/static/img/Hostel6.jpg
new file mode 100644
index 0000000..7866137
Binary files /dev/null and b/static/img/Hostel6.jpg differ
diff --git a/static/img/Hostel7.png b/static/img/Hostel7.png
new file mode 100644
index 0000000..2c1dfcb
Binary files /dev/null and b/static/img/Hostel7.png differ
diff --git a/static/img/Hostel8.jpg b/static/img/Hostel8.jpg
new file mode 100644
index 0000000..7bfc748
Binary files /dev/null and b/static/img/Hostel8.jpg differ
diff --git a/static/img/Hostel9.jpg b/static/img/Hostel9.jpg
new file mode 100644
index 0000000..391f407
Binary files /dev/null and b/static/img/Hostel9.jpg differ
diff --git a/static/img/Man.jpg b/static/img/Man.jpg
new file mode 100644
index 0000000..222e51c
Binary files /dev/null and b/static/img/Man.jpg differ
diff --git a/static/img/Room.jpg b/static/img/Room.jpg
new file mode 100644
index 0000000..2da2053
Binary files /dev/null and b/static/img/Room.jpg differ
diff --git a/static/img/Room1.jpg b/static/img/Room1.jpg
new file mode 100644
index 0000000..c3da0c6
Binary files /dev/null and b/static/img/Room1.jpg differ
diff --git a/static/img/Room2.jpg b/static/img/Room2.jpg
new file mode 100644
index 0000000..5025980
Binary files /dev/null and b/static/img/Room2.jpg differ
diff --git a/static/img/about_background.jpg b/static/img/about_background.jpg
new file mode 100644
index 0000000..b227d0e
Binary files /dev/null and b/static/img/about_background.jpg differ
diff --git a/static/img/add.jpg b/static/img/add.jpg
new file mode 100644
index 0000000..a9bb25b
Binary files /dev/null and b/static/img/add.jpg differ
diff --git a/static/img/back.jpg b/static/img/back.jpg
new file mode 100644
index 0000000..821a2ea
Binary files /dev/null and b/static/img/back.jpg differ
diff --git a/static/img/bg-01.jpg b/static/img/bg-01.jpg
new file mode 100644
index 0000000..59cd513
Binary files /dev/null and b/static/img/bg-01.jpg differ
diff --git a/static/img/bicycle.png b/static/img/bicycle.png
new file mode 100644
index 0000000..16e204d
Binary files /dev/null and b/static/img/bicycle.png differ
diff --git a/static/img/compass.png b/static/img/compass.png
new file mode 100644
index 0000000..09a3664
Binary files /dev/null and b/static/img/compass.png differ
diff --git a/static/img/dropdown.png b/static/img/dropdown.png
new file mode 100644
index 0000000..fc8a86c
Binary files /dev/null and b/static/img/dropdown.png differ
diff --git a/static/img/gi_welcome_1_698x390_FitToBoxSmallDimension_Center.webp b/static/img/gi_welcome_1_698x390_FitToBoxSmallDimension_Center.webp
new file mode 100644
index 0000000..f161038
Binary files /dev/null and b/static/img/gi_welcome_1_698x390_FitToBoxSmallDimension_Center.webp differ
diff --git a/static/img/home1.jpg b/static/img/home1.jpg
new file mode 100644
index 0000000..7637bc8
Binary files /dev/null and b/static/img/home1.jpg differ
diff --git a/static/img/home_slider.jpg b/static/img/home_slider.jpg
new file mode 100644
index 0000000..504bb5b
Binary files /dev/null and b/static/img/home_slider.jpg differ
diff --git a/static/img/house.jpg b/static/img/house.jpg
new file mode 100644
index 0000000..69622c7
Binary files /dev/null and b/static/img/house.jpg differ
diff --git a/static/img/icons/favicon.ico b/static/img/icons/favicon.ico
new file mode 100644
index 0000000..b2bff33
Binary files /dev/null and b/static/img/icons/favicon.ico differ
diff --git a/static/img/intro.png b/static/img/intro.png
new file mode 100644
index 0000000..de51fd9
Binary files /dev/null and b/static/img/intro.png differ
diff --git a/static/img/island_t.png b/static/img/island_t.png
new file mode 100644
index 0000000..ba4dd39
Binary files /dev/null and b/static/img/island_t.png differ
diff --git a/static/img/kayak.png b/static/img/kayak.png
new file mode 100644
index 0000000..f7142da
Binary files /dev/null and b/static/img/kayak.png differ
diff --git a/static/img/latest_4.jpg b/static/img/latest_4.jpg
new file mode 100644
index 0000000..ed9f84a
Binary files /dev/null and b/static/img/latest_4.jpg differ
diff --git a/static/img/listing_2.jpg b/static/img/listing_2.jpg
new file mode 100644
index 0000000..e2589ae
Binary files /dev/null and b/static/img/listing_2.jpg differ
diff --git a/static/img/listing_4.jpg b/static/img/listing_4.jpg
new file mode 100644
index 0000000..0cd3c16
Binary files /dev/null and b/static/img/listing_4.jpg differ
diff --git a/static/img/listing_5.jpg b/static/img/listing_5.jpg
new file mode 100644
index 0000000..e31fdb1
Binary files /dev/null and b/static/img/listing_5.jpg differ
diff --git a/static/img/listing_6.jpg b/static/img/listing_6.jpg
new file mode 100644
index 0000000..51d07e1
Binary files /dev/null and b/static/img/listing_6.jpg differ
diff --git a/static/img/listing_8.jpg b/static/img/listing_8.jpg
new file mode 100644
index 0000000..fb04a5f
Binary files /dev/null and b/static/img/listing_8.jpg differ
diff --git a/static/img/listing_9.jpg b/static/img/listing_9.jpg
new file mode 100644
index 0000000..3252a1a
Binary files /dev/null and b/static/img/listing_9.jpg differ
diff --git a/static/img/listing_hotel.jpg b/static/img/listing_hotel.jpg
new file mode 100644
index 0000000..904d83a
Binary files /dev/null and b/static/img/listing_hotel.jpg differ
diff --git a/static/img/listing_thumb_1.jpg b/static/img/listing_thumb_1.jpg
new file mode 100644
index 0000000..e04962e
Binary files /dev/null and b/static/img/listing_thumb_1.jpg differ
diff --git a/static/img/listing_thumb_2.jpg b/static/img/listing_thumb_2.jpg
new file mode 100644
index 0000000..b4c5ab4
Binary files /dev/null and b/static/img/listing_thumb_2.jpg differ
diff --git a/static/img/listing_thumb_3.jpg b/static/img/listing_thumb_3.jpg
new file mode 100644
index 0000000..914baba
Binary files /dev/null and b/static/img/listing_thumb_3.jpg differ
diff --git a/static/img/listing_thumb_4.jpg b/static/img/listing_thumb_4.jpg
new file mode 100644
index 0000000..12bd748
Binary files /dev/null and b/static/img/listing_thumb_4.jpg differ
diff --git a/static/img/listing_thumb_5.jpg b/static/img/listing_thumb_5.jpg
new file mode 100644
index 0000000..1bbe9ef
Binary files /dev/null and b/static/img/listing_thumb_5.jpg differ
diff --git a/static/img/listing_thumb_6.jpg b/static/img/listing_thumb_6.jpg
new file mode 100644
index 0000000..3359e51
Binary files /dev/null and b/static/img/listing_thumb_6.jpg differ
diff --git a/static/img/listing_thumb_7.jpg b/static/img/listing_thumb_7.jpg
new file mode 100644
index 0000000..8a6dda8
Binary files /dev/null and b/static/img/listing_thumb_7.jpg differ
diff --git a/static/img/logo.png b/static/img/logo.png
new file mode 100644
index 0000000..132f7d3
Binary files /dev/null and b/static/img/logo.png differ
diff --git a/static/img/message.svg b/static/img/message.svg
new file mode 100644
index 0000000..70b50b9
--- /dev/null
+++ b/static/img/message.svg
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/img/milestone_1.png b/static/img/milestone_1.png
new file mode 100644
index 0000000..32d400c
Binary files /dev/null and b/static/img/milestone_1.png differ
diff --git a/static/img/milestone_2.png b/static/img/milestone_2.png
new file mode 100644
index 0000000..80fbdb4
Binary files /dev/null and b/static/img/milestone_2.png differ
diff --git a/static/img/milestone_3.png b/static/img/milestone_3.png
new file mode 100644
index 0000000..553a6e7
Binary files /dev/null and b/static/img/milestone_3.png differ
diff --git a/static/img/milestone_4.png b/static/img/milestone_4.png
new file mode 100644
index 0000000..0ebf355
Binary files /dev/null and b/static/img/milestone_4.png differ
diff --git a/static/img/nav_next.svg b/static/img/nav_next.svg
new file mode 100644
index 0000000..4426476
--- /dev/null
+++ b/static/img/nav_next.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/static/img/nav_prev.svg b/static/img/nav_prev.svg
new file mode 100644
index 0000000..6fc9d5e
--- /dev/null
+++ b/static/img/nav_prev.svg
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/static/img/nav_rect.svg b/static/img/nav_rect.svg
new file mode 100644
index 0000000..282f1df
--- /dev/null
+++ b/static/img/nav_rect.svg
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/static/img/next.png b/static/img/next.png
new file mode 100644
index 0000000..4ea5d5e
Binary files /dev/null and b/static/img/next.png differ
diff --git a/static/img/offer_6.jpg b/static/img/offer_6.jpg
new file mode 100644
index 0000000..3b1d081
Binary files /dev/null and b/static/img/offer_6.jpg differ
diff --git a/static/img/offer_8.jpg b/static/img/offer_8.jpg
new file mode 100644
index 0000000..8d29d91
Binary files /dev/null and b/static/img/offer_8.jpg differ
diff --git a/static/img/phone-call.svg b/static/img/phone-call.svg
new file mode 100644
index 0000000..7ab8b15
--- /dev/null
+++ b/static/img/phone-call.svg
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/img/placeholder.svg b/static/img/placeholder.svg
new file mode 100644
index 0000000..eab37a9
--- /dev/null
+++ b/static/img/placeholder.svg
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/img/planet-earth.svg b/static/img/planet-earth.svg
new file mode 100644
index 0000000..7a1cd6e
--- /dev/null
+++ b/static/img/planet-earth.svg
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/static/img/post.png b/static/img/post.png
new file mode 100644
index 0000000..bc63295
Binary files /dev/null and b/static/img/post.png differ
diff --git a/static/img/prev.png b/static/img/prev.png
new file mode 100644
index 0000000..24017d2
Binary files /dev/null and b/static/img/prev.png differ
diff --git a/static/img/room_1.jpg b/static/img/room_1.jpg
new file mode 100644
index 0000000..9683918
Binary files /dev/null and b/static/img/room_1.jpg differ
diff --git a/static/img/room_2.jpg b/static/img/room_2.jpg
new file mode 100644
index 0000000..b9d25c7
Binary files /dev/null and b/static/img/room_2.jpg differ
diff --git a/static/img/sailboat.png b/static/img/sailboat.png
new file mode 100644
index 0000000..220108f
Binary files /dev/null and b/static/img/sailboat.png differ
diff --git a/static/img/search.png b/static/img/search.png
new file mode 100644
index 0000000..e257c02
Binary files /dev/null and b/static/img/search.png differ
diff --git a/static/img/search.svg b/static/img/search.svg
new file mode 100644
index 0000000..d3bc335
--- /dev/null
+++ b/static/img/search.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/static/img/trend_2.png b/static/img/trend_2.png
new file mode 100644
index 0000000..c8f6836
Binary files /dev/null and b/static/img/trend_2.png differ
diff --git a/static/img/trend_4.png b/static/img/trend_4.png
new file mode 100644
index 0000000..7b93d0d
Binary files /dev/null and b/static/img/trend_4.png differ
diff --git a/static/img/trend_5.png b/static/img/trend_5.png
new file mode 100644
index 0000000..2524b63
Binary files /dev/null and b/static/img/trend_5.png differ
diff --git a/static/img/trend_8.png b/static/img/trend_8.png
new file mode 100644
index 0000000..240d9f1
Binary files /dev/null and b/static/img/trend_8.png differ
diff --git a/static/js/popper.js b/static/js/popper.js
new file mode 100644
index 0000000..de6619d
--- /dev/null
+++ b/static/js/popper.js
@@ -0,0 +1,2448 @@
+/**!
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
+ * @version 1.12.5
+ * @license
+ * Copyright (c) 2016 Federico Zivolo and contributors
+ *
+ * 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 (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global.Popper = factory());
+}(this, (function () { 'use strict';
+
+var nativeHints = ['native code', '[object MutationObserverConstructor]'];
+
+/**
+ * Determine if a function is implemented natively (as opposed to a polyfill).
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Function | undefined} fn the function to check
+ * @returns {Boolean}
+ */
+var isNative = (function (fn) {
+ return nativeHints.some(function (hint) {
+ return (fn || '').toString().indexOf(hint) > -1;
+ });
+});
+
+var isBrowser = typeof window !== 'undefined';
+var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];
+var timeoutDuration = 0;
+for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {
+ if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {
+ timeoutDuration = 1;
+ break;
+ }
+}
+
+function microtaskDebounce(fn) {
+ var scheduled = false;
+ var i = 0;
+ var elem = document.createElement('span');
+
+ // MutationObserver provides a mechanism for scheduling microtasks, which
+ // are scheduled *before* the next task. This gives us a way to debounce
+ // a function but ensure it's called *before* the next paint.
+ var observer = new MutationObserver(function () {
+ fn();
+ scheduled = false;
+ });
+
+ observer.observe(elem, { attributes: true });
+
+ return function () {
+ if (!scheduled) {
+ scheduled = true;
+ elem.setAttribute('x-index', i);
+ i = i + 1; // don't use compund (+=) because it doesn't get optimized in V8
+ }
+ };
+}
+
+function taskDebounce(fn) {
+ var scheduled = false;
+ return function () {
+ if (!scheduled) {
+ scheduled = true;
+ setTimeout(function () {
+ scheduled = false;
+ fn();
+ }, timeoutDuration);
+ }
+ };
+}
+
+// It's common for MutationObserver polyfills to be seen in the wild, however
+// these rely on Mutation Events which only occur when an element is connected
+// to the DOM. The algorithm used in this module does not use a connected element,
+// and so we must ensure that a *native* MutationObserver is available.
+var supportsNativeMutationObserver = isBrowser && isNative(window.MutationObserver);
+
+/**
+* Create a debounced version of a method, that's asynchronously deferred
+* but called in the minimum time possible.
+*
+* @method
+* @memberof Popper.Utils
+* @argument {Function} fn
+* @returns {Function}
+*/
+var debounce = supportsNativeMutationObserver ? microtaskDebounce : taskDebounce;
+
+/**
+ * Check if the given variable is a function
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Any} functionToCheck - variable to check
+ * @returns {Boolean} answer to: is a function?
+ */
+function isFunction(functionToCheck) {
+ var getType = {};
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
+}
+
+/**
+ * Get CSS computed property of the given element
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Eement} element
+ * @argument {String} property
+ */
+function getStyleComputedProperty(element, property) {
+ if (element.nodeType !== 1) {
+ return [];
+ }
+ // NOTE: 1 DOM access here
+ var css = window.getComputedStyle(element, null);
+ return property ? css[property] : css;
+}
+
+/**
+ * Returns the parentNode or the host of the element
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @returns {Element} parent
+ */
+function getParentNode(element) {
+ if (element.nodeName === 'HTML') {
+ return element;
+ }
+ return element.parentNode || element.host;
+}
+
+/**
+ * Returns the scrolling parent of the given element
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @returns {Element} scroll parent
+ */
+function getScrollParent(element) {
+ // Return body, `getScroll` will take care to get the correct `scrollTop` from it
+ if (!element || ['HTML', 'BODY', '#document'].indexOf(element.nodeName) !== -1) {
+ return window.document.body;
+ }
+
+ // Firefox want us to check `-x` and `-y` variations as well
+
+ var _getStyleComputedProp = getStyleComputedProperty(element),
+ overflow = _getStyleComputedProp.overflow,
+ overflowX = _getStyleComputedProp.overflowX,
+ overflowY = _getStyleComputedProp.overflowY;
+
+ if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {
+ return element;
+ }
+
+ return getScrollParent(getParentNode(element));
+}
+
+/**
+ * Returns the offset parent of the given element
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @returns {Element} offset parent
+ */
+function getOffsetParent(element) {
+ // NOTE: 1 DOM access here
+ var offsetParent = element && element.offsetParent;
+ var nodeName = offsetParent && offsetParent.nodeName;
+
+ if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {
+ return window.document.documentElement;
+ }
+
+ // .offsetParent will return the closest TD or TABLE in case
+ // no offsetParent is present, I hate this job...
+ if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {
+ return getOffsetParent(offsetParent);
+ }
+
+ return offsetParent;
+}
+
+function isOffsetContainer(element) {
+ var nodeName = element.nodeName;
+
+ if (nodeName === 'BODY') {
+ return false;
+ }
+ return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;
+}
+
+/**
+ * Finds the root node (document, shadowDOM root) of the given element
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} node
+ * @returns {Element} root node
+ */
+function getRoot(node) {
+ if (node.parentNode !== null) {
+ return getRoot(node.parentNode);
+ }
+
+ return node;
+}
+
+/**
+ * Finds the offset parent common to the two provided nodes
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element1
+ * @argument {Element} element2
+ * @returns {Element} common offset parent
+ */
+function findCommonOffsetParent(element1, element2) {
+ // This check is needed to avoid errors in case one of the elements isn't defined for any reason
+ if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {
+ return window.document.documentElement;
+ }
+
+ // Here we make sure to give as "start" the element that comes first in the DOM
+ var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;
+ var start = order ? element1 : element2;
+ var end = order ? element2 : element1;
+
+ // Get common ancestor container
+ var range = document.createRange();
+ range.setStart(start, 0);
+ range.setEnd(end, 0);
+ var commonAncestorContainer = range.commonAncestorContainer;
+
+ // Both nodes are inside #document
+
+ if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {
+ if (isOffsetContainer(commonAncestorContainer)) {
+ return commonAncestorContainer;
+ }
+
+ return getOffsetParent(commonAncestorContainer);
+ }
+
+ // one of the nodes is inside shadowDOM, find which one
+ var element1root = getRoot(element1);
+ if (element1root.host) {
+ return findCommonOffsetParent(element1root.host, element2);
+ } else {
+ return findCommonOffsetParent(element1, getRoot(element2).host);
+ }
+}
+
+/**
+ * Gets the scroll value of the given element in the given side (top and left)
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @argument {String} side `top` or `left`
+ * @returns {number} amount of scrolled pixels
+ */
+function getScroll(element) {
+ var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';
+
+ var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';
+ var nodeName = element.nodeName;
+
+ if (nodeName === 'BODY' || nodeName === 'HTML') {
+ var html = window.document.documentElement;
+ var scrollingElement = window.document.scrollingElement || html;
+ return scrollingElement[upperSide];
+ }
+
+ return element[upperSide];
+}
+
+/*
+ * Sum or subtract the element scroll values (left and top) from a given rect object
+ * @method
+ * @memberof Popper.Utils
+ * @param {Object} rect - Rect object you want to change
+ * @param {HTMLElement} element - The element from the function reads the scroll values
+ * @param {Boolean} subtract - set to true if you want to subtract the scroll values
+ * @return {Object} rect - The modifier rect object
+ */
+function includeScroll(rect, element) {
+ var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
+ var modifier = subtract ? -1 : 1;
+ rect.top += scrollTop * modifier;
+ rect.bottom += scrollTop * modifier;
+ rect.left += scrollLeft * modifier;
+ rect.right += scrollLeft * modifier;
+ return rect;
+}
+
+/*
+ * Helper to detect borders of a given element
+ * @method
+ * @memberof Popper.Utils
+ * @param {CSSStyleDeclaration} styles
+ * Result of `getStyleComputedProperty` on the given element
+ * @param {String} axis - `x` or `y`
+ * @return {number} borders - The borders size of the given axis
+ */
+
+function getBordersSize(styles, axis) {
+ var sideA = axis === 'x' ? 'Left' : 'Top';
+ var sideB = sideA === 'Left' ? 'Right' : 'Bottom';
+
+ return +styles['border' + sideA + 'Width'].split('px')[0] + +styles['border' + sideB + 'Width'].split('px')[0];
+}
+
+/**
+ * Tells if you are running Internet Explorer 10
+ * @method
+ * @memberof Popper.Utils
+ * @returns {Boolean} isIE10
+ */
+var isIE10 = undefined;
+
+var isIE10$1 = function () {
+ if (isIE10 === undefined) {
+ isIE10 = navigator.appVersion.indexOf('MSIE 10') !== -1;
+ }
+ return isIE10;
+};
+
+function getSize(axis, body, html, computedStyle) {
+ return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE10$1() ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0);
+}
+
+function getWindowSizes() {
+ var body = window.document.body;
+ var html = window.document.documentElement;
+ var computedStyle = isIE10$1() && window.getComputedStyle(html);
+
+ return {
+ height: getSize('Height', body, html, computedStyle),
+ width: getSize('Width', body, html, computedStyle)
+ };
+}
+
+var classCallCheck = function (instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+};
+
+var createClass = function () {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+
+ return function (Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+}();
+
+
+
+
+
+var defineProperty = function (obj, key, value) {
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+};
+
+var _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+
+ return target;
+};
+
+/**
+ * Given element offsets, generate an output similar to getBoundingClientRect
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Object} offsets
+ * @returns {Object} ClientRect like output
+ */
+function getClientRect(offsets) {
+ return _extends({}, offsets, {
+ right: offsets.left + offsets.width,
+ bottom: offsets.top + offsets.height
+ });
+}
+
+/**
+ * Get bounding client rect of given element
+ * @method
+ * @memberof Popper.Utils
+ * @param {HTMLElement} element
+ * @return {Object} client rect
+ */
+function getBoundingClientRect(element) {
+ var rect = {};
+
+ // IE10 10 FIX: Please, don't ask, the element isn't
+ // considered in DOM in some circumstances...
+ // This isn't reproducible in IE10 compatibility mode of IE11
+ if (isIE10$1()) {
+ try {
+ rect = element.getBoundingClientRect();
+ var scrollTop = getScroll(element, 'top');
+ var scrollLeft = getScroll(element, 'left');
+ rect.top += scrollTop;
+ rect.left += scrollLeft;
+ rect.bottom += scrollTop;
+ rect.right += scrollLeft;
+ } catch (err) {}
+ } else {
+ rect = element.getBoundingClientRect();
+ }
+
+ var result = {
+ left: rect.left,
+ top: rect.top,
+ width: rect.right - rect.left,
+ height: rect.bottom - rect.top
+ };
+
+ // subtract scrollbar size from sizes
+ var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {};
+ var width = sizes.width || element.clientWidth || result.right - result.left;
+ var height = sizes.height || element.clientHeight || result.bottom - result.top;
+
+ var horizScrollbar = element.offsetWidth - width;
+ var vertScrollbar = element.offsetHeight - height;
+
+ // if an hypothetical scrollbar is detected, we must be sure it's not a `border`
+ // we make this check conditional for performance reasons
+ if (horizScrollbar || vertScrollbar) {
+ var styles = getStyleComputedProperty(element);
+ horizScrollbar -= getBordersSize(styles, 'x');
+ vertScrollbar -= getBordersSize(styles, 'y');
+
+ result.width -= horizScrollbar;
+ result.height -= vertScrollbar;
+ }
+
+ return getClientRect(result);
+}
+
+function getOffsetRectRelativeToArbitraryNode(children, parent) {
+ var isIE10 = isIE10$1();
+ var isHTML = parent.nodeName === 'HTML';
+ var childrenRect = getBoundingClientRect(children);
+ var parentRect = getBoundingClientRect(parent);
+ var scrollParent = getScrollParent(children);
+
+ var styles = getStyleComputedProperty(parent);
+ var borderTopWidth = +styles.borderTopWidth.split('px')[0];
+ var borderLeftWidth = +styles.borderLeftWidth.split('px')[0];
+
+ var offsets = getClientRect({
+ top: childrenRect.top - parentRect.top - borderTopWidth,
+ left: childrenRect.left - parentRect.left - borderLeftWidth,
+ width: childrenRect.width,
+ height: childrenRect.height
+ });
+ offsets.marginTop = 0;
+ offsets.marginLeft = 0;
+
+ // Subtract margins of documentElement in case it's being used as parent
+ // we do this only on HTML because it's the only element that behaves
+ // differently when margins are applied to it. The margins are included in
+ // the box of the documentElement, in the other cases not.
+ if (!isIE10 && isHTML) {
+ var marginTop = +styles.marginTop.split('px')[0];
+ var marginLeft = +styles.marginLeft.split('px')[0];
+
+ offsets.top -= borderTopWidth - marginTop;
+ offsets.bottom -= borderTopWidth - marginTop;
+ offsets.left -= borderLeftWidth - marginLeft;
+ offsets.right -= borderLeftWidth - marginLeft;
+
+ // Attach marginTop and marginLeft because in some circumstances we may need them
+ offsets.marginTop = marginTop;
+ offsets.marginLeft = marginLeft;
+ }
+
+ if (isIE10 ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {
+ offsets = includeScroll(offsets, parent);
+ }
+
+ return offsets;
+}
+
+function getViewportOffsetRectRelativeToArtbitraryNode(element) {
+ var html = window.document.documentElement;
+ var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);
+ var width = Math.max(html.clientWidth, window.innerWidth || 0);
+ var height = Math.max(html.clientHeight, window.innerHeight || 0);
+
+ var scrollTop = getScroll(html);
+ var scrollLeft = getScroll(html, 'left');
+
+ var offset = {
+ top: scrollTop - relativeOffset.top + relativeOffset.marginTop,
+ left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,
+ width: width,
+ height: height
+ };
+
+ return getClientRect(offset);
+}
+
+/**
+ * Check if the given element is fixed or is inside a fixed parent
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @argument {Element} customContainer
+ * @returns {Boolean} answer to "isFixed?"
+ */
+function isFixed(element) {
+ var nodeName = element.nodeName;
+ if (nodeName === 'BODY' || nodeName === 'HTML') {
+ return false;
+ }
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
+ return true;
+ }
+ return isFixed(getParentNode(element));
+}
+
+/**
+ * Computed the boundaries limits and return them
+ * @method
+ * @memberof Popper.Utils
+ * @param {HTMLElement} popper
+ * @param {HTMLElement} reference
+ * @param {number} padding
+ * @param {HTMLElement} boundariesElement - Element used to define the boundaries
+ * @returns {Object} Coordinates of the boundaries
+ */
+function getBoundaries(popper, reference, padding, boundariesElement) {
+ // NOTE: 1 DOM access here
+ var boundaries = { top: 0, left: 0 };
+ var offsetParent = findCommonOffsetParent(popper, reference);
+
+ // Handle viewport case
+ if (boundariesElement === 'viewport') {
+ boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent);
+ } else {
+ // Handle other cases based on DOM element used as boundaries
+ var boundariesNode = void 0;
+ if (boundariesElement === 'scrollParent') {
+ boundariesNode = getScrollParent(getParentNode(popper));
+ if (boundariesNode.nodeName === 'BODY') {
+ boundariesNode = window.document.documentElement;
+ }
+ } else if (boundariesElement === 'window') {
+ boundariesNode = window.document.documentElement;
+ } else {
+ boundariesNode = boundariesElement;
+ }
+
+ var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent);
+
+ // In case of HTML, we need a different computation
+ if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {
+ var _getWindowSizes = getWindowSizes(),
+ height = _getWindowSizes.height,
+ width = _getWindowSizes.width;
+
+ boundaries.top += offsets.top - offsets.marginTop;
+ boundaries.bottom = height + offsets.top;
+ boundaries.left += offsets.left - offsets.marginLeft;
+ boundaries.right = width + offsets.left;
+ } else {
+ // for all the other DOM elements, this one is good
+ boundaries = offsets;
+ }
+ }
+
+ // Add paddings
+ boundaries.left += padding;
+ boundaries.top += padding;
+ boundaries.right -= padding;
+ boundaries.bottom -= padding;
+
+ return boundaries;
+}
+
+function getArea(_ref) {
+ var width = _ref.width,
+ height = _ref.height;
+
+ return width * height;
+}
+
+/**
+ * Utility used to transform the `auto` placement to the placement with more
+ * available space.
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {
+ var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;
+
+ if (placement.indexOf('auto') === -1) {
+ return placement;
+ }
+
+ var boundaries = getBoundaries(popper, reference, padding, boundariesElement);
+
+ var rects = {
+ top: {
+ width: boundaries.width,
+ height: refRect.top - boundaries.top
+ },
+ right: {
+ width: boundaries.right - refRect.right,
+ height: boundaries.height
+ },
+ bottom: {
+ width: boundaries.width,
+ height: boundaries.bottom - refRect.bottom
+ },
+ left: {
+ width: refRect.left - boundaries.left,
+ height: boundaries.height
+ }
+ };
+
+ var sortedAreas = Object.keys(rects).map(function (key) {
+ return _extends({
+ key: key
+ }, rects[key], {
+ area: getArea(rects[key])
+ });
+ }).sort(function (a, b) {
+ return b.area - a.area;
+ });
+
+ var filteredAreas = sortedAreas.filter(function (_ref2) {
+ var width = _ref2.width,
+ height = _ref2.height;
+ return width >= popper.clientWidth && height >= popper.clientHeight;
+ });
+
+ var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;
+
+ var variation = placement.split('-')[1];
+
+ return computedPlacement + (variation ? '-' + variation : '');
+}
+
+/**
+ * Get offsets to the reference element
+ * @method
+ * @memberof Popper.Utils
+ * @param {Object} state
+ * @param {Element} popper - the popper element
+ * @param {Element} reference - the reference element (the popper will be relative to this)
+ * @returns {Object} An object containing the offsets which will be applied to the popper
+ */
+function getReferenceOffsets(state, popper, reference) {
+ var commonOffsetParent = findCommonOffsetParent(popper, reference);
+ return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent);
+}
+
+/**
+ * Get the outer sizes of the given element (offset size + margins)
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element
+ * @returns {Object} object containing width and height properties
+ */
+function getOuterSizes(element) {
+ var styles = window.getComputedStyle(element);
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
+ var result = {
+ width: element.offsetWidth + y,
+ height: element.offsetHeight + x
+ };
+ return result;
+}
+
+/**
+ * Get the opposite placement of the given one
+ * @method
+ * @memberof Popper.Utils
+ * @argument {String} placement
+ * @returns {String} flipped placement
+ */
+function getOppositePlacement(placement) {
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
+ return hash[matched];
+ });
+}
+
+/**
+ * Get offsets to the popper
+ * @method
+ * @memberof Popper.Utils
+ * @param {Object} position - CSS position the Popper will get applied
+ * @param {HTMLElement} popper - the popper element
+ * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)
+ * @param {String} placement - one of the valid placement options
+ * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper
+ */
+function getPopperOffsets(popper, referenceOffsets, placement) {
+ placement = placement.split('-')[0];
+
+ // Get popper node sizes
+ var popperRect = getOuterSizes(popper);
+
+ // Add position, width and height to our offsets object
+ var popperOffsets = {
+ width: popperRect.width,
+ height: popperRect.height
+ };
+
+ // depending by the popper placement we have to compute its offsets slightly differently
+ var isHoriz = ['right', 'left'].indexOf(placement) !== -1;
+ var mainSide = isHoriz ? 'top' : 'left';
+ var secondarySide = isHoriz ? 'left' : 'top';
+ var measurement = isHoriz ? 'height' : 'width';
+ var secondaryMeasurement = !isHoriz ? 'height' : 'width';
+
+ popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;
+ if (placement === secondarySide) {
+ popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];
+ } else {
+ popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];
+ }
+
+ return popperOffsets;
+}
+
+/**
+ * Mimics the `find` method of Array
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Array} arr
+ * @argument prop
+ * @argument value
+ * @returns index or -1
+ */
+function find(arr, check) {
+ // use native find if supported
+ if (Array.prototype.find) {
+ return arr.find(check);
+ }
+
+ // use `filter` to obtain the same behavior of `find`
+ return arr.filter(check)[0];
+}
+
+/**
+ * Return the index of the matching object
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Array} arr
+ * @argument prop
+ * @argument value
+ * @returns index or -1
+ */
+function findIndex(arr, prop, value) {
+ // use native findIndex if supported
+ if (Array.prototype.findIndex) {
+ return arr.findIndex(function (cur) {
+ return cur[prop] === value;
+ });
+ }
+
+ // use `find` + `indexOf` if `findIndex` isn't supported
+ var match = find(arr, function (obj) {
+ return obj[prop] === value;
+ });
+ return arr.indexOf(match);
+}
+
+/**
+ * Loop trough the list of modifiers and run them in order,
+ * each of them will then edit the data object.
+ * @method
+ * @memberof Popper.Utils
+ * @param {dataObject} data
+ * @param {Array} modifiers
+ * @param {String} ends - Optional modifier name used as stopper
+ * @returns {dataObject}
+ */
+function runModifiers(modifiers, data, ends) {
+ var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));
+
+ modifiersToRun.forEach(function (modifier) {
+ if (modifier.function) {
+ console.warn('`modifier.function` is deprecated, use `modifier.fn`!');
+ }
+ var fn = modifier.function || modifier.fn;
+ if (modifier.enabled && isFunction(fn)) {
+ // Add properties to offsets to make them a complete clientRect object
+ // we do this before each modifier to make sure the previous one doesn't
+ // mess with these values
+ data.offsets.popper = getClientRect(data.offsets.popper);
+ data.offsets.reference = getClientRect(data.offsets.reference);
+
+ data = fn(data, modifier);
+ }
+ });
+
+ return data;
+}
+
+/**
+ * Updates the position of the popper, computing the new offsets and applying
+ * the new style.
+ * Prefer `scheduleUpdate` over `update` because of performance reasons.
+ * @method
+ * @memberof Popper
+ */
+function update() {
+ // if popper is destroyed, don't perform any further update
+ if (this.state.isDestroyed) {
+ return;
+ }
+
+ var data = {
+ instance: this,
+ styles: {},
+ arrowStyles: {},
+ attributes: {},
+ flipped: false,
+ offsets: {}
+ };
+
+ // compute reference element offsets
+ data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference);
+
+ // compute auto placement, store placement inside the data object,
+ // modifiers will be able to edit `placement` if needed
+ // and refer to originalPlacement to know the original value
+ data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);
+
+ // store the computed placement inside `originalPlacement`
+ data.originalPlacement = data.placement;
+
+ // compute the popper offsets
+ data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);
+ data.offsets.popper.position = 'absolute';
+
+ // run the modifiers
+ data = runModifiers(this.modifiers, data);
+
+ // the first `update` will call `onCreate` callback
+ // the other ones will call `onUpdate` callback
+ if (!this.state.isCreated) {
+ this.state.isCreated = true;
+ this.options.onCreate(data);
+ } else {
+ this.options.onUpdate(data);
+ }
+}
+
+/**
+ * Helper used to know if the given modifier is enabled.
+ * @method
+ * @memberof Popper.Utils
+ * @returns {Boolean}
+ */
+function isModifierEnabled(modifiers, modifierName) {
+ return modifiers.some(function (_ref) {
+ var name = _ref.name,
+ enabled = _ref.enabled;
+ return enabled && name === modifierName;
+ });
+}
+
+/**
+ * Get the prefixed supported property name
+ * @method
+ * @memberof Popper.Utils
+ * @argument {String} property (camelCase)
+ * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)
+ */
+function getSupportedPropertyName(property) {
+ var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];
+ var upperProp = property.charAt(0).toUpperCase() + property.slice(1);
+
+ for (var i = 0; i < prefixes.length - 1; i++) {
+ var prefix = prefixes[i];
+ var toCheck = prefix ? '' + prefix + upperProp : property;
+ if (typeof window.document.body.style[toCheck] !== 'undefined') {
+ return toCheck;
+ }
+ }
+ return null;
+}
+
+/**
+ * Destroy the popper
+ * @method
+ * @memberof Popper
+ */
+function destroy() {
+ this.state.isDestroyed = true;
+
+ // touch DOM only if `applyStyle` modifier is enabled
+ if (isModifierEnabled(this.modifiers, 'applyStyle')) {
+ this.popper.removeAttribute('x-placement');
+ this.popper.style.left = '';
+ this.popper.style.position = '';
+ this.popper.style.top = '';
+ this.popper.style[getSupportedPropertyName('transform')] = '';
+ }
+
+ this.disableEventListeners();
+
+ // remove the popper if user explicity asked for the deletion on destroy
+ // do not use `remove` because IE11 doesn't support it
+ if (this.options.removeOnDestroy) {
+ this.popper.parentNode.removeChild(this.popper);
+ }
+ return this;
+}
+
+function attachToScrollParents(scrollParent, event, callback, scrollParents) {
+ var isBody = scrollParent.nodeName === 'BODY';
+ var target = isBody ? window : scrollParent;
+ target.addEventListener(event, callback, { passive: true });
+
+ if (!isBody) {
+ attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);
+ }
+ scrollParents.push(target);
+}
+
+/**
+ * Setup needed event listeners used to update the popper position
+ * @method
+ * @memberof Popper.Utils
+ * @private
+ */
+function setupEventListeners(reference, options, state, updateBound) {
+ // Resize event listener on window
+ state.updateBound = updateBound;
+ window.addEventListener('resize', state.updateBound, { passive: true });
+
+ // Scroll event listener on scroll parents
+ var scrollElement = getScrollParent(reference);
+ attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);
+ state.scrollElement = scrollElement;
+ state.eventsEnabled = true;
+
+ return state;
+}
+
+/**
+ * It will add resize/scroll events and start recalculating
+ * position of the popper element when they are triggered.
+ * @method
+ * @memberof Popper
+ */
+function enableEventListeners() {
+ if (!this.state.eventsEnabled) {
+ this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);
+ }
+}
+
+/**
+ * Remove event listeners used to update the popper position
+ * @method
+ * @memberof Popper.Utils
+ * @private
+ */
+function removeEventListeners(reference, state) {
+ // Remove resize event listener on window
+ window.removeEventListener('resize', state.updateBound);
+
+ // Remove scroll event listener on scroll parents
+ state.scrollParents.forEach(function (target) {
+ target.removeEventListener('scroll', state.updateBound);
+ });
+
+ // Reset state
+ state.updateBound = null;
+ state.scrollParents = [];
+ state.scrollElement = null;
+ state.eventsEnabled = false;
+ return state;
+}
+
+/**
+ * It will remove resize/scroll events and won't recalculate popper position
+ * when they are triggered. It also won't trigger onUpdate callback anymore,
+ * unless you call `update` method manually.
+ * @method
+ * @memberof Popper
+ */
+function disableEventListeners() {
+ if (this.state.eventsEnabled) {
+ window.cancelAnimationFrame(this.scheduleUpdate);
+ this.state = removeEventListeners(this.reference, this.state);
+ }
+}
+
+/**
+ * Tells if a given input is a number
+ * @method
+ * @memberof Popper.Utils
+ * @param {*} input to check
+ * @return {Boolean}
+ */
+function isNumeric(n) {
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
+}
+
+/**
+ * Set the style to the given popper
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element - Element to apply the style to
+ * @argument {Object} styles
+ * Object with a list of properties and values which will be applied to the element
+ */
+function setStyles(element, styles) {
+ Object.keys(styles).forEach(function (prop) {
+ var unit = '';
+ // add unit if the value is numeric and is one of the following
+ if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
+ unit = 'px';
+ }
+ element.style[prop] = styles[prop] + unit;
+ });
+}
+
+/**
+ * Set the attributes to the given popper
+ * @method
+ * @memberof Popper.Utils
+ * @argument {Element} element - Element to apply the attributes to
+ * @argument {Object} styles
+ * Object with a list of properties and values which will be applied to the element
+ */
+function setAttributes(element, attributes) {
+ Object.keys(attributes).forEach(function (prop) {
+ var value = attributes[prop];
+ if (value !== false) {
+ element.setAttribute(prop, attributes[prop]);
+ } else {
+ element.removeAttribute(prop);
+ }
+ });
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by `update` method
+ * @argument {Object} data.styles - List of style properties - values to apply to popper element
+ * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The same data object
+ */
+function applyStyle(data) {
+ // any property present in `data.styles` will be applied to the popper,
+ // in this way we can make the 3rd party modifiers add custom styles to it
+ // Be aware, modifiers could override the properties defined in the previous
+ // lines of this modifier!
+ setStyles(data.instance.popper, data.styles);
+
+ // any property present in `data.attributes` will be applied to the popper,
+ // they will be set as HTML attributes of the element
+ setAttributes(data.instance.popper, data.attributes);
+
+ // if arrowElement is defined and arrowStyles has some properties
+ if (data.arrowElement && Object.keys(data.arrowStyles).length) {
+ setStyles(data.arrowElement, data.arrowStyles);
+ }
+
+ return data;
+}
+
+/**
+ * Set the x-placement attribute before everything else because it could be used
+ * to add margins to the popper margins needs to be calculated to get the
+ * correct popper offsets.
+ * @method
+ * @memberof Popper.modifiers
+ * @param {HTMLElement} reference - The reference element used to position the popper
+ * @param {HTMLElement} popper - The HTML element used as popper.
+ * @param {Object} options - Popper.js options
+ */
+function applyStyleOnLoad(reference, popper, options, modifierOptions, state) {
+ // compute reference element offsets
+ var referenceOffsets = getReferenceOffsets(state, popper, reference);
+
+ // compute auto placement, store placement inside the data object,
+ // modifiers will be able to edit `placement` if needed
+ // and refer to originalPlacement to know the original value
+ var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);
+
+ popper.setAttribute('x-placement', placement);
+
+ // Apply `position` to popper before anything else because
+ // without the position applied we can't guarantee correct computations
+ setStyles(popper, { position: 'absolute' });
+
+ return options;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by `update` method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function computeStyle(data, options) {
+ var x = options.x,
+ y = options.y;
+ var popper = data.offsets.popper;
+
+ // Remove this legacy support in Popper.js v2
+
+ var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
+ return modifier.name === 'applyStyle';
+ }).gpuAcceleration;
+ if (legacyGpuAccelerationOption !== undefined) {
+ console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');
+ }
+ var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;
+
+ var offsetParent = getOffsetParent(data.instance.popper);
+ var offsetParentRect = getBoundingClientRect(offsetParent);
+
+ // Styles
+ var styles = {
+ position: popper.position
+ };
+
+ // floor sides to avoid blurry text
+ var offsets = {
+ left: Math.floor(popper.left),
+ top: Math.floor(popper.top),
+ bottom: Math.floor(popper.bottom),
+ right: Math.floor(popper.right)
+ };
+
+ var sideA = x === 'bottom' ? 'top' : 'bottom';
+ var sideB = y === 'right' ? 'left' : 'right';
+
+ // if gpuAcceleration is set to `true` and transform is supported,
+ // we use `translate3d` to apply the position to the popper we
+ // automatically use the supported prefixed version if needed
+ var prefixedProperty = getSupportedPropertyName('transform');
+
+ // now, let's make a step back and look at this code closely (wtf?)
+ // If the content of the popper grows once it's been positioned, it
+ // may happen that the popper gets misplaced because of the new content
+ // overflowing its reference element
+ // To avoid this problem, we provide two options (x and y), which allow
+ // the consumer to define the offset origin.
+ // If we position a popper on top of a reference element, we can set
+ // `x` to `top` to make the popper grow towards its top instead of
+ // its bottom.
+ var left = void 0,
+ top = void 0;
+ if (sideA === 'bottom') {
+ top = -offsetParentRect.height + offsets.bottom;
+ } else {
+ top = offsets.top;
+ }
+ if (sideB === 'right') {
+ left = -offsetParentRect.width + offsets.right;
+ } else {
+ left = offsets.left;
+ }
+ if (gpuAcceleration && prefixedProperty) {
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
+ styles[sideA] = 0;
+ styles[sideB] = 0;
+ styles.willChange = 'transform';
+ } else {
+ // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties
+ var invertTop = sideA === 'bottom' ? -1 : 1;
+ var invertLeft = sideB === 'right' ? -1 : 1;
+ styles[sideA] = top * invertTop;
+ styles[sideB] = left * invertLeft;
+ styles.willChange = sideA + ', ' + sideB;
+ }
+
+ // Attributes
+ var attributes = {
+ 'x-placement': data.placement
+ };
+
+ // Update `data` attributes, styles and arrowStyles
+ data.attributes = _extends({}, attributes, data.attributes);
+ data.styles = _extends({}, styles, data.styles);
+ data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);
+
+ return data;
+}
+
+/**
+ * Helper used to know if the given modifier depends from another one.
+ * It checks if the needed modifier is listed and enabled.
+ * @method
+ * @memberof Popper.Utils
+ * @param {Array} modifiers - list of modifiers
+ * @param {String} requestingName - name of requesting modifier
+ * @param {String} requestedName - name of requested modifier
+ * @returns {Boolean}
+ */
+function isModifierRequired(modifiers, requestingName, requestedName) {
+ var requesting = find(modifiers, function (_ref) {
+ var name = _ref.name;
+ return name === requestingName;
+ });
+
+ var isRequired = !!requesting && modifiers.some(function (modifier) {
+ return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;
+ });
+
+ if (!isRequired) {
+ var _requesting = '`' + requestingName + '`';
+ var requested = '`' + requestedName + '`';
+ console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');
+ }
+ return isRequired;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function arrow(data, options) {
+ // arrow depends on keepTogether in order to work
+ if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {
+ return data;
+ }
+
+ var arrowElement = options.element;
+
+ // if arrowElement is a string, suppose it's a CSS selector
+ if (typeof arrowElement === 'string') {
+ arrowElement = data.instance.popper.querySelector(arrowElement);
+
+ // if arrowElement is not found, don't run the modifier
+ if (!arrowElement) {
+ return data;
+ }
+ } else {
+ // if the arrowElement isn't a query selector we must check that the
+ // provided DOM node is child of its popper node
+ if (!data.instance.popper.contains(arrowElement)) {
+ console.warn('WARNING: `arrow.element` must be child of its popper element!');
+ return data;
+ }
+ }
+
+ var placement = data.placement.split('-')[0];
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
+
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
+
+ var len = isVertical ? 'height' : 'width';
+ var sideCapitalized = isVertical ? 'Top' : 'Left';
+ var side = sideCapitalized.toLowerCase();
+ var altSide = isVertical ? 'left' : 'top';
+ var opSide = isVertical ? 'bottom' : 'right';
+ var arrowElementSize = getOuterSizes(arrowElement)[len];
+
+ //
+ // extends keepTogether behavior making sure the popper and its
+ // reference have enough pixels in conjuction
+ //
+
+ // top/left side
+ if (reference[opSide] - arrowElementSize < popper[side]) {
+ data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);
+ }
+ // bottom/right side
+ if (reference[side] + arrowElementSize > popper[opSide]) {
+ data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];
+ }
+
+ // compute center of the popper
+ var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;
+
+ // Compute the sideValue using the updated popper offsets
+ // take popper margin in account because we don't have this info available
+ var popperMarginSide = getStyleComputedProperty(data.instance.popper, 'margin' + sideCapitalized).replace('px', '');
+ var sideValue = center - getClientRect(data.offsets.popper)[side] - popperMarginSide;
+
+ // prevent arrowElement from being placed not contiguously to its popper
+ sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);
+
+ data.arrowElement = arrowElement;
+ data.offsets.arrow = {};
+ data.offsets.arrow[side] = Math.round(sideValue);
+ data.offsets.arrow[altSide] = ''; // make sure to unset any eventual altSide value from the DOM node
+
+ return data;
+}
+
+/**
+ * Get the opposite placement variation of the given one
+ * @method
+ * @memberof Popper.Utils
+ * @argument {String} placement variation
+ * @returns {String} flipped placement variation
+ */
+function getOppositeVariation(variation) {
+ if (variation === 'end') {
+ return 'start';
+ } else if (variation === 'start') {
+ return 'end';
+ }
+ return variation;
+}
+
+/**
+ * List of accepted placements to use as values of the `placement` option.
+ * Valid placements are:
+ * - `auto`
+ * - `top`
+ * - `right`
+ * - `bottom`
+ * - `left`
+ *
+ * Each placement can have a variation from this list:
+ * - `-start`
+ * - `-end`
+ *
+ * Variations are interpreted easily if you think of them as the left to right
+ * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`
+ * is right.
+ * Vertically (`left` and `right`), `start` is top and `end` is bottom.
+ *
+ * Some valid examples are:
+ * - `top-end` (on top of reference, right aligned)
+ * - `right-start` (on right of reference, top aligned)
+ * - `bottom` (on bottom, centered)
+ * - `auto-right` (on the side with more space available, alignment depends by placement)
+ *
+ * @static
+ * @type {Array}
+ * @enum {String}
+ * @readonly
+ * @method placements
+ * @memberof Popper
+ */
+var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];
+
+// Get rid of `auto` `auto-start` and `auto-end`
+var validPlacements = placements.slice(3);
+
+/**
+ * Given an initial placement, returns all the subsequent placements
+ * clockwise (or counter-clockwise).
+ *
+ * @method
+ * @memberof Popper.Utils
+ * @argument {String} placement - A valid placement (it accepts variations)
+ * @argument {Boolean} counter - Set to true to walk the placements counterclockwise
+ * @returns {Array} placements including their variations
+ */
+function clockwise(placement) {
+ var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+
+ var index = validPlacements.indexOf(placement);
+ var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));
+ return counter ? arr.reverse() : arr;
+}
+
+var BEHAVIORS = {
+ FLIP: 'flip',
+ CLOCKWISE: 'clockwise',
+ COUNTERCLOCKWISE: 'counterclockwise'
+};
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function flip(data, options) {
+ // if `inner` modifier is enabled, we can't use the `flip` modifier
+ if (isModifierEnabled(data.instance.modifiers, 'inner')) {
+ return data;
+ }
+
+ if (data.flipped && data.placement === data.originalPlacement) {
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
+ return data;
+ }
+
+ var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement);
+
+ var placement = data.placement.split('-')[0];
+ var placementOpposite = getOppositePlacement(placement);
+ var variation = data.placement.split('-')[1] || '';
+
+ var flipOrder = [];
+
+ switch (options.behavior) {
+ case BEHAVIORS.FLIP:
+ flipOrder = [placement, placementOpposite];
+ break;
+ case BEHAVIORS.CLOCKWISE:
+ flipOrder = clockwise(placement);
+ break;
+ case BEHAVIORS.COUNTERCLOCKWISE:
+ flipOrder = clockwise(placement, true);
+ break;
+ default:
+ flipOrder = options.behavior;
+ }
+
+ flipOrder.forEach(function (step, index) {
+ if (placement !== step || flipOrder.length === index + 1) {
+ return data;
+ }
+
+ placement = data.placement.split('-')[0];
+ placementOpposite = getOppositePlacement(placement);
+
+ var popperOffsets = data.offsets.popper;
+ var refOffsets = data.offsets.reference;
+
+ // using floor because the reference offsets may contain decimals we are not going to consider here
+ var floor = Math.floor;
+ var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);
+
+ var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);
+ var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);
+ var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);
+ var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);
+
+ var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;
+
+ // flip the variation if required
+ var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
+ var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
+
+ if (overlapsRef || overflowsBoundaries || flippedVariation) {
+ // this boolean to detect any flip loop
+ data.flipped = true;
+
+ if (overlapsRef || overflowsBoundaries) {
+ placement = flipOrder[index + 1];
+ }
+
+ if (flippedVariation) {
+ variation = getOppositeVariation(variation);
+ }
+
+ data.placement = placement + (variation ? '-' + variation : '');
+
+ // this object contains `position`, we want to preserve it along with
+ // any additional property we may add in the future
+ data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));
+
+ data = runModifiers(data.instance.modifiers, data, 'flip');
+ }
+ });
+ return data;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function keepTogether(data) {
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
+
+ var placement = data.placement.split('-')[0];
+ var floor = Math.floor;
+ var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
+ var side = isVertical ? 'right' : 'bottom';
+ var opSide = isVertical ? 'left' : 'top';
+ var measurement = isVertical ? 'width' : 'height';
+
+ if (popper[side] < floor(reference[opSide])) {
+ data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];
+ }
+ if (popper[opSide] > floor(reference[side])) {
+ data.offsets.popper[opSide] = floor(reference[side]);
+ }
+
+ return data;
+}
+
+/**
+ * Converts a string containing value + unit into a px value number
+ * @function
+ * @memberof {modifiers~offset}
+ * @private
+ * @argument {String} str - Value + unit string
+ * @argument {String} measurement - `height` or `width`
+ * @argument {Object} popperOffsets
+ * @argument {Object} referenceOffsets
+ * @returns {Number|String}
+ * Value in pixels, or original string if no values were extracted
+ */
+function toValue(str, measurement, popperOffsets, referenceOffsets) {
+ // separate value from unit
+ var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/);
+ var value = +split[1];
+ var unit = split[2];
+
+ // If it's not a number it's an operator, I guess
+ if (!value) {
+ return str;
+ }
+
+ if (unit.indexOf('%') === 0) {
+ var element = void 0;
+ switch (unit) {
+ case '%p':
+ element = popperOffsets;
+ break;
+ case '%':
+ case '%r':
+ default:
+ element = referenceOffsets;
+ }
+
+ var rect = getClientRect(element);
+ return rect[measurement] / 100 * value;
+ } else if (unit === 'vh' || unit === 'vw') {
+ // if is a vh or vw, we calculate the size based on the viewport
+ var size = void 0;
+ if (unit === 'vh') {
+ size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
+ } else {
+ size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
+ }
+ return size / 100 * value;
+ } else {
+ // if is an explicit pixel unit, we get rid of the unit and keep the value
+ // if is an implicit unit, it's px, and we return just the value
+ return value;
+ }
+}
+
+/**
+ * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.
+ * @function
+ * @memberof {modifiers~offset}
+ * @private
+ * @argument {String} offset
+ * @argument {Object} popperOffsets
+ * @argument {Object} referenceOffsets
+ * @argument {String} basePlacement
+ * @returns {Array} a two cells array with x and y offsets in numbers
+ */
+function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {
+ var offsets = [0, 0];
+
+ // Use height if placement is left or right and index is 0 otherwise use width
+ // in this way the first offset will use an axis and the second one
+ // will use the other one
+ var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;
+
+ // Split the offset string to obtain a list of values and operands
+ // The regex addresses values with the plus or minus sign in front (+10, -20, etc)
+ var fragments = offset.split(/(\+|\-)/).map(function (frag) {
+ return frag.trim();
+ });
+
+ // Detect if the offset string contains a pair of values or a single one
+ // they could be separated by comma or space
+ var divider = fragments.indexOf(find(fragments, function (frag) {
+ return frag.search(/,|\s/) !== -1;
+ }));
+
+ if (fragments[divider] && fragments[divider].indexOf(',') === -1) {
+ console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');
+ }
+
+ // If divider is found, we divide the list of values and operands to divide
+ // them by ofset X and Y.
+ var splitRegex = /\s*,\s*|\s+/;
+ var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];
+
+ // Convert the values with units to absolute pixels to allow our computations
+ ops = ops.map(function (op, index) {
+ // Most of the units rely on the orientation of the popper
+ var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';
+ var mergeWithPrevious = false;
+ return op
+ // This aggregates any `+` or `-` sign that aren't considered operators
+ // e.g.: 10 + +5 => [10, +, +5]
+ .reduce(function (a, b) {
+ if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {
+ a[a.length - 1] = b;
+ mergeWithPrevious = true;
+ return a;
+ } else if (mergeWithPrevious) {
+ a[a.length - 1] += b;
+ mergeWithPrevious = false;
+ return a;
+ } else {
+ return a.concat(b);
+ }
+ }, [])
+ // Here we convert the string values into number values (in px)
+ .map(function (str) {
+ return toValue(str, measurement, popperOffsets, referenceOffsets);
+ });
+ });
+
+ // Loop trough the offsets arrays and execute the operations
+ ops.forEach(function (op, index) {
+ op.forEach(function (frag, index2) {
+ if (isNumeric(frag)) {
+ offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);
+ }
+ });
+ });
+ return offsets;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @argument {Number|String} options.offset=0
+ * The offset value as described in the modifier description
+ * @returns {Object} The data object, properly modified
+ */
+function offset(data, _ref) {
+ var offset = _ref.offset;
+ var placement = data.placement,
+ _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
+
+ var basePlacement = placement.split('-')[0];
+
+ var offsets = void 0;
+ if (isNumeric(+offset)) {
+ offsets = [+offset, 0];
+ } else {
+ offsets = parseOffset(offset, popper, reference, basePlacement);
+ }
+
+ if (basePlacement === 'left') {
+ popper.top += offsets[0];
+ popper.left -= offsets[1];
+ } else if (basePlacement === 'right') {
+ popper.top += offsets[0];
+ popper.left += offsets[1];
+ } else if (basePlacement === 'top') {
+ popper.left += offsets[0];
+ popper.top -= offsets[1];
+ } else if (basePlacement === 'bottom') {
+ popper.left += offsets[0];
+ popper.top += offsets[1];
+ }
+
+ data.popper = popper;
+ return data;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by `update` method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function preventOverflow(data, options) {
+ var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);
+
+ // If offsetParent is the reference element, we really want to
+ // go one step up and use the next offsetParent as reference to
+ // avoid to make this modifier completely useless and look like broken
+ if (data.instance.reference === boundariesElement) {
+ boundariesElement = getOffsetParent(boundariesElement);
+ }
+
+ var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement);
+ options.boundaries = boundaries;
+
+ var order = options.priority;
+ var popper = data.offsets.popper;
+
+ var check = {
+ primary: function primary(placement) {
+ var value = popper[placement];
+ if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {
+ value = Math.max(popper[placement], boundaries[placement]);
+ }
+ return defineProperty({}, placement, value);
+ },
+ secondary: function secondary(placement) {
+ var mainSide = placement === 'right' ? 'left' : 'top';
+ var value = popper[mainSide];
+ if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {
+ value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));
+ }
+ return defineProperty({}, mainSide, value);
+ }
+ };
+
+ order.forEach(function (placement) {
+ var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';
+ popper = _extends({}, popper, check[side](placement));
+ });
+
+ data.offsets.popper = popper;
+
+ return data;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by `update` method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function shift(data) {
+ var placement = data.placement;
+ var basePlacement = placement.split('-')[0];
+ var shiftvariation = placement.split('-')[1];
+
+ // if shift shiftvariation is specified, run the modifier
+ if (shiftvariation) {
+ var _data$offsets = data.offsets,
+ reference = _data$offsets.reference,
+ popper = _data$offsets.popper;
+
+ var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;
+ var side = isVertical ? 'left' : 'top';
+ var measurement = isVertical ? 'width' : 'height';
+
+ var shiftOffsets = {
+ start: defineProperty({}, side, reference[side]),
+ end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])
+ };
+
+ data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);
+ }
+
+ return data;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by update method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function hide(data) {
+ if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {
+ return data;
+ }
+
+ var refRect = data.offsets.reference;
+ var bound = find(data.instance.modifiers, function (modifier) {
+ return modifier.name === 'preventOverflow';
+ }).boundaries;
+
+ if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {
+ // Avoid unnecessary DOM access if visibility hasn't changed
+ if (data.hide === true) {
+ return data;
+ }
+
+ data.hide = true;
+ data.attributes['x-out-of-boundaries'] = '';
+ } else {
+ // Avoid unnecessary DOM access if visibility hasn't changed
+ if (data.hide === false) {
+ return data;
+ }
+
+ data.hide = false;
+ data.attributes['x-out-of-boundaries'] = false;
+ }
+
+ return data;
+}
+
+/**
+ * @function
+ * @memberof Modifiers
+ * @argument {Object} data - The data object generated by `update` method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {Object} The data object, properly modified
+ */
+function inner(data) {
+ var placement = data.placement;
+ var basePlacement = placement.split('-')[0];
+ var _data$offsets = data.offsets,
+ popper = _data$offsets.popper,
+ reference = _data$offsets.reference;
+
+ var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;
+
+ var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;
+
+ popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);
+
+ data.placement = getOppositePlacement(placement);
+ data.offsets.popper = getClientRect(popper);
+
+ return data;
+}
+
+/**
+ * Modifier function, each modifier can have a function of this type assigned
+ * to its `fn` property.
+ * These functions will be called on each update, this means that you must
+ * make sure they are performant enough to avoid performance bottlenecks.
+ *
+ * @function ModifierFn
+ * @argument {dataObject} data - The data object generated by `update` method
+ * @argument {Object} options - Modifiers configuration and options
+ * @returns {dataObject} The data object, properly modified
+ */
+
+/**
+ * Modifiers are plugins used to alter the behavior of your poppers.
+ * Popper.js uses a set of 9 modifiers to provide all the basic functionalities
+ * needed by the library.
+ *
+ * Usually you don't want to override the `order`, `fn` and `onLoad` props.
+ * All the other properties are configurations that could be tweaked.
+ * @namespace modifiers
+ */
+var modifiers = {
+ /**
+ * Modifier used to shift the popper on the start or end of its reference
+ * element.
+ * It will read the variation of the `placement` property.
+ * It can be one either `-end` or `-start`.
+ * @memberof modifiers
+ * @inner
+ */
+ shift: {
+ /** @prop {number} order=100 - Index used to define the order of execution */
+ order: 100,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: shift
+ },
+
+ /**
+ * The `offset` modifier can shift your popper on both its axis.
+ *
+ * It accepts the following units:
+ * - `px` or unitless, interpreted as pixels
+ * - `%` or `%r`, percentage relative to the length of the reference element
+ * - `%p`, percentage relative to the length of the popper element
+ * - `vw`, CSS viewport width unit
+ * - `vh`, CSS viewport height unit
+ *
+ * For length is intended the main axis relative to the placement of the popper.
+ * This means that if the placement is `top` or `bottom`, the length will be the
+ * `width`. In case of `left` or `right`, it will be the height.
+ *
+ * You can provide a single value (as `Number` or `String`), or a pair of values
+ * as `String` divided by a comma or one (or more) white spaces.
+ * The latter is a deprecated method because it leads to confusion and will be
+ * removed in v2.
+ * Additionally, it accepts additions and subtractions between different units.
+ * Note that multiplications and divisions aren't supported.
+ *
+ * Valid examples are:
+ * ```
+ * 10
+ * '10%'
+ * '10, 10'
+ * '10%, 10'
+ * '10 + 10%'
+ * '10 - 5vh + 3%'
+ * '-10px + 5vh, 5px - 6%'
+ * ```
+ * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap
+ * > with their reference element, unfortunately, you will have to disable the `flip` modifier.
+ * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373)
+ *
+ * @memberof modifiers
+ * @inner
+ */
+ offset: {
+ /** @prop {number} order=200 - Index used to define the order of execution */
+ order: 200,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: offset,
+ /** @prop {Number|String} offset=0
+ * The offset value as described in the modifier description
+ */
+ offset: 0
+ },
+
+ /**
+ * Modifier used to prevent the popper from being positioned outside the boundary.
+ *
+ * An scenario exists where the reference itself is not within the boundaries.
+ * We can say it has "escaped the boundaries" — or just "escaped".
+ * In this case we need to decide whether the popper should either:
+ *
+ * - detach from the reference and remain "trapped" in the boundaries, or
+ * - if it should ignore the boundary and "escape with its reference"
+ *
+ * When `escapeWithReference` is set to`true` and reference is completely
+ * outside its boundaries, the popper will overflow (or completely leave)
+ * the boundaries in order to remain attached to the edge of the reference.
+ *
+ * @memberof modifiers
+ * @inner
+ */
+ preventOverflow: {
+ /** @prop {number} order=300 - Index used to define the order of execution */
+ order: 300,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: preventOverflow,
+ /**
+ * @prop {Array} [priority=['left','right','top','bottom']]
+ * Popper will try to prevent overflow following these priorities by default,
+ * then, it could overflow on the left and on top of the `boundariesElement`
+ */
+ priority: ['left', 'right', 'top', 'bottom'],
+ /**
+ * @prop {number} padding=5
+ * Amount of pixel used to define a minimum distance between the boundaries
+ * and the popper this makes sure the popper has always a little padding
+ * between the edges of its container
+ */
+ padding: 5,
+ /**
+ * @prop {String|HTMLElement} boundariesElement='scrollParent'
+ * Boundaries used by the modifier, can be `scrollParent`, `window`,
+ * `viewport` or any DOM element.
+ */
+ boundariesElement: 'scrollParent'
+ },
+
+ /**
+ * Modifier used to make sure the reference and its popper stay near eachothers
+ * without leaving any gap between the two. Expecially useful when the arrow is
+ * enabled and you want to assure it to point to its reference element.
+ * It cares only about the first axis, you can still have poppers with margin
+ * between the popper and its reference element.
+ * @memberof modifiers
+ * @inner
+ */
+ keepTogether: {
+ /** @prop {number} order=400 - Index used to define the order of execution */
+ order: 400,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: keepTogether
+ },
+
+ /**
+ * This modifier is used to move the `arrowElement` of the popper to make
+ * sure it is positioned between the reference element and its popper element.
+ * It will read the outer size of the `arrowElement` node to detect how many
+ * pixels of conjuction are needed.
+ *
+ * It has no effect if no `arrowElement` is provided.
+ * @memberof modifiers
+ * @inner
+ */
+ arrow: {
+ /** @prop {number} order=500 - Index used to define the order of execution */
+ order: 500,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: arrow,
+ /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */
+ element: '[x-arrow]'
+ },
+
+ /**
+ * Modifier used to flip the popper's placement when it starts to overlap its
+ * reference element.
+ *
+ * Requires the `preventOverflow` modifier before it in order to work.
+ *
+ * **NOTE:** this modifier will interrupt the current update cycle and will
+ * restart it if it detects the need to flip the placement.
+ * @memberof modifiers
+ * @inner
+ */
+ flip: {
+ /** @prop {number} order=600 - Index used to define the order of execution */
+ order: 600,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: flip,
+ /**
+ * @prop {String|Array} behavior='flip'
+ * The behavior used to change the popper's placement. It can be one of
+ * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid
+ * placements (with optional variations).
+ */
+ behavior: 'flip',
+ /**
+ * @prop {number} padding=5
+ * The popper will flip if it hits the edges of the `boundariesElement`
+ */
+ padding: 5,
+ /**
+ * @prop {String|HTMLElement} boundariesElement='viewport'
+ * The element which will define the boundaries of the popper position,
+ * the popper will never be placed outside of the defined boundaries
+ * (except if keepTogether is enabled)
+ */
+ boundariesElement: 'viewport'
+ },
+
+ /**
+ * Modifier used to make the popper flow toward the inner of the reference element.
+ * By default, when this modifier is disabled, the popper will be placed outside
+ * the reference element.
+ * @memberof modifiers
+ * @inner
+ */
+ inner: {
+ /** @prop {number} order=700 - Index used to define the order of execution */
+ order: 700,
+ /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */
+ enabled: false,
+ /** @prop {ModifierFn} */
+ fn: inner
+ },
+
+ /**
+ * Modifier used to hide the popper when its reference element is outside of the
+ * popper boundaries. It will set a `x-out-of-boundaries` attribute which can
+ * be used to hide with a CSS selector the popper when its reference is
+ * out of boundaries.
+ *
+ * Requires the `preventOverflow` modifier before it in order to work.
+ * @memberof modifiers
+ * @inner
+ */
+ hide: {
+ /** @prop {number} order=800 - Index used to define the order of execution */
+ order: 800,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: hide
+ },
+
+ /**
+ * Computes the style that will be applied to the popper element to gets
+ * properly positioned.
+ *
+ * Note that this modifier will not touch the DOM, it just prepares the styles
+ * so that `applyStyle` modifier can apply it. This separation is useful
+ * in case you need to replace `applyStyle` with a custom implementation.
+ *
+ * This modifier has `850` as `order` value to maintain backward compatibility
+ * with previous versions of Popper.js. Expect the modifiers ordering method
+ * to change in future major versions of the library.
+ *
+ * @memberof modifiers
+ * @inner
+ */
+ computeStyle: {
+ /** @prop {number} order=850 - Index used to define the order of execution */
+ order: 850,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: computeStyle,
+ /**
+ * @prop {Boolean} gpuAcceleration=true
+ * If true, it uses the CSS 3d transformation to position the popper.
+ * Otherwise, it will use the `top` and `left` properties.
+ */
+ gpuAcceleration: true,
+ /**
+ * @prop {string} [x='bottom']
+ * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.
+ * Change this if your popper should grow in a direction different from `bottom`
+ */
+ x: 'bottom',
+ /**
+ * @prop {string} [x='left']
+ * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.
+ * Change this if your popper should grow in a direction different from `right`
+ */
+ y: 'right'
+ },
+
+ /**
+ * Applies the computed styles to the popper element.
+ *
+ * All the DOM manipulations are limited to this modifier. This is useful in case
+ * you want to integrate Popper.js inside a framework or view library and you
+ * want to delegate all the DOM manipulations to it.
+ *
+ * Note that if you disable this modifier, you must make sure the popper element
+ * has its position set to `absolute` before Popper.js can do its work!
+ *
+ * Just disable this modifier and define you own to achieve the desired effect.
+ *
+ * @memberof modifiers
+ * @inner
+ */
+ applyStyle: {
+ /** @prop {number} order=900 - Index used to define the order of execution */
+ order: 900,
+ /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */
+ enabled: true,
+ /** @prop {ModifierFn} */
+ fn: applyStyle,
+ /** @prop {Function} */
+ onLoad: applyStyleOnLoad,
+ /**
+ * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier
+ * @prop {Boolean} gpuAcceleration=true
+ * If true, it uses the CSS 3d transformation to position the popper.
+ * Otherwise, it will use the `top` and `left` properties.
+ */
+ gpuAcceleration: undefined
+ }
+};
+
+/**
+ * The `dataObject` is an object containing all the informations used by Popper.js
+ * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks.
+ * @name dataObject
+ * @property {Object} data.instance The Popper.js instance
+ * @property {String} data.placement Placement applied to popper
+ * @property {String} data.originalPlacement Placement originally defined on init
+ * @property {Boolean} data.flipped True if popper has been flipped by flip modifier
+ * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper.
+ * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier
+ * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`)
+ * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`)
+ * @property {Object} data.boundaries Offsets of the popper boundaries
+ * @property {Object} data.offsets The measurements of popper, reference and arrow elements.
+ * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values
+ * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values
+ * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0
+ */
+
+/**
+ * Default options provided to Popper.js constructor.
+ * These can be overriden using the `options` argument of Popper.js.
+ * To override an option, simply pass as 3rd argument an object with the same
+ * structure of this object, example:
+ * ```
+ * new Popper(ref, pop, {
+ * modifiers: {
+ * preventOverflow: { enabled: false }
+ * }
+ * })
+ * ```
+ * @type {Object}
+ * @static
+ * @memberof Popper
+ */
+var Defaults = {
+ /**
+ * Popper's placement
+ * @prop {Popper.placements} placement='bottom'
+ */
+ placement: 'bottom',
+
+ /**
+ * Whether events (resize, scroll) are initially enabled
+ * @prop {Boolean} eventsEnabled=true
+ */
+ eventsEnabled: true,
+
+ /**
+ * Set to true if you want to automatically remove the popper when
+ * you call the `destroy` method.
+ * @prop {Boolean} removeOnDestroy=false
+ */
+ removeOnDestroy: false,
+
+ /**
+ * Callback called when the popper is created.
+ * By default, is set to no-op.
+ * Access Popper.js instance with `data.instance`.
+ * @prop {onCreate}
+ */
+ onCreate: function onCreate() {},
+
+ /**
+ * Callback called when the popper is updated, this callback is not called
+ * on the initialization/creation of the popper, but only on subsequent
+ * updates.
+ * By default, is set to no-op.
+ * Access Popper.js instance with `data.instance`.
+ * @prop {onUpdate}
+ */
+ onUpdate: function onUpdate() {},
+
+ /**
+ * List of modifiers used to modify the offsets before they are applied to the popper.
+ * They provide most of the functionalities of Popper.js
+ * @prop {modifiers}
+ */
+ modifiers: modifiers
+};
+
+/**
+ * @callback onCreate
+ * @param {dataObject} data
+ */
+
+/**
+ * @callback onUpdate
+ * @param {dataObject} data
+ */
+
+// Utils
+// Methods
+var Popper = function () {
+ /**
+ * Create a new Popper.js instance
+ * @class Popper
+ * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
+ * @param {HTMLElement} popper - The HTML element used as popper.
+ * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
+ * @return {Object} instance - The generated Popper.js instance
+ */
+ function Popper(reference, popper) {
+ var _this = this;
+
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ classCallCheck(this, Popper);
+
+ this.scheduleUpdate = function () {
+ return requestAnimationFrame(_this.update);
+ };
+
+ // make update() debounced, so that it only runs at most once-per-tick
+ this.update = debounce(this.update.bind(this));
+
+ // with {} we create a new object with the options inside it
+ this.options = _extends({}, Popper.Defaults, options);
+
+ // init state
+ this.state = {
+ isDestroyed: false,
+ isCreated: false,
+ scrollParents: []
+ };
+
+ // get reference and popper elements (allow jQuery wrappers)
+ this.reference = reference.jquery ? reference[0] : reference;
+ this.popper = popper.jquery ? popper[0] : popper;
+
+ // Deep merge modifiers options
+ this.options.modifiers = {};
+ Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {
+ _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});
+ });
+
+ // Refactoring modifiers' list (Object => Array)
+ this.modifiers = Object.keys(this.options.modifiers).map(function (name) {
+ return _extends({
+ name: name
+ }, _this.options.modifiers[name]);
+ })
+ // sort the modifiers by order
+ .sort(function (a, b) {
+ return a.order - b.order;
+ });
+
+ // modifiers have the ability to execute arbitrary code when Popper.js get inited
+ // such code is executed in the same order of its modifier
+ // they could add new properties to their options configuration
+ // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!
+ this.modifiers.forEach(function (modifierOptions) {
+ if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
+ modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
+ }
+ });
+
+ // fire the first update to position the popper in the right place
+ this.update();
+
+ var eventsEnabled = this.options.eventsEnabled;
+ if (eventsEnabled) {
+ // setup event listeners, they will take care of update the position in specific situations
+ this.enableEventListeners();
+ }
+
+ this.state.eventsEnabled = eventsEnabled;
+ }
+
+ // We can't use class properties because they don't get listed in the
+ // class prototype and break stuff like Sinon stubs
+
+
+ createClass(Popper, [{
+ key: 'update',
+ value: function update$$1() {
+ return update.call(this);
+ }
+ }, {
+ key: 'destroy',
+ value: function destroy$$1() {
+ return destroy.call(this);
+ }
+ }, {
+ key: 'enableEventListeners',
+ value: function enableEventListeners$$1() {
+ return enableEventListeners.call(this);
+ }
+ }, {
+ key: 'disableEventListeners',
+ value: function disableEventListeners$$1() {
+ return disableEventListeners.call(this);
+ }
+
+ /**
+ * Schedule an update, it will run on the next UI update available
+ * @method scheduleUpdate
+ * @memberof Popper
+ */
+
+
+ /**
+ * Collection of utilities useful when writing custom modifiers.
+ * Starting from version 1.7, this method is available only if you
+ * include `popper-utils.js` before `popper.js`.
+ *
+ * **DEPRECATION**: This way to access PopperUtils is deprecated
+ * and will be removed in v2! Use the PopperUtils module directly instead.
+ * Due to the high instability of the methods contained in Utils, we can't
+ * guarantee them to follow semver. Use them at your own risk!
+ * @static
+ * @private
+ * @type {Object}
+ * @deprecated since version 1.8
+ * @member Utils
+ * @memberof Popper
+ */
+
+ }]);
+ return Popper;
+}();
+
+/**
+ * The `referenceObject` is an object that provides an interface compatible with Popper.js
+ * and lets you use it as replacement of a real DOM node.
+ * You can use this method to position a popper relatively to a set of coordinates
+ * in case you don't have a DOM node to use as reference.
+ *
+ * ```
+ * new Popper(referenceObject, popperNode);
+ * ```
+ *
+ * NB: This feature isn't supported in Internet Explorer 10
+ * @name referenceObject
+ * @property {Function} data.getBoundingClientRect
+ * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
+ * @property {number} data.clientWidth
+ * An ES6 getter that will return the width of the virtual reference element.
+ * @property {number} data.clientHeight
+ * An ES6 getter that will return the height of the virtual reference element.
+ */
+
+
+Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;
+Popper.placements = placements;
+Popper.Defaults = Defaults;
+
+return Popper;
+
+})));
+//# sourceMappingURL=popper.js.map
diff --git a/template/index.html b/template/index.html
index 2833c32..09df813 100644
--- a/template/index.html
+++ b/template/index.html
@@ -9,82 +9,109 @@
-
+
+
Home Page
-
-