From 4ac8fa0c5136f00e4c370b02ad7fbb2d24d05c1d Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Thu, 8 Jun 2017 15:07:35 +0100 Subject: [PATCH] put jquerytypeahead in node_modules --- .../css/jquery.typeahead.css | 545 ------------------ .../css/jquery.typeahead.min.css | 3 - .../js/jquery.typeahead.min.js | 11 - apps/maarch_entreprise/merged_css.php | 2 +- apps/maarch_entreprise/merged_jsAbstract.php | 2 +- package.json | 1 + 6 files changed, 3 insertions(+), 561 deletions(-) delete mode 100644 apps/maarch_entreprise/css/jquery.typeahead.css delete mode 100644 apps/maarch_entreprise/css/jquery.typeahead.min.css delete mode 100644 apps/maarch_entreprise/js/jquery.typeahead.min.js diff --git a/apps/maarch_entreprise/css/jquery.typeahead.css b/apps/maarch_entreprise/css/jquery.typeahead.css deleted file mode 100644 index 5691c26e330..00000000000 --- a/apps/maarch_entreprise/css/jquery.typeahead.css +++ /dev/null @@ -1,545 +0,0 @@ -.typeahead__container { - /** - * Restore the font weight unset by the previous rule. - */ - /** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ - /** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - /** - * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` - * controls in Android 4. - * 2. Correct the inability to style clickable types in iOS and Safari. - */ - /** - * Remove the inner border and padding in Firefox. - */ - /** - * Restore the focus styles unset by the previous rule. - */ - /** - * Change the border, margin, and padding in all browsers (opinionated). - */ - /** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ - /** - * Remove the default vertical scrollbar in IE. - */ - /** - * 1. Add the correct box sizing in IE 10-. - * 2. Remove the padding in IE 10-. - */ - /** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - /** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - /** - * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. - */ - /** - * Correct the text style of placeholders in Chrome, Edge, and Safari. - */ - /** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ -} - -.typeahead__container button, -.typeahead__container input, -.typeahead__container optgroup, -.typeahead__container select, -.typeahead__container textarea { - font: inherit; - /* 1 */ - margin: 0; - /* 2 */ -} - -.typeahead__container optgroup { - font-weight: bold; -} - -.typeahead__container button, -.typeahead__container input { - /* 1 */ - overflow: visible; -} - -.typeahead__container button, -.typeahead__container select { - /* 1 */ - text-transform: none; -} - -.typeahead__container button, -.typeahead__container html [type="button"], -.typeahead__container [type="reset"], -.typeahead__container [type="submit"] { - -webkit-appearance: button; - /* 2 */ -} - -.typeahead__container button::-moz-focus-inner, -.typeahead__container [type="button"]::-moz-focus-inner, -.typeahead__container [type="reset"]::-moz-focus-inner, -.typeahead__container [type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -.typeahead__container button:-moz-focusring, -.typeahead__container [type="button"]:-moz-focusring, -.typeahead__container [type="reset"]:-moz-focusring, -.typeahead__container [type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -.typeahead__container fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -.typeahead__container legend { - box-sizing: border-box; - /* 1 */ - color: inherit; - /* 2 */ - display: table; - /* 1 */ - max-width: 100%; - /* 1 */ - padding: 0; - /* 3 */ - white-space: normal; - /* 1 */ -} - -.typeahead__container textarea { - overflow: auto; -} - -.typeahead__container [type="checkbox"], -.typeahead__container [type="radio"] { - box-sizing: border-box; - /* 1 */ - padding: 0; - /* 2 */ -} - -.typeahead__container [type="number"]::-webkit-inner-spin-button, -.typeahead__container [type="number"]::-webkit-outer-spin-button { - height: auto; -} - -.typeahead__container [type="search"] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -.typeahead__container [type="search"]::-webkit-search-cancel-button, -.typeahead__container [type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -.typeahead__container ::-webkit-input-placeholder { - color: inherit; - opacity: 0.54; -} - -.typeahead__container ::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -.typeahead__container { - position: relative; - font: 14px Lato, "Helvetica Neue", Arial, Helvetica, sans-serif; -} - -.typeahead__container * { - box-sizing: border-box; - outline: 0; -} - -.typeahead__query { - position: relative; - z-index: 2; - width: 100%; -} - -.typeahead__filter { - position: relative; -} - -.typeahead__filter button { - min-width: 100%; - white-space: nowrap; -} - -.typeahead__filter button:after { - display: inline-block; - margin-left: 4px; - width: 0; - height: 0; - vertical-align: -2px; - content: ""; - border: 4px solid; - border-right-color: transparent; - border-bottom-color: transparent; - border-left-color: transparent; -} - -.typeahead__field { - font-size: 0; - position: relative; - display: table; - border-collapse: collapse; - width: 100%; -} - -.typeahead__field > * { - display: table-cell; - vertical-align: top; -} - -.typeahead__query, .typeahead__filter, .typeahead__button { - font-size: 14px; -} - -.typeahead__button { - position: relative; - font-size: 0; - width: 1%; - vertical-align: middle; -} - -.typeahead__button button { - border-top-right-radius: 2px; - border-bottom-right-radius: 2px; -} - -.typeahead__field { - color: #555; -} - -.typeahead__field input { - display: block; - width: 100%; - height: 32px; - padding: 6px 12px; - background: #fff; - border: 1px solid #ccc; - border-radius: 2px 0 0 2px; - transition: all ease-in-out .15s; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - box-sizing: border-box; -} - -.typeahead__field input:focus, .typeahead__field input:active { - border-color: #66afe9; -} - -.typeahead__field input[type="search"], -.typeahead__field input[type="search"]::-webkit-search-cancel-button { - -webkit-appearance: none; - appearance: none; -} - -.typeahead__field input[type="search"]::-ms-clear { - display: none; - width: 0; - height: 0; -} - -.typeahead__container.hint .typeahead__field input { - background: transparent; -} - -.typeahead__container.hint .typeahead__field input:last-child, .typeahead__hint { - background: #fff; -} - -.typeahead__container button { - display: inline-block; - margin-bottom: 0; - text-align: center; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - background-color: #fff; - border: 1px solid #ccc; - height: 32px; - padding: 6px 12px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - color: #555; -} - -.typeahead__container button:hover, .typeahead__container button:focus { - color: #3c3c3c; - background-color: #f5f5f5; - border-color: #b3b3b3; -} - -.typeahead__container button:active, .typeahead__container button.active { - background-image: none; -} - -.typeahead__container button:focus, .typeahead__container button:active { - border-color: #66afe9; -} - -.typeahead__container input.disabled, -.typeahead__container input[disabled], -.typeahead__container button.disabled, -.typeahead__container button[disabled] { - cursor: not-allowed; - pointer-events: none; - opacity: 0.65; - box-shadow: none; - background-color: #fff; - border-color: #ccc; -} - -.typeahead__filter, .typeahead__button { - z-index: 1; -} - -.typeahead__filter button, .typeahead__button button { - margin-left: -1px; - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.typeahead__filter:hover, .typeahead__filter:active, .typeahead__filter:focus, .typeahead__button:hover, .typeahead__button:active, .typeahead__button:focus { - z-index: 1001; -} - -.typeahead__filter:hover button:focus, .typeahead__filter:hover button:active, .typeahead__filter:active button:focus, .typeahead__filter:active button:active, .typeahead__filter:focus button:focus, .typeahead__filter:focus button:active, .typeahead__button:hover button:focus, .typeahead__button:hover button:active, .typeahead__button:active button:focus, .typeahead__button:active button:active, .typeahead__button:focus button:focus, .typeahead__button:focus button:active { - z-index: 1001; -} - -.typeahead__filter + .typeahead__button button { - margin-left: -2px; -} - -.typeahead__container.filter .typeahead__filter { - z-index: 1001; -} - -.typeahead__list, .typeahead__dropdown { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - width: 100%; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - text-align: left; - background-color: #fff; - border: 1px solid #ccc; - border-radius: 2px; - background-clip: padding-box; -} - -.typeahead__result.detached .typeahead__list { - position: relative; - z-index: 1041; - top: initial; - left: initial; -} - -.typeahead__dropdown { - right: 0; - left: initial; - z-index: 1001; -} - -.typeahead__list > li { - position: relative; - border-top: solid 1px #ccc; -} - -.typeahead__list > li:first-child { - border-top: none; -} - -.typeahead__list > li > a, -.typeahead__dropdown > li > a { - display: block; - padding: 6px 12px; - clear: both; - color: #333333; - text-decoration: none; -} - -.typeahead__list > li > a:hover, -.typeahead__list > li > a:focus, -.typeahead__list > li.active > a, -.typeahead__dropdown > li > a:hover, -.typeahead__dropdown > li > a:focus, -.typeahead__dropdown > li.active > a { - background-color: #f5f5f5; - color: #3c3c3c; -} - -.typeahead__list.empty > li > a { - cursor: default; -} - -.typeahead__list.empty > li > a:hover, -.typeahead__list.empty > li > a:focus, -.typeahead__list.empty > li.active > a { - background-color: transparent; -} - -.typeahead__list > li.typeahead__group { - border-color: #bfdef6; - font-weight: bold; -} - -.typeahead__list > li.typeahead__group:first-child { - border-top: solid 1px #bfdef6; -} - -.typeahead__list > li.typeahead__group > a, -.typeahead__list > li.typeahead__group > a:hover, -.typeahead__list > li.typeahead__group > a:focus, -.typeahead__list > li.typeahead__group.active > a { - cursor: default; - color: #17639f; - background: #ecf5fc; -} - -.typeahead__list > li.typeahead__group + li.typeahead__item { - border-color: #bfdef6; -} - -.typeahead__container.result .typeahead__list, -.typeahead__container.filter .typeahead__dropdown, -.typeahead__container.hint .typeahead__hint, -.typeahead__container.backdrop + .typeahead__backdrop { - display: block !important; -} - -.typeahead__container .typeahead__list, -.typeahead__container .typeahead__dropdown, -.typeahead__container .typeahead__hint, -.typeahead__container + .typeahead__backdrop { - display: none !important; -} - -.typeahead__dropdown li:last-child { - margin-top: 5px; - padding-top: 5px; - border-top: solid 1px #ccc; -} - -.typeahead__cancel-button { - visibility: hidden; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - border-radius: 50%; - width: 16px; - height: 16px; - position: absolute; - top: 8px; - right: .8em; - cursor: pointer; - background: url(data:image/svg+xml;charset=utf8;base64,PD94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NS40MjQsMTIuODQ3LTUuNDI0ICAgYzUuMTQxLDAsOS41MjEsMS44MDksMTMuMTM1LDUuNDI0bDI1LjY5MywyNS42OTNjMy42MTcsMy42MTcsNS40MjgsNy45OTQsNS40MjgsMTMuMTM0YzAsNC45NDgtMS44MTEsOS4yMzUtNS40MjgsMTIuODQ3ICAgbC01MS42NzUsNTEuNjc4TDMyMi42MjEsMjcwLjkzOXoiIGZpbGw9IiM1NTU1NTUiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K) no-repeat scroll center center transparent; -} - -.typeahead__container.cancel:not(.loading) .typeahead__cancel-button { - visibility: visible; - opacity: .25; -} - -.typeahead__container.cancel:not(.loading) .typeahead__cancel-button:hover { - opacity: .4; -} - -.typeahead__search-icon { - padding: 0 1.25rem; - width: 16px; - height: 16px; - display: block; - background: url(data:image/svg+xml;charset=utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI1MC4zMTMgMjUwLjMxMyIgc3R5bGU9ImVuYWJs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8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=) no-repeat scroll center center transparent; -} - -.typeahead__container.loading .typeahead__query:before, .typeahead__container.loading .typeahead__query:after { - transition: all 0s linear, opacity 0.2s ease; - position: absolute; - z-index: 3; - content: ''; - top: 50%; - right: .55em; - margin-top: -10.5px; - width: 21px; - height: 21px; - box-sizing: border-box; - border-radius: 500rem; - border-style: solid; - border-width: .1em; -} - -.typeahead__container.loading .typeahead__query:before { - border-color: rgba(0, 0, 0, 0.35); -} - -.typeahead__container.loading .typeahead__query:after { - -webkit-animation: button-spin 0.6s linear; - animation: button-spin 0.6s linear; - -webkit-animation-iteration-count: infinite; - animation-iteration-count: infinite; - border-color: #fff transparent transparent; - box-shadow: 0 0 0 1px transparent; -} - -@-webkit-keyframes button-spin { - from { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes button-spin { - from { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - diff --git a/apps/maarch_entreprise/css/jquery.typeahead.min.css b/apps/maarch_entreprise/css/jquery.typeahead.min.css deleted file mode 100644 index c35b1ddd440..00000000000 --- a/apps/maarch_entreprise/css/jquery.typeahead.min.css +++ /dev/null @@ -1,3 +0,0 @@ - -.typeahead__container button,.typeahead__container input,.typeahead__container optgroup,.typeahead__container select,.typeahead__container textarea{font:inherit;margin:0}.typeahead__container optgroup{font-weight:700}.typeahead__container button,.typeahead__container input{overflow:visible}.typeahead__container button,.typeahead__container select{text-transform:none}.typeahead__container [type=reset],.typeahead__container [type=submit],.typeahead__container button,.typeahead__container html [type=button]{-webkit-appearance:button}.typeahead__container [type=button]::-moz-focus-inner,.typeahead__container [type=reset]::-moz-focus-inner,.typeahead__container [type=submit]::-moz-focus-inner,.typeahead__container button::-moz-focus-inner{border-style:none;padding:0}.typeahead__container [type=button]:-moz-focusring,.typeahead__container [type=reset]:-moz-focusring,.typeahead__container [type=submit]:-moz-focusring,.typeahead__container button:-moz-focusring{outline:1px dotted ButtonText}.typeahead__container fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}.typeahead__container legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.typeahead__container textarea{overflow:auto}.typeahead__container [type=checkbox],.typeahead__container [type=radio]{box-sizing:border-box;padding:0}.typeahead__container [type=number]::-webkit-inner-spin-button,.typeahead__container [type=number]::-webkit-outer-spin-button{height:auto}.typeahead__container [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.typeahead__container [type=search]::-webkit-search-cancel-button,.typeahead__container [type=search]::-webkit-search-decoration{-webkit-appearance:none}.typeahead__container ::-webkit-input-placeholder{color:inherit;opacity:.54}.typeahead__container ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.typeahead__container{position:relative;font:14px Lato,Helvetica Neue,Arial,Helvetica,sans-serif}.typeahead__container *{box-sizing:border-box;outline:0}.typeahead__query{position:relative;z-index:2;width:100%}.typeahead__filter{position:relative}.typeahead__filter button{min-width:100%;white-space:nowrap}.typeahead__filter button:after{display:inline-block;margin-left:4px;width:0;height:0;vertical-align:-2px;content:"";border:4px solid;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}.typeahead__field{font-size:0;position:relative;display:table;border-collapse:collapse;width:100%}.typeahead__field>*{display:table-cell;vertical-align:top}.typeahead__button,.typeahead__filter,.typeahead__query{font-size:14px}.typeahead__button{position:relative;font-size:0;width:1%;vertical-align:middle}.typeahead__button button{border-top-right-radius:2px;border-bottom-right-radius:2px}.typeahead__field{color:#555}.typeahead__field input{display:block;width:100%;height:32px;padding:6px 12px;background:#fff;border:1px solid #ccc;border-radius:2px 0 0 2px;transition:all .15s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box}.typeahead__field input:active,.typeahead__field input:focus{border-color:#66afe9}.typeahead__field input[type=search],.typeahead__field input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.typeahead__field input[type=search]::-ms-clear{display:none;width:0;height:0}.typeahead__container.hint .typeahead__field input{background:transparent}.typeahead__container.hint .typeahead__field input:last-child,.typeahead__hint{background:#fff}.typeahead__container button{display:inline-block;margin-bottom:0;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-color:#fff;border:1px solid #ccc;height:32px;padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#555}.typeahead__container button:focus,.typeahead__container button:hover{color:#3c3c3c;background-color:#f5f5f5;border-color:#b3b3b3}.typeahead__container button.active,.typeahead__container button:active{background-image:none}.typeahead__container button:active,.typeahead__container button:focus{border-color:#66afe9}.typeahead__container button.disabled,.typeahead__container button[disabled],.typeahead__container input.disabled,.typeahead__container input[disabled]{cursor:not-allowed;pointer-events:none;opacity:.65;box-shadow:none;background-color:#fff;border-color:#ccc}.typeahead__button,.typeahead__filter{z-index:1}.typeahead__button button,.typeahead__filter button{margin-left:-1px;border-bottom-left-radius:0;border-top-left-radius:0}.typeahead__button:active,.typeahead__button:active button:active,.typeahead__button:active button:focus,.typeahead__button:focus,.typeahead__button:focus button:active,.typeahead__button:focus button:focus,.typeahead__button:hover,.typeahead__button:hover button:active,.typeahead__button:hover button:focus,.typeahead__filter:active,.typeahead__filter:active button:active,.typeahead__filter:active button:focus,.typeahead__filter:focus,.typeahead__filter:focus button:active,.typeahead__filter:focus button:focus,.typeahead__filter:hover,.typeahead__filter:hover button:active,.typeahead__filter:hover button:focus{z-index:5}.typeahead__filter+.typeahead__button button{margin-left:-2px}.typeahead__container.filter .typeahead__filter{z-index:5}.typeahead__dropdown,.typeahead__list{position:absolute;top:100%;left:0;z-index:4;width:100%;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;text-align:left;background-color:#fff;border:1px solid #ccc;border-radius:2px;background-clip:padding-box}.typeahead__result.detached .typeahead__list{position:relative;z-index:6;top:auto;left:auto}.typeahead__dropdown{right:0;left:auto;z-index:5}.typeahead__list>li{position:relative;border-top:1px solid #ccc}.typeahead__list>li:first-child{border-top:none}.typeahead__dropdown>li>a,.typeahead__list>li>a{display:block;padding:6px 12px;clear:both;color:#333;text-decoration:none}.typeahead__dropdown>li.active>a,.typeahead__dropdown>li>a:focus,.typeahead__dropdown>li>a:hover,.typeahead__list>li.active>a,.typeahead__list>li>a:focus,.typeahead__list>li>a:hover{background-color:#f5f5f5;color:#3c3c3c}.typeahead__list.empty>li>a{cursor:default}.typeahead__list.empty>li.active>a,.typeahead__list.empty>li>a:focus,.typeahead__list.empty>li>a:hover{background-color:transparent}.typeahead__list>li.typeahead__group{border-color:#bfdef6;font-weight:700}.typeahead__list>li.typeahead__group:first-child{border-top:1px solid #bfdef6}.typeahead__list>li.typeahead__group.active>a,.typeahead__list>li.typeahead__group>a,.typeahead__list>li.typeahead__group>a:focus,.typeahead__list>li.typeahead__group>a:hover{cursor:default;color:#17639f;background:#ecf5fc}.typeahead__list>li.typeahead__group+li.typeahead__item{border-color:#bfdef6}.typeahead__container.backdrop+.typeahead__backdrop,.typeahead__container.filter .typeahead__dropdown,.typeahead__container.hint .typeahead__hint,.typeahead__container.result .typeahead__list{display:block!important}.typeahead__container+.typeahead__backdrop,.typeahead__container .typeahead__dropdown,.typeahead__container .typeahead__hint,.typeahead__container .typeahead__list{display:none!important}.typeahead__dropdown li:last-child{margin-top:5px;padding-top:5px;border-top:1px solid #ccc}.typeahead__cancel-button{visibility:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:50%;width:16px;height:16px;position:absolute;top:8px;right:.8em;cursor:pointer;background:url(data:image/svg+xml;charset=utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/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ksMTMuMTM1LDUuNDI0bDI1LjY5MywyNS42OTNjMy42MTcsMy42MTcsNS40MjgsNy45OTQsNS40MjgsMTMuMTM0YzAsNC45NDgtMS44MTEsOS4yMzUtNS40MjgsMTIuODQ3ICAgbC01MS42NzUsNTEuNjc4TDMyMi42MjEsMjcwLjkzOXoiIGZpbGw9IiM1NTU1NTUiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K) no-repeat scroll 50% transparent}.typeahead__container.cancel:not(.loading) .typeahead__cancel-button{visibility:visible;opacity:.25}.typeahead__container.cancel:not(.loading) .typeahead__cancel-button:hover{opacity:.4}.typeahead__search-icon{padding:0 1.25rem;width:16px;height:16px;display:block;background:url(data:image/svg+xml;charset=utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTguMS4xLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDI1MC4zMTMgMjUwLjMxMyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjUwLjMxMyAyNTAuMzEzOyIgeG1sOnNwYWNlPSJwcmVz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L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=) no-repeat scroll 50% transparent}.typeahead__container.loading .typeahead__query:after,.typeahead__container.loading .typeahead__query:before{transition:all 0s linear,opacity .2s ease;position:absolute;z-index:3;content:"";top:50%;right:.55em;margin-top:-10.5px;width:21px;height:21px;box-sizing:border-box;border-radius:500rem;border-style:solid;border-width:.1em}.typeahead__container.loading .typeahead__query:before{border-color:rgba(0,0,0,.35)}.typeahead__container.loading .typeahead__query:after{-webkit-animation:a .6s linear;animation:a .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-color:#fff transparent transparent;box-shadow:0 0 0 1px transparent}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}} - diff --git a/apps/maarch_entreprise/js/jquery.typeahead.min.js b/apps/maarch_entreprise/js/jquery.typeahead.min.js deleted file mode 100644 index 3229f990668..00000000000 --- a/apps/maarch_entreprise/js/jquery.typeahead.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/*! - * jQuery Typeahead - * Copyright (C) 2017 RunningCoder.org - * Licensed under the MIT license - * - * @author Tom Bertrand - * @version 2.8.0 (2017-3-1) - * @link http://www.runningcoder.org/jquerytypeahead/ - */ -!function(t){"function"==typeof define&&define.amd?define("jquery-typeahead",["jquery"],function(e){return t(e)}):"object"==typeof module&&module.exports?module.exports=function(e,i){return void 0===e&&(e="undefined"!=typeof window?require("jquery"):require("jquery")(i)),t(e)}():t(jQuery)}(function(t){"use strict";window.Typeahead={version:"2.8.0"};var e={input:null,minLength:2,maxLength:!1,maxItem:8,dynamic:!1,delay:300,order:null,offset:!1,hint:!1,accent:!1,highlight:!0,group:!1,groupOrder:null,maxItemPerGroup:null,dropdownFilter:!1,dynamicFilter:null,backdrop:!1,backdropOnFocus:!1,cache:!1,ttl:36e5,compression:!1,searchOnFocus:!1,blurOnTab:!0,resultContainer:null,generateOnLoad:null,mustSelectItem:!1,href:null,display:["display"],template:null,templateValue:null,groupTemplate:null,correlativeTemplate:!1,emptyTemplate:!1,cancelButton:!0,loadingAnimation:!0,filter:!0,matcher:null,source:null,callback:{onInit:null,onReady:null,onShowLayout:null,onHideLayout:null,onSearch:null,onResult:null,onLayoutBuiltBefore:null,onLayoutBuiltAfter:null,onNavigateBefore:null,onNavigateAfter:null,onMouseEnter:null,onMouseLeave:null,onClickBefore:null,onClickAfter:null,onDropdownFilter:null,onSendRequest:null,onReceiveRequest:null,onPopulateSource:null,onCacheSave:null,onSubmit:null,onCancel:null},selector:{container:"typeahead__container",result:"typeahead__result",list:"typeahead__list",group:"typeahead__group",item:"typeahead__item",empty:"typeahead__empty",display:"typeahead__display",query:"typeahead__query",filter:"typeahead__filter",filterButton:"typeahead__filter-button",dropdown:"typeahead__dropdown",dropdownItem:"typeahead__dropdown-item",button:"typeahead__button",backdrop:"typeahead__backdrop",hint:"typeahead__hint",cancelButton:"typeahead__cancel-button"},debug:!1},i=".typeahead",o={from:"ãà áäâẽèéëêìÃïîõòóöôùúüûñç",to:"aaaaaeeeeeiiiiooooouuuunc"},s=~window.navigator.appVersion.indexOf("MSIE 9."),n=~window.navigator.appVersion.indexOf("MSIE 10"),r=~window.navigator.userAgent.indexOf("Trident")&&~window.navigator.userAgent.indexOf("rv:11"),a=function(t,e){this.rawQuery=t.val()||"",this.query=t.val()||"",this.selector=t[0].selector,this.deferred=null,this.tmpSource={},this.source={},this.dynamicGroups=[],this.hasDynamicGroups=!1,this.generatedGroupCount=0,this.groupBy="group",this.groups=[],this.searchGroups=[],this.generateGroups=[],this.requestGroups=[],this.result={},this.groupTemplate="",this.resultHtml=null,this.resultCount=0,this.resultCountPerGroup={},this.options=e,this.node=t,this.namespace="."+this.helper.slugify.call(this,this.selector)+i,this.container=null,this.resultContainer=null,this.item=null,this.xhr={},this.hintIndex=null,this.filters={dropdown:{},dynamic:{}},this.dropdownFilter={"static":[],dynamic:[]},this.dropdownFilterAll=null,this.isDropdownEvent=!1,this.requests={},this.backdrop={},this.hint={},this.hasDragged=!1,this.focusOnly=!1,this.__construct()};a.prototype={_validateCacheMethod:function(t){var e,i=["localStorage","sessionStorage"];if(t===!0)t="localStorage";else if("string"==typeof t&&!~i.indexOf(t))return!1;e="undefined"!=typeof window[t];try{window[t].setItem("typeahead","typeahead"),window[t].removeItem("typeahead")}catch(o){e=!1}return e&&t||!1},extendOptions:function(){if(this.options.cache=this._validateCacheMethod(this.options.cache),this.options.compression&&("object"==typeof LZString&&this.options.cache||(this.options.compression=!1)),(!this.options.maxLength||isNaN(this.options.maxLength))&&(this.options.maxLength=1/0),"undefined"!=typeof this.options.maxItem&&~[0,!1].indexOf(this.options.maxItem)&&(this.options.maxItem=1/0),this.options.maxItemPerGroup&&!/^\d+$/.test(this.options.maxItemPerGroup)&&(this.options.maxItemPerGroup=null),this.options.display&&!Array.isArray(this.options.display)&&(this.options.display=[this.options.display]),this.options.group&&(Array.isArray(this.options.group)||("string"==typeof this.options.group?this.options.group={key:this.options.group}:"boolean"==typeof this.options.group&&(this.options.group={key:"group"}),this.options.group.key=this.options.group.key||"group")),this.options.highlight&&!~["any",!0].indexOf(this.options.highlight)&&(this.options.highlight=!1),this.options.dropdownFilter&&this.options.dropdownFilter instanceof Object){Array.isArray(this.options.dropdownFilter)||(this.options.dropdownFilter=[this.options.dropdownFilter]);for(var i=0,s=this.options.dropdownFilter.length;s>i;++i)this.dropdownFilter[this.options.dropdownFilter[i].value?"static":"dynamic"].push(this.options.dropdownFilter[i])}this.options.dynamicFilter&&!Array.isArray(this.options.dynamicFilter)&&(this.options.dynamicFilter=[this.options.dynamicFilter]),this.options.accent&&("object"==typeof this.options.accent?this.options.accent.from&&this.options.accent.to&&this.options.accent.from.length===this.options.accent.to.length:this.options.accent=o),this.options.groupTemplate&&(this.groupTemplate=this.options.groupTemplate),this.options.resultContainer&&("string"==typeof this.options.resultContainer&&(this.options.resultContainer=t(this.options.resultContainer)),this.options.resultContainer instanceof t&&this.options.resultContainer[0]&&(this.resultContainer=this.options.resultContainer)),this.options.maxItemPerGroup&&this.options.group&&this.options.group.key&&(this.groupBy=this.options.group.key),this.options.callback&&this.options.callback.onClick&&(this.options.callback.onClickBefore=this.options.callback.onClick,delete this.options.callback.onClick),this.options.callback&&this.options.callback.onNavigate&&(this.options.callback.onNavigateBefore=this.options.callback.onNavigate,delete this.options.callback.onNavigate),this.options=t.extend(!0,{},e,this.options)},unifySourceFormat:function(){this.dynamicGroups=[],Array.isArray(this.options.source)&&(this.options.source={group:{data:this.options.source}}),"string"==typeof this.options.source&&(this.options.source={group:{ajax:{url:this.options.source}}}),this.options.source.ajax&&(this.options.source={group:{ajax:this.options.source.ajax}}),(this.options.source.url||this.options.source.data)&&(this.options.source={group:this.options.source});var t,e,i;for(t in this.options.source)if(this.options.source.hasOwnProperty(t)){if(e=this.options.source[t],"string"==typeof e&&(e={ajax:{url:e}}),i=e.url||e.ajax,Array.isArray(i)?(e.ajax="string"==typeof i[0]?{url:i[0]}:i[0],e.ajax.path=e.ajax.path||i[1]||null,delete e.url):("object"==typeof e.url?e.ajax=e.url:"string"==typeof e.url&&(e.ajax={url:e.url}),delete e.url),!e.data&&!e.ajax)return!1;e.display&&!Array.isArray(e.display)&&(e.display=[e.display]),e.minLength="number"==typeof e.minLength?e.minLength:this.options.minLength,e.maxLength="number"==typeof e.maxLength?e.maxLength:this.options.maxLength,e.dynamic="boolean"==typeof e.dynamic||this.options.dynamic,e.minLength>e.maxLength&&(e.minLength=e.maxLength),this.options.source[t]=e,this.options.source[t].dynamic&&this.dynamicGroups.push(t),e.cache="undefined"!=typeof e.cache?this._validateCacheMethod(e.cache):this.options.cache,e.compression&&("object"==typeof LZString&&e.cache||(e.compression=!1))}return this.hasDynamicGroups=this.options.dynamic||!!this.dynamicGroups.length,!0},init:function(){this.helper.executeCallback.call(this,this.options.callback.onInit,[this.node]),this.container=this.node.closest("."+this.options.selector.container)},delegateEvents:function(){var e=this,i=["focus"+this.namespace,"input"+this.namespace,"propertychange"+this.namespace,"keydown"+this.namespace,"keyup"+this.namespace,"search"+this.namespace,"generate"+this.namespace];t("html").on("touchmove",function(){e.hasDragged=!0}).on("touchstart",function(){e.hasDragged=!1}),this.node.closest("form").on("submit",function(t){return e.options.mustSelectItem&&e.helper.isEmpty(e.item)?void t.preventDefault():(e.options.backdropOnFocus||e.hideLayout(),e.options.callback.onSubmit?e.helper.executeCallback.call(e,e.options.callback.onSubmit,[e.node,this,e.item,t]):void 0)}).on("reset",function(){setTimeout(function(){e.node.trigger("input"+e.namespace),e.hideLayout()})});var o=!1;if(this.node.attr("placeholder")&&(n||r)){var a=!0;this.node.on("focusin focusout",function(){a=!(this.value||!this.placeholder)}),this.node.on("input",function(t){a&&(t.stopImmediatePropagation(),a=!1)})}this.node.off(this.namespace).on(i.join(" "),function(i,n){switch(i.type){case"generate":e.generateSource(Object.keys(e.options.source));break;case"focus":if(e.focusOnly){e.focusOnly=!1;break}e.options.backdropOnFocus&&(e.buildBackdropLayout(),e.showLayout()),e.options.searchOnFocus&&(e.deferred=t.Deferred(),e.generateSource());break;case"keydown":i.keyCode&&~[9,13,27,38,39,40].indexOf(i.keyCode)&&(o=!0,e.navigate(i));break;case"keyup":s&&e.node[0].value.replace(/^\s+/,"").toString().length<e.query.length&&e.node.trigger("input"+e.namespace);break;case"propertychange":if(o){o=!1;break}case"input":e.deferred=t.Deferred(),e.rawQuery=e.node[0].value.toString(),e.query=e.rawQuery.replace(/^\s+/,""),""===e.rawQuery&&""===e.query&&(i.originalEvent=n||{},e.helper.executeCallback.call(e,e.options.callback.onCancel,[e.node,i])),e.options.cancelButton&&e.toggleCancelButtonVisibility(),e.options.hint&&e.hint.container&&""!==e.hint.container.val()&&0!==e.hint.container.val().indexOf(e.rawQuery)&&e.hint.container.val(""),e.hasDynamicGroups?e.helper.typeWatch(function(){e.generateSource()},e.options.delay):e.generateSource();break;case"search":e.searchResult(),e.buildLayout(),e.result.length||e.searchGroups.length&&e.options.emptyTemplate&&e.query.length?e.showLayout():e.hideLayout(),e.deferred&&e.deferred.resolve()}return e.deferred&&e.deferred.promise()}),this.options.generateOnLoad&&this.node.trigger("generate"+this.namespace)},filterGenerateSource:function(){this.searchGroups=[],this.generateGroups=[];for(var t in this.options.source)if(this.options.source.hasOwnProperty(t)&&this.query.length>=this.options.source[t].minLength&&this.query.length<=this.options.source[t].maxLength){if(this.searchGroups.push(t),!this.options.source[t].dynamic&&this.source[t])continue;this.generateGroups.push(t)}},generateSource:function(e){if(this.filterGenerateSource(),Array.isArray(e)&&e.length)this.generateGroups=e;else if(!this.generateGroups.length)return void this.node.trigger("search"+this.namespace);if(this.requestGroups=[],this.generatedGroupCount=0,this.options.loadingAnimation&&this.container.addClass("loading"),!this.helper.isEmpty(this.xhr)){for(var i in this.xhr)this.xhr.hasOwnProperty(i)&&this.xhr[i].abort();this.xhr={}}for(var o,s,n,r,a,l,h,c=this,i=0,u=this.generateGroups.length;u>i;++i){if(o=this.generateGroups[i],n=this.options.source[o],r=n.cache,a=n.compression,r&&(l=window[r].getItem("TYPEAHEAD_"+this.selector+":"+o))){a&&(l=LZString.decompressFromUTF16(l)),h=!1;try{l=JSON.parse(l+""),l.data&&l.ttl>(new Date).getTime()?(this.populateSource(l.data,o),h=!0):window[r].removeItem("TYPEAHEAD_"+this.selector+":"+o)}catch(p){}if(h)continue}!n.data||n.ajax?n.ajax&&(this.requests[o]||(this.requests[o]=this.generateRequestObject(o)),this.requestGroups.push(o)):"function"==typeof n.data?(s=n.data.call(this),Array.isArray(s)?c.populateSource(s,o):"function"==typeof s.promise&&!function(e){t.when(s).then(function(t){t&&Array.isArray(t)&&c.populateSource(t,e)})}(o)):this.populateSource(t.extend(!0,[],n.data),o)}return this.requestGroups.length&&this.handleRequests(),!!this.generateGroups.length},generateRequestObject:function(t){var e=this,i=this.options.source[t],o={request:{url:i.ajax.url||null,dataType:"json",beforeSend:function(o,s){e.xhr[t]=o;var n=e.requests[t].callback.beforeSend||i.ajax.beforeSend;"function"==typeof n&&n.apply(null,arguments)}},callback:{beforeSend:null,done:null,fail:null,then:null,always:null},extra:{path:i.ajax.path||null,group:t},validForGroup:[t]};if("function"!=typeof i.ajax&&(i.ajax instanceof Object&&(o=this.extendXhrObject(o,i.ajax)),Object.keys(this.options.source).length>1))for(var s in this.requests)this.requests.hasOwnProperty(s)&&(this.requests[s].isDuplicated||o.request.url&&o.request.url===this.requests[s].request.url&&(this.requests[s].validForGroup.push(t),o.isDuplicated=!0,delete o.validForGroup));return o},extendXhrObject:function(e,i){return"object"==typeof i.callback&&(e.callback=i.callback,delete i.callback),"function"==typeof i.beforeSend&&(e.callback.beforeSend=i.beforeSend,delete i.beforeSend),e.request=t.extend(!0,e.request,i),"jsonp"!==e.request.dataType.toLowerCase()||e.request.jsonpCallback||(e.request.jsonpCallback="callback_"+e.extra.group),e},handleRequests:function(){var e,i=this,o=this.requestGroups.length;if(this.helper.executeCallback.call(this,this.options.callback.onSendRequest,[this.node,this.query])!==!1)for(var s=0,n=this.requestGroups.length;n>s;++s)e=this.requestGroups[s],this.requests[e].isDuplicated||!function(e,s){if("function"==typeof i.options.source[e].ajax){var n=i.options.source[e].ajax.call(i,i.query);if(s=i.extendXhrObject(i.generateRequestObject(e),"object"==typeof n?n:{}),"object"!=typeof s.request||!s.request.url)return void i.populateSource([],e);i.requests[e]=s}var r,a,l=!1;if(~s.request.url.indexOf("{{query}}")&&(l||(s=t.extend(!0,{},s),l=!0),s.request.url=s.request.url.replace("{{query}}",encodeURIComponent(i.query))),s.request.data)for(var h in s.request.data)if(s.request.data.hasOwnProperty(h)&&~String(s.request.data[h]).indexOf("{{query}}")){l||(s=t.extend(!0,{},s),l=!0),s.request.data[h]=s.request.data[h].replace("{{query}}",i.query);break}t.ajax(s.request).done(function(t,e,o){a=null;for(var n=0,l=s.validForGroup.length;l>n;n++)r=i.requests[s.validForGroup[n]],r.callback.done instanceof Function&&(a=r.callback.done.call(i,t,e,o))}).fail(function(t,e,o){for(var n=0,a=s.validForGroup.length;a>n;n++)r=i.requests[s.validForGroup[n]],r.callback.fail instanceof Function&&r.callback.fail.call(i,t,e,o)}).always(function(t,e,n){for(var l=0,h=s.validForGroup.length;h>l;l++){if(r=i.requests[s.validForGroup[l]],r.callback.always instanceof Function&&r.callback.always.call(i,t,e,n),"object"!=typeof n)return;i.populateSource("function"==typeof t.promise&&[]||a||t,r.extra.group,r.extra.path||r.request.path),o-=1,0===o&&i.helper.executeCallback.call(i,i.options.callback.onReceiveRequest,[i.node,i.query])}}).then(function(t,e){for(var o=0,n=s.validForGroup.length;n>o;o++)r=i.requests[s.validForGroup[o]],r.callback.then instanceof Function&&r.callback.then.call(i,t,e)})}(e,this.requests[e])},populateSource:function(t,e,i){var o=this,s=this.options.source[e],n=s.ajax&&s.data;i&&"string"==typeof i&&(t=this.helper.namespace.call(this,i,t)),Array.isArray(t)||(t=[]),n&&("function"==typeof n&&(n=n()),Array.isArray(n)&&(t=t.concat(n)));for(var r,a=s.display?"compiled"===s.display[0]?s.display[1]:s.display[0]:"compiled"===this.options.display[0]?this.options.display[1]:this.options.display[0],l=0,h=t.length;h>l;l++)null!==t[l]&&"boolean"!=typeof t[l]&&("string"==typeof t[l]&&(r={},r[a]=t[l],t[l]=r),t[l].group=e);if(!this.hasDynamicGroups&&this.dropdownFilter.dynamic.length)for(var c,u,p={},l=0,h=t.length;h>l;l++)for(var d=0,f=this.dropdownFilter.dynamic.length;f>d;d++)c=this.dropdownFilter.dynamic[d].key,u=t[l][c],u&&(this.dropdownFilter.dynamic[d].value||(this.dropdownFilter.dynamic[d].value=[]),p[c]||(p[c]=[]),~p[c].indexOf(u.toLowerCase())||(p[c].push(u.toLowerCase()),this.dropdownFilter.dynamic[d].value.push(u)));if(this.options.correlativeTemplate){var y=s.template||this.options.template,g="";if("function"==typeof y&&(y=y.call(this,"",{})),y){if(Array.isArray(this.options.correlativeTemplate))for(var l=0,h=this.options.correlativeTemplate.length;h>l;l++)g+="{{"+this.options.correlativeTemplate[l]+"}} ";else g=y.replace(/<.+?>/g,"");for(var l=0,h=t.length;h>l;l++)t[l].compiled=g.replace(/\{\{([\w\-\.]+)(?:\|(\w+))?}}/g,function(e,i){return o.helper.namespace.call(o,i,t[l],"get","")}).trim();s.display?~s.display.indexOf("compiled")||s.display.unshift("compiled"):~this.options.display.indexOf("compiled")||this.options.display.unshift("compiled")}else;}this.options.callback.onPopulateSource&&(t=this.helper.executeCallback.call(this,this.options.callback.onPopulateSource,[this.node,t,e,i])),this.tmpSource[e]=Array.isArray(t)&&t||[];var m=this.options.source[e].cache,v=this.options.source[e].compression,b=this.options.source[e].ttl||this.options.ttl;if(m&&!window[m].getItem("TYPEAHEAD_"+this.selector+":"+e)){this.options.callback.onCacheSave&&(t=this.helper.executeCallback.call(this,this.options.callback.onCacheSave,[this.node,t,e,i]));var k=JSON.stringify({data:t,ttl:(new Date).getTime()+b});v&&(k=LZString.compressToUTF16(k)),window[m].setItem("TYPEAHEAD_"+this.selector+":"+e,k)}this.incrementGeneratedGroup()},incrementGeneratedGroup:function(){if(this.generatedGroupCount++,this.generatedGroupCount===this.generateGroups.length){this.xhr={};for(var t=0,e=this.generateGroups.length;e>t;t++)this.source[this.generateGroups[t]]=this.tmpSource[this.generateGroups[t]];this.hasDynamicGroups||this.buildDropdownItemLayout("dynamic"),this.options.loadingAnimation&&this.container.removeClass("loading"),this.node.trigger("search"+this.namespace)}},navigate:function(t){if(this.helper.executeCallback.call(this,this.options.callback.onNavigateBefore,[this.node,this.query,t]),27===t.keyCode)return t.preventDefault(),void(this.query.length?(this.resetInput(),this.node.trigger("input"+this.namespace,[t])):(this.node.blur(),this.hideLayout()));if(this.options.blurOnTab&&9===t.keyCode)return this.node.blur(),void this.hideLayout();if(this.result.length){var e=this.resultContainer.find("."+this.options.selector.item),i=e.filter(".active"),o=i[0]&&e.index(i)||null,s=null;if(13===t.keyCode)return void(i.length>0&&(t.preventDefault(),i.find("a:first").trigger("click",t)));if(39===t.keyCode)return void(o?e.eq(o).find("a:first")[0].click():this.options.hint&&""!==this.hint.container.val()&&this.helper.getCaret(this.node[0])>=this.query.length&&e.find('a[data-index="'+this.hintIndex+'"]')[0].click());e.length>0&&i.removeClass("active"),38===t.keyCode?(t.preventDefault(),i.length>0?o-1>=0&&(s=o-1,e.eq(s).addClass("active")):(s=e.length-1,e.last().addClass("active"))):40===t.keyCode&&(t.preventDefault(),i.length>0?o+1<e.length&&(s=o+1,e.eq(s).addClass("active")):(s=0,e.first().addClass("active"))),t.preventInputChange&&~[38,40].indexOf(t.keyCode)&&this.buildHintLayout(null!==s&&s<this.result.length?[this.result[s]]:null),this.options.hint&&this.hint.container&&this.hint.container.css("color",t.preventInputChange?this.hint.css.color:null===s&&this.hint.css.color||this.hint.container.css("background-color")||"fff"),this.node.val(null===s||t.preventInputChange?this.rawQuery:this.result[s][this.result[s].matchedKey]),this.helper.executeCallback.call(this,this.options.callback.onNavigateAfter,[this.node,e,null!==s&&e.eq(s).find("a:first")||void 0,null!==s&&this.result[s]||void 0,this.query,t])}},searchResult:function(t){t||(this.item={}),this.resetLayout(),this.helper.executeCallback.call(this,this.options.callback.onSearch,[this.node,this.query])!==!1&&(this.searchGroups.length&&this.searchResultData(),this.helper.executeCallback.call(this,this.options.callback.onResult,[this.node,this.query,this.result,this.resultCount,this.resultCountPerGroup]),this.isDropdownEvent&&(this.helper.executeCallback.call(this,this.options.callback.onDropdownFilter,[this.node,this.query,this.filters.dropdown,this.result]),this.isDropdownEvent=!1))},searchResultData:function(){var e,i,o,s,n,r,a,l,h,c,u,p,d,f=this,y=this.groupBy,g=null,m=this.query.toLowerCase(),v=this.options.maxItem,b=this.options.maxItemPerGroup,k=this.filters.dynamic&&!this.helper.isEmpty(this.filters.dynamic),w="function"==typeof this.options.matcher&&this.options.matcher;this.options.accent&&(m=this.helper.removeAccent.call(this,m));for(var x=0,C=this.searchGroups.length;C>x;++x)if(e=this.searchGroups[x],!this.filters.dropdown||"group"!==this.filters.dropdown.key||this.filters.dropdown.value===e){a="undefined"!=typeof this.options.source[e].filter?this.options.source[e].filter:this.options.filter,h="function"==typeof this.options.source[e].matcher&&this.options.source[e].matcher||w;for(var q=0,O=this.source[e].length;O>q&&(!(this.resultItemCount>=v)||this.options.callback.onResult);q++)if((!k||this.dynamicFilter.validate.apply(this,[this.source[e][q]]))&&(i=this.source[e][q],null!==i&&"boolean"!=typeof i&&(!this.filters.dropdown||(i[this.filters.dropdown.key]||"").toLowerCase()===(this.filters.dropdown.value||"").toLowerCase()))){if(g="group"===y?e:i[y]?i[y]:i.group,g&&!this.result[g]&&(this.result[g]=[],this.resultCountPerGroup[g]=0),b&&"group"===y&&this.result[g].length>=b&&!this.options.callback.onResult)break;n=this.options.source[e].display||this.options.display;for(var S=0,F=n.length;F>S;++S){if(a!==!1){if(r=/\./.test(n[S])?this.helper.namespace.call(this,n[S],i):i[n[S]],"undefined"==typeof r||""===r)continue;r=this.helper.cleanStringFromScript(r)}if("function"==typeof a){if(l=a.call(this,i,r),void 0===l)break;if(!l)continue;"object"==typeof l&&(i=l)}if(~[void 0,!0].indexOf(a)){if(s=r,s=s.toString().toLowerCase(),this.options.accent&&(s=this.helper.removeAccent.call(this,s)),o=s.indexOf(m),this.options.correlativeTemplate&&"compiled"===n[S]&&0>o&&/\s/.test(m)){u=!0,p=m.split(" "),d=s;for(var L=0,A=p.length;A>L;L++)if(""!==p[L]){if(!~d.indexOf(p[L])){u=!1;break}d=d.replace(p[L],"")}}if(0>o&&!u)continue;if(this.options.offset&&0!==o)continue;if(h){if(c=h.call(this,i,r),void 0===c)break;if(!c)continue;"object"==typeof c&&(i=c)}}if(this.resultCount++,this.resultCountPerGroup[g]++,this.resultItemCount<v){if(b&&this.result[g].length>=b)break;this.result[g].push(t.extend(!0,{matchedKey:n[S]},i)),this.resultItemCount++}break}if(!this.options.callback.onResult){if(this.resultItemCount>=v)break;if(b&&this.result[g].length>=b&&"group"===y)break}}}if(this.options.order){var j,n=[];for(var e in this.result)if(this.result.hasOwnProperty(e)){for(var x=0,C=this.result[e].length;C>x;x++)j=this.options.source[this.result[e][x].group].display||this.options.display,~n.indexOf(j[0])||n.push(j[0]);this.result[e].sort(f.helper.sort(n,"asc"===f.options.order,function(t){return t.toString().toUpperCase()}))}}var G=[],T=[];T="function"==typeof this.options.groupOrder?this.options.groupOrder.apply(this,[this.node,this.query,this.result,this.resultCount,this.resultCountPerGroup]):Array.isArray(this.options.groupOrder)?this.options.groupOrder:"string"==typeof this.options.groupOrder&&~["asc","desc"].indexOf(this.options.groupOrder)?Object.keys(this.result).sort(f.helper.sort([],"asc"===f.options.groupOrder,function(t){return t.toString().toUpperCase()})):Object.keys(this.result);for(var x=0,C=T.length;C>x;x++)G=G.concat(this.result[T[x]]||[]);this.groups=JSON.parse(JSON.stringify(T)),this.result=G},buildLayout:function(){if(this.buildHtmlLayout(),this.buildBackdropLayout(),this.buildHintLayout(),this.options.callback.onLayoutBuiltBefore){var e=this.helper.executeCallback.call(this,this.options.callback.onLayoutBuiltBefore,[this.node,this.query,this.result,this.resultHtml]);e instanceof t&&(this.resultHtml=e)}this.resultHtml&&this.resultContainer.html(this.resultHtml),this.options.callback.onLayoutBuiltAfter&&this.helper.executeCallback.call(this,this.options.callback.onLayoutBuiltAfter,[this.node,this.query,this.result])},buildHtmlLayout:function(){if(this.options.resultContainer!==!1){this.resultContainer||(this.resultContainer=t("<div/>",{"class":this.options.selector.result}),this.container.append(this.resultContainer));var e;if(!this.result.length){if(!this.options.emptyTemplate||""===this.query)return;e="function"==typeof this.options.emptyTemplate?this.options.emptyTemplate.call(this,this.query):this.options.emptyTemplate.replace(/\{\{query}}/gi,this.helper.cleanStringFromScript(this.query))}var i=this.query.toLowerCase();this.options.accent&&(i=this.helper.removeAccent.call(this,i));var o=this,s=this.groupTemplate||"<ul></ul>",n=!1;this.groupTemplate?s=t(s.replace(/<([^>]+)>\{\{(.+?)}}<\/[^>]+>/g,function(t,i,s,r,a){var l="",h="group"===s?o.groups:[s];if(!o.result.length)return n===!0?"":(n=!0,"<"+i+' class="'+o.options.selector.empty+'"><a href="javascript:;">'+e+"</a></"+i+">");for(var c=0,u=h.length;u>c;++c)l+="<"+i+' data-group-template="'+h[c]+'"><ul></ul></'+i+">";return l})):(s=t(s),this.result.length||s.append(e instanceof t?e:'<li class="'+o.options.selector.empty+'"><a href="javascript:;">'+e+"</a></li>")),s.addClass(this.options.selector.list+(this.helper.isEmpty(this.result)?" empty":""));for(var r,a,l,h,c,u,p,d,f,y,g,m,v=this.groupTemplate&&this.result.length&&o.groups||[],b=0,k=this.result.length;k>b;++b)l=this.result[b],r=l.group,h=this.options.source[l.group].href||this.options.href,f=[],y=this.options.source[l.group].display||this.options.display,this.options.group&&(r=l[this.options.group.key],this.options.group.template&&("function"==typeof this.options.group.template?a=this.options.group.template(l):"string"==typeof this.options.template&&(a=this.options.group.template.replace(/\{\{([\w\-\.]+)}}/gi,function(t,e){return o.helper.namespace.call(o,e,l,"get","")}))),s.find('[data-search-group="'+r+'"]')[0]||(this.groupTemplate?s.find('[data-group-template="'+r+'"] ul'):s).append(t("<li/>",{"class":o.options.selector.group,html:t("<a/>",{href:"javascript:;",html:a||r,tabindex:-1}),"data-search-group":r}))),this.groupTemplate&&v.length&&(m=v.indexOf(r||l.group),~m&&v.splice(m,1)),c=t("<li/>",{"class":o.options.selector.item+" "+o.options.selector.group+"-"+this.helper.slugify.call(this,r),html:t("<a/>",{href:function(){return h&&("string"==typeof h?h=h.replace(/\{\{([^\|}]+)(?:\|([^}]+))*}}/gi,function(t,e,i){var s=o.helper.namespace.call(o,e,l,"get","");return i=i&&i.split("|")||[],~i.indexOf("slugify")&&(s=o.helper.slugify.call(o,s)),s}):"function"==typeof h&&(h=h(l)),l.href=h),h||"javascript:;"}(),"data-group":r,"data-index":b,html:function(){if(u=l.group&&o.options.source[l.group].template||o.options.template)"function"==typeof u&&(u=u.call(o,o.query,l)),d=u.replace(/\{\{([^\|}]+)(?:\|([^}]+))*}}/gi,function(t,e,s){var n=o.helper.cleanStringFromScript(String(o.helper.namespace.call(o,e,l,"get","")));return s=s&&s.split("|")||[],~s.indexOf("slugify")&&(n=o.helper.slugify.call(o,n)),~s.indexOf("raw")||o.options.highlight===!0&&i&&~y.indexOf(e)&&(n=o.helper.highlight.call(o,n,i.split(" "),o.options.accent)),n});else{for(var e=0,s=y.length;s>e;e++)g=/\./.test(y[e])?o.helper.namespace.call(o,y[e],l,"get",""):l[y[e]],"undefined"!=typeof g&&""!==g&&f.push(g);d='<span class="'+o.options.selector.display+'">'+o.helper.cleanStringFromScript(String(f.join(" ")))+"</span>"}(o.options.highlight===!0&&i&&!u||"any"===o.options.highlight)&&(d=o.helper.highlight.call(o,d,i.split(" "),o.options.accent)),t(this).append(d)}})}),function(e,i,s){s.on("click",function(e,s){return s&&"object"==typeof s&&(e.originalEvent=s),o.options.mustSelectItem&&o.helper.isEmpty(i)?void e.preventDefault():(o.item=i,void(o.helper.executeCallback.call(o,o.options.callback.onClickBefore,[o.node,t(this),i,e])!==!1&&(e.originalEvent&&e.originalEvent.defaultPrevented||e.isDefaultPrevented()||(p=i.group&&o.options.source[i.group].templateValue||o.options.templateValue,"function"==typeof p&&(p=p.call(o)),o.query=o.rawQuery=p?p.replace(/\{\{([\w\-\.]+)}}/gi,function(t,e){return o.helper.namespace.call(o,e,i,"get","")}):o.helper.namespace.call(o,i.matchedKey,i).toString(),o.focusOnly=!0,o.node.val(o.query).focus(),o.searchResult(!0),o.buildLayout(),o.hideLayout(),o.helper.executeCallback.call(o,o.options.callback.onClickAfter,[o.node,t(this),i,e])))))}),s.on("mouseenter",function(e){o.helper.executeCallback.call(o,o.options.callback.onMouseEnter,[o.node,t(this),i,e])}),s.on("mouseleave",function(e){o.helper.executeCallback.call(o,o.options.callback.onMouseLeave,[o.node,t(this),i,e])})}(b,l,c),(this.groupTemplate?s.find('[data-group-template="'+r+'"] ul'):s).append(c);if(this.result.length&&v.length)for(var b=0,k=v.length;k>b;++b)s.find('[data-group-template="'+v[b]+'"]').remove();this.resultHtml=s}},buildBackdropLayout:function(){this.options.backdrop&&(this.backdrop.container||(this.backdrop.css=t.extend({opacity:.6,filter:"alpha(opacity=60)",position:"fixed",top:0,right:0,bottom:0,left:0,"z-index":1040,"background-color":"#000"},this.options.backdrop),this.backdrop.container=t("<div/>",{"class":this.options.selector.backdrop,css:this.backdrop.css}).insertAfter(this.container)),this.container.addClass("backdrop").css({"z-index":this.backdrop.css["z-index"]+1,position:"relative"}))},buildHintLayout:function(e){if(this.options.hint){if(this.node[0].scrollWidth>Math.ceil(this.node.innerWidth()))return void(this.hint.container&&this.hint.container.val(""));var i=this,o="",e=e||this.result,s=this.query.toLowerCase();if(this.options.accent&&(s=this.helper.removeAccent.call(this,s)),this.hintIndex=null,this.searchGroups.length){if(this.hint.container||(this.hint.css=t.extend({"border-color":"transparent",position:"absolute",top:0,display:"inline","z-index":-1,"float":"none",color:"silver","box-shadow":"none",cursor:"default","-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"},this.options.hint),this.hint.container=t("<input/>",{type:this.node.attr("type"),"class":this.node.attr("class"),readonly:!0,unselectable:"on","aria-hidden":"true",tabindex:-1,click:function(){i.node.focus()}}).addClass(this.options.selector.hint).css(this.hint.css).insertAfter(this.node),this.node.parent().css({position:"relative"})),this.hint.container.css("color",this.hint.css.color),s)for(var n,r,a,l=0,h=e.length;h>l;l++){r=e[l].group,n=this.options.source[r].display||this.options.display;for(var c=0,u=n.length;u>c;c++)if(a=String(e[l][n[c]]).toLowerCase(),this.options.accent&&(a=this.helper.removeAccent.call(this,a)),0===a.indexOf(s)){o=String(e[l][n[c]]),this.hintIndex=l;break}if(null!==this.hintIndex)break}this.hint.container.val(o.length>0&&this.rawQuery+o.substring(this.query.length)||"")}}},buildDropdownLayout:function(){if(this.options.dropdownFilter){var e=this;t("<span/>",{"class":this.options.selector.filter,html:function(){t(this).append(t("<button/>",{type:"button","class":e.options.selector.filterButton,style:"display: none;",click:function(i){i.stopPropagation(),e.container.toggleClass("filter");var o=e.namespace+"-dropdown-filter";t("html").off(o),e.container.hasClass("filter")&&t("html").on("click"+o+" touchend"+o,function(i){t(i.target).closest("."+e.options.selector.filter)[0]||e.hasDragged||e.container.removeClass("filter")})}})),t(this).append(t("<ul/>",{"class":e.options.selector.dropdown}))}}).insertAfter(e.container.find("."+e.options.selector.query))}},buildDropdownItemLayout:function(e){function i(t){"*"===t.value?delete this.filters.dropdown:this.filters.dropdown=t,this.container.removeClass("filter").find("."+this.options.selector.filterButton).html(t.template),this.isDropdownEvent=!0,this.node.trigger("search"+this.namespace),this.node.focus()}if(this.options.dropdownFilter){var o,s,n=this,r="string"==typeof this.options.dropdownFilter&&this.options.dropdownFilter||"All",a=this.container.find("."+this.options.selector.dropdown);"static"!==e||this.options.dropdownFilter!==!0&&"string"!=typeof this.options.dropdownFilter||this.dropdownFilter["static"].push({key:"group",template:"{{group}}",all:r,value:Object.keys(this.options.source)});for(var l=0,h=this.dropdownFilter[e].length;h>l;l++){s=this.dropdownFilter[e][l],Array.isArray(s.value)||(s.value=[s.value]),s.all&&(this.dropdownFilterAll=s.all);for(var c=0,u=s.value.length;u>=c;c++)(c!==u||l===h-1)&&(c===u&&l===h-1&&"static"===e&&this.dropdownFilter.dynamic.length||(o=this.dropdownFilterAll||r,s.value[c]?o=s.template?s.template.replace(new RegExp("{{"+s.key+"}}","gi"),s.value[c]):s.value[c]:this.container.find("."+n.options.selector.filterButton).html(o),function(e,o,s){a.append(t("<li/>",{"class":n.options.selector.dropdownItem+" "+n.helper.slugify.call(n,o.key+"-"+(o.value[e]||r)), -html:t("<a/>",{href:"javascript:;",html:s,click:function(t){t.preventDefault(),i.call(n,{key:o.key,value:o.value[e]||"*",template:s})}})}))}(c,s,o)))}this.dropdownFilter[e].length&&this.container.find("."+n.options.selector.filterButton).removeAttr("style")}},dynamicFilter:{isEnabled:!1,init:function(){this.options.dynamicFilter&&(this.dynamicFilter.bind.call(this),this.dynamicFilter.isEnabled=!0)},validate:function(t){var e,i,o=null,s=null;for(var n in this.filters.dynamic)if(this.filters.dynamic.hasOwnProperty(n)&&(i=~n.indexOf(".")?this.helper.namespace.call(this,n,t,"get"):t[n],"|"!==this.filters.dynamic[n].modifier||o||(o=i==this.filters.dynamic[n].value||!1),"&"===this.filters.dynamic[n].modifier)){if(i!=this.filters.dynamic[n].value){s=!1;break}s=!0}return e=o,null!==s&&(e=s,s===!0&&null!==o&&(e=o)),!!e},set:function(t,e){var i=t.match(/^([|&])?(.+)/);e?this.filters.dynamic[i[2]]={modifier:i[1]||"|",value:e}:delete this.filters.dynamic[i[2]],this.dynamicFilter.isEnabled&&this.generateSource()},bind:function(){for(var e,i=this,o=0,s=this.options.dynamicFilter.length;s>o;o++)e=this.options.dynamicFilter[o],"string"==typeof e.selector&&(e.selector=t(e.selector)),e.selector instanceof t&&e.selector[0]&&e.key&&!function(t){t.selector.off(i.namespace).on("change"+i.namespace,function(){i.dynamicFilter.set.apply(i,[t.key,i.dynamicFilter.getValue(this)])}).trigger("change"+i.namespace)}(e)},getValue:function(t){var e;return"SELECT"===t.tagName?e=t.value:"INPUT"===t.tagName&&("checkbox"===t.type?e=t.checked&&t.getAttribute("value")||t.checked||null:"radio"===t.type&&t.checked&&(e=t.value)),e}},showLayout:function(){function e(){var e=this;t("html").off("keydown"+this.namespace).on("keydown"+this.namespace,function(i){i.keyCode&&9===i.keyCode&&setTimeout(function(){t(":focus").closest(e.container).find(e.node)[0]||e.hideLayout()},0)}),t("html").off("click"+this.namespace+" touchend"+this.namespace).on("click"+this.namespace+" touchend"+this.namespace,function(i){t(i.target).closest(e.container)[0]||e.hasDragged||e.hideLayout()})}this.container.hasClass("result")||(this.result.length||this.options.emptyTemplate||this.options.backdropOnFocus)&&(e.call(this),this.container.addClass([this.result.length||this.searchGroups.length&&this.options.emptyTemplate&&this.query.length?"result ":"",this.options.hint&&this.searchGroups.length?"hint":"",this.options.backdrop||this.options.backdropOnFocus?"backdrop":""].join(" ")),this.helper.executeCallback.call(this,this.options.callback.onShowLayout,[this.node,this.query]))},hideLayout:function(){(this.container.hasClass("result")||this.container.hasClass("backdrop"))&&(this.container.removeClass("result hint filter"+(this.options.backdropOnFocus&&t(this.node).is(":focus")?"":" backdrop")),this.options.backdropOnFocus&&this.container.hasClass("backdrop")||(t("html").off(this.namespace),this.helper.executeCallback.call(this,this.options.callback.onHideLayout,[this.node,this.query])))},resetLayout:function(){this.result={},this.groups=[],this.resultCount=0,this.resultCountPerGroup={},this.resultItemCount=0,this.resultHtml=null,this.options.hint&&this.hint.container&&this.hint.container.val("")},resetInput:function(){this.node.val(""),this.item=null,this.query="",this.rawQuery=""},buildCancelButtonLayout:function(){if(this.options.cancelButton){var e=this;t("<span/>",{"class":this.options.selector.cancelButton,mousedown:function(t){t.stopImmediatePropagation(),t.preventDefault(),e.resetInput(),e.node.trigger("input"+e.namespace,[t])}}).insertBefore(this.node)}},toggleCancelButtonVisibility:function(){this.container.toggleClass("cancel",!!this.query.length)},__construct:function(){this.extendOptions(),this.unifySourceFormat()&&(this.dynamicFilter.init.apply(this),this.init(),this.buildDropdownLayout(),this.buildDropdownItemLayout("static"),this.delegateEvents(),this.buildCancelButtonLayout(),this.helper.executeCallback.call(this,this.options.callback.onReady,[this.node]))},helper:{isEmpty:function(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0},removeAccent:function(t){if("string"==typeof t){var e=o;return"object"==typeof this.options.accent&&(e=this.options.accent),t=t.toLowerCase().replace(new RegExp("["+e.from+"]","g"),function(t){return e.to[e.from.indexOf(t)]})}},slugify:function(t){return t=String(t),""!==t&&(t=this.helper.removeAccent.call(this,t),t=t.replace(/[^-a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")),t},sort:function(t,e,i){var o=function(e){for(var o=0,s=t.length;s>o;o++)if("undefined"!=typeof e[t[o]])return i(e[t[o]]);return e};return e=[-1,1][+!!e],function(t,i){return t=o(t),i=o(i),e*((t>i)-(i>t))}},replaceAt:function(t,e,i,o){return t.substring(0,e)+o+t.substring(e+i)},highlight:function(t,e,i){t=String(t);var o=i&&this.helper.removeAccent.call(this,t)||t,s=[];Array.isArray(e)||(e=[e]),e.sort(function(t,e){return e.length-t.length});for(var n=e.length-1;n>=0;n--)""!==e[n].trim()?e[n]=e[n].replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e.splice(n,1);o.replace(new RegExp("(?:"+e.join("|")+")(?!([^<]+)?>)","gi"),function(t,e,i){s.push({offset:i,length:t.length})});for(var n=s.length-1;n>=0;n--)t=this.helper.replaceAt(t,s[n].offset,s[n].length,"<strong>"+t.substr(s[n].offset,s[n].length)+"</strong>");return t},getCaret:function(t){if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange();if(null===e)return 0;var i=t.createTextRange(),o=i.duplicate();return i.moveToBookmark(e.getBookmark()),o.setEndPoint("EndToStart",i),o.text.length}return 0},cleanStringFromScript:function(t){return"string"==typeof t&&t.replace(/<\/?(?:script|iframe)\b[^>]*>/gm,"")||t},executeCallback:function(t,e){if(t){var i;if("function"==typeof t)i=t;else if(("string"==typeof t||Array.isArray(t))&&("string"==typeof t&&(t=[t,[]]),i=this.helper.namespace.call(this,t[0],window),"function"!=typeof i))return;return i.apply(this,(t[1]||[]).concat(e?e:[]))}},namespace:function(t,e,i,o){if("string"!=typeof t||""===t)return!1;var s="undefined"!=typeof o?o:void 0;if(!~t.indexOf("."))return e[t]||s;for(var n=t.split("."),r=e||window,i=i||"get",a="",l=0,h=n.length;h>l;l++){if(a=n[l],"undefined"==typeof r[a]){if(~["get","delete"].indexOf(i))return"undefined"!=typeof o?o:void 0;r[a]={}}if(~["set","create","delete"].indexOf(i)&&l===h-1){if("set"!==i&&"create"!==i)return delete r[a],!0;r[a]=s}r=r[a]}return r},typeWatch:function(){var t=0;return function(e,i){clearTimeout(t),t=setTimeout(e,i)}}()}},t.fn.typeahead=t.typeahead=function(t){return l.typeahead(this,t)};var l={typeahead:function(e,i){if(i&&i.source&&"object"==typeof i.source){if("function"==typeof e){if(!i.input)return;e=t(i.input)}if(e.length&&"INPUT"===e[0].nodeName){if(1===e.length)return e[0].selector=e.selector||i.input||e[0].nodeName.toLowerCase(),window.Typeahead[e[0].selector]=new a(e,i);for(var o,s={},n=0,r=e.length;r>n;++n)o=e[n].nodeName.toLowerCase(),"undefined"!=typeof s[o]&&(o+=n),e[n].selector=o,window.Typeahead[o]=s[o]=new a(e.eq(n),i);return s}}}};return window.console=window.console||{log:function(){}},Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),"trim"in String.prototype||(String.prototype.trim=function(){return this.replace(/^\s+/,"").replace(/\s+$/,"")}),"indexOf"in Array.prototype||(Array.prototype.indexOf=function(t,e){void 0===e&&(e=0),0>e&&(e+=this.length),0>e&&(e=0);for(var i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1}),Object.keys||(Object.keys=function(t){var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}),a}); \ No newline at end of file diff --git a/apps/maarch_entreprise/merged_css.php b/apps/maarch_entreprise/merged_css.php index 0bdd473873f..98d5b07f235 100644 --- a/apps/maarch_entreprise/merged_css.php +++ b/apps/maarch_entreprise/merged_css.php @@ -45,8 +45,8 @@ foreach (array_keys($_SESSION['modules_loaded']) as $value) { include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/doctype_levels.css'; include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/chosen.min.css'; include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/bootstrapTree.css'; -include_once 'apps/' . $_SESSION['config']['app_id'] . '/css/jquery.typeahead.min.css'; +readfile('node_modules/jquery-typeahead/dist/jquery.typeahead.min.css'); readfile('node_modules/tooltipster/dist/css/tooltipster.bundle.min.css'); readfile('node_modules/photoswipe/dist/photoswipe.css'); readfile('node_modules/photoswipe/dist/default-skin/default-skin.css'); diff --git a/apps/maarch_entreprise/merged_jsAbstract.php b/apps/maarch_entreprise/merged_jsAbstract.php index bec0c5f3447..ecc793ac5a2 100644 --- a/apps/maarch_entreprise/merged_jsAbstract.php +++ b/apps/maarch_entreprise/merged_jsAbstract.php @@ -62,6 +62,7 @@ class MergedJsAbstract { readfile('node_modules/tinymce/tinymce.min.js'); readfile('node_modules/jquery.nicescroll/jquery.nicescroll.min.js'); readfile('node_modules/tooltipster/dist/js/tooltipster.bundle.min.js'); + readfile('node_modules/jquery-typeahead/dist/jquery.typeahead.min.js'); readfile('apps/maarch_entreprise/js/chosen.jquery.min.js'); @@ -72,7 +73,6 @@ class MergedJsAbstract { //Maarch include('apps/maarch_entreprise/js/functions.js'); include('apps/maarch_entreprise/js/indexing.js'); - include('apps/maarch_entreprise/js/jquery.typeahead.min.js'); // include('apps/maarch_entreprise/js/RSVP.js'); // include('apps/maarch_entreprise/js/render.js'); // include('apps/maarch_entreprise/js/jio.js'); diff --git a/package.json b/package.json index df0ba7947d9..6b32e7f6888 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "core-js": "^2.4.1", "jquery": "^3.2.1", "jquery.nicescroll": "^3.6.8", + "jquery-typeahead": "^2.8.0", "photoswipe": "^4.1.2", "tinymce": "^4.6.2", "tooltipster": "^4.2.5", -- GitLab