├── Body-4 ├── img1.webp ├── img2.webp └── img3.webp ├── Header ├── logo.webp ├── magnifying-glass-solid.svg └── cart-shopping-solid.svg ├── Slider ├── img1.webp ├── img2.webp └── img3.webp ├── Body-Part3With-Cards-Btn ├── card1.webp ├── card2.webp └── card3.webp ├── Card ├── 0cdc03af-9732-4d0c-9174-f4e66953b3c8.webp ├── 11771dbf-36a1-4684-a55e-18af61e0f77c.webp ├── 31b37f0c-5936-4232-a55e-8042c2656526.webp ├── 5653706f-83e4-42bb-99f9-4a64e9a1101a.webp ├── 9f2b5abf-88a1-4f49-9f98-c3dfee664e40.webp ├── a860f757-114b-4453-ba86-f7b24dc0f24e.webp └── baaaf1e6-1c6a-464b-9ba6-58577855f10d.webp ├── style.css ├── index.html └── bootstrap.min.js /Body-4/img1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-4/img1.webp -------------------------------------------------------------------------------- /Body-4/img2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-4/img2.webp -------------------------------------------------------------------------------- /Body-4/img3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-4/img3.webp -------------------------------------------------------------------------------- /Header/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Header/logo.webp -------------------------------------------------------------------------------- /Slider/img1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Slider/img1.webp -------------------------------------------------------------------------------- /Slider/img2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Slider/img2.webp -------------------------------------------------------------------------------- /Slider/img3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Slider/img3.webp -------------------------------------------------------------------------------- /Body-Part3With-Cards-Btn/card1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-Part3With-Cards-Btn/card1.webp -------------------------------------------------------------------------------- /Body-Part3With-Cards-Btn/card2.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-Part3With-Cards-Btn/card2.webp -------------------------------------------------------------------------------- /Body-Part3With-Cards-Btn/card3.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Body-Part3With-Cards-Btn/card3.webp -------------------------------------------------------------------------------- /Card/0cdc03af-9732-4d0c-9174-f4e66953b3c8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/0cdc03af-9732-4d0c-9174-f4e66953b3c8.webp -------------------------------------------------------------------------------- /Card/11771dbf-36a1-4684-a55e-18af61e0f77c.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/11771dbf-36a1-4684-a55e-18af61e0f77c.webp -------------------------------------------------------------------------------- /Card/31b37f0c-5936-4232-a55e-8042c2656526.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/31b37f0c-5936-4232-a55e-8042c2656526.webp -------------------------------------------------------------------------------- /Card/5653706f-83e4-42bb-99f9-4a64e9a1101a.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/5653706f-83e4-42bb-99f9-4a64e9a1101a.webp -------------------------------------------------------------------------------- /Card/9f2b5abf-88a1-4f49-9f98-c3dfee664e40.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/9f2b5abf-88a1-4f49-9f98-c3dfee664e40.webp -------------------------------------------------------------------------------- /Card/a860f757-114b-4453-ba86-f7b24dc0f24e.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/a860f757-114b-4453-ba86-f7b24dc0f24e.webp -------------------------------------------------------------------------------- /Card/baaaf1e6-1c6a-464b-9ba6-58577855f10d.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/umarprogrammer19/Class-Test-Hackathon/HEAD/Card/baaaf1e6-1c6a-464b-9ba6-58577855f10d.webp -------------------------------------------------------------------------------- /Header/magnifying-glass-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Header/cart-shopping-solid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | .main { 8 | height: 90px; 9 | background-color: black; 10 | } 11 | 12 | .main .navb { 13 | height: 100%; 14 | } 15 | 16 | .main .navb a { 17 | text-decoration: none; 18 | font-size: 15px; 19 | } 20 | 21 | .main .navb .logon a img { 22 | width: 160px; 23 | height: 80px; 24 | } 25 | 26 | .main .navb a img { 27 | height: 15px; 28 | width: 15px; 29 | } 30 | 31 | .main .navb .logon .logo { 32 | font-size: 28px; 33 | color: #666666; 34 | } 35 | 36 | .main2{ 37 | background-color: black; 38 | height: 700px; 39 | } 40 | 41 | .main2 div h1 span{ 42 | font-size: 65px; 43 | } 44 | 45 | .main3 .div2 .btn1{ 46 | width: 180px !important; 47 | height: 40px !important; 48 | } 49 | 50 | .main3 .div2 div .ina{ 51 | letter-spacing: 10px !important; 52 | } 53 | 54 | 55 | .main4 .cards img{ 56 | width: 330px; 57 | height: 250px; 58 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Final Test 7 | 8 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 | 40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | 78 | 79 | 80 | 81 |
84 |
87 |

88 | Welcome to 89 | Salt'n Pepper
Restaurants! Our 90 | Brands. 91 |

92 |

93 | Please click our brands below for further information, reservations or 94 | to order online! 95 |

96 |
97 | 98 |
99 |
100 |
103 | 104 |
105 | Order Now 108 |
109 | 110 |
111 |
114 | 115 |
116 | Order Now 119 |
120 | 121 |
122 |
125 | 126 |
127 | Reserve A Table 130 |
131 |
132 |
133 | 134 | 135 | 136 | 137 |
138 |
139 |

Salt'n Pepper

140 |

Restaurant Franchises

141 |

142 | Each of our franchises are individually managed. For further details, 143 | kindly contact them directly. 144 |

145 |
146 |
147 |
148 |

ISLAMABAD

149 |

150 | Salt'n Pepper Restaurant 151 |

152 |

153 | 154 | Plot# 55, Shabbir Plaza, Blue Area, F-6, Islamabad 155 |

156 |

157 | Ph: 158 | 051-2604904-6 159 |

160 | Get Directions   162 | 164 |
165 |
166 | 167 |
168 |
169 | 170 |
173 |
174 |

FAISLABAD

175 |

176 | Salt'n Pepper Restaurant 177 |

178 |

179 | 180 | 4-Kohinoor City, Faisalabad 181 |

182 |

183 | Ph: 184 | 051-2604904-6 185 |

186 | Get Directions   188 | 190 |
191 |
192 | 193 |
194 |
195 | 196 |
197 |
198 |

BHAWALPUR

199 |

200 | Salt'n Pepper Restaurant 201 |

202 |

203 | 204 | D.C Chowk, opposite Commissioner House, Bahawalpur 205 |

206 |

207 | Ph: 208 | 051-2604904-6 209 |

210 | Get Directions   212 | 214 |
215 |
216 | 217 |
218 |
219 |
220 | 221 | 222 | 223 |
224 | 225 |
228 |

229 | Salt'n Pepper
230 | Express Franchises

231 |

232 | 233 |
234 |
235 |
236 |
237 |

238 | 239 |
240 |
241 |
242 |
243 |

244 | 245 |
246 |
247 |
248 |
249 |

250 | 251 | 252 |
253 | 254 | 255 | 256 | 257 | -------------------------------------------------------------------------------- /bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v5.3.2 (https://getbootstrap.com/) 3 | * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5 | */ 6 | !(function (t, e) { 7 | "object" == typeof exports && "undefined" != typeof module 8 | ? (module.exports = e(require("@popperjs/core"))) 9 | : "function" == typeof define && define.amd 10 | ? define(["@popperjs/core"], e) 11 | : ((t = 12 | "undefined" != typeof globalThis ? globalThis : t || self).bootstrap = 13 | e(t.Popper)); 14 | })(this, function (t) { 15 | "use strict"; 16 | function e(t) { 17 | const e = Object.create(null, { 18 | [Symbol.toStringTag]: { value: "Module" }, 19 | }); 20 | if (t) 21 | for (const i in t) 22 | if ("default" !== i) { 23 | const s = Object.getOwnPropertyDescriptor(t, i); 24 | Object.defineProperty( 25 | e, 26 | i, 27 | s.get ? s : { enumerable: !0, get: () => t[i] } 28 | ); 29 | } 30 | return (e.default = t), Object.freeze(e); 31 | } 32 | const i = e(t), 33 | s = new Map(), 34 | n = { 35 | set(t, e, i) { 36 | s.has(t) || s.set(t, new Map()); 37 | const n = s.get(t); 38 | n.has(e) || 0 === n.size 39 | ? n.set(e, i) 40 | : console.error( 41 | `Bootstrap doesn't allow more than one instance per element. Bound instance: ${ 42 | Array.from(n.keys())[0] 43 | }.` 44 | ); 45 | }, 46 | get: (t, e) => (s.has(t) && s.get(t).get(e)) || null, 47 | remove(t, e) { 48 | if (!s.has(t)) return; 49 | const i = s.get(t); 50 | i.delete(e), 0 === i.size && s.delete(t); 51 | }, 52 | }, 53 | o = "transitionend", 54 | r = (t) => ( 55 | t && 56 | window.CSS && 57 | window.CSS.escape && 58 | (t = t.replace(/#([^\s"#']+)/g, (t, e) => `#${CSS.escape(e)}`)), 59 | t 60 | ), 61 | a = (t) => { 62 | t.dispatchEvent(new Event(o)); 63 | }, 64 | l = (t) => 65 | !(!t || "object" != typeof t) && 66 | (void 0 !== t.jquery && (t = t[0]), void 0 !== t.nodeType), 67 | c = (t) => 68 | l(t) 69 | ? t.jquery 70 | ? t[0] 71 | : t 72 | : "string" == typeof t && t.length > 0 73 | ? document.querySelector(r(t)) 74 | : null, 75 | h = (t) => { 76 | if (!l(t) || 0 === t.getClientRects().length) return !1; 77 | const e = 78 | "visible" === getComputedStyle(t).getPropertyValue("visibility"), 79 | i = t.closest("details:not([open])"); 80 | if (!i) return e; 81 | if (i !== t) { 82 | const e = t.closest("summary"); 83 | if (e && e.parentNode !== i) return !1; 84 | if (null === e) return !1; 85 | } 86 | return e; 87 | }, 88 | d = (t) => 89 | !t || 90 | t.nodeType !== Node.ELEMENT_NODE || 91 | !!t.classList.contains("disabled") || 92 | (void 0 !== t.disabled 93 | ? t.disabled 94 | : t.hasAttribute("disabled") && "false" !== t.getAttribute("disabled")), 95 | u = (t) => { 96 | if (!document.documentElement.attachShadow) return null; 97 | if ("function" == typeof t.getRootNode) { 98 | const e = t.getRootNode(); 99 | return e instanceof ShadowRoot ? e : null; 100 | } 101 | return t instanceof ShadowRoot 102 | ? t 103 | : t.parentNode 104 | ? u(t.parentNode) 105 | : null; 106 | }, 107 | _ = () => {}, 108 | g = (t) => { 109 | t.offsetHeight; 110 | }, 111 | f = () => 112 | window.jQuery && !document.body.hasAttribute("data-bs-no-jquery") 113 | ? window.jQuery 114 | : null, 115 | m = [], 116 | p = () => "rtl" === document.documentElement.dir, 117 | b = (t) => { 118 | var e; 119 | (e = () => { 120 | const e = f(); 121 | if (e) { 122 | const i = t.NAME, 123 | s = e.fn[i]; 124 | (e.fn[i] = t.jQueryInterface), 125 | (e.fn[i].Constructor = t), 126 | (e.fn[i].noConflict = () => ((e.fn[i] = s), t.jQueryInterface)); 127 | } 128 | }), 129 | "loading" === document.readyState 130 | ? (m.length || 131 | document.addEventListener("DOMContentLoaded", () => { 132 | for (const t of m) t(); 133 | }), 134 | m.push(e)) 135 | : e(); 136 | }, 137 | v = (t, e = [], i = t) => ("function" == typeof t ? t(...e) : i), 138 | y = (t, e, i = !0) => { 139 | if (!i) return void v(t); 140 | const s = 141 | ((t) => { 142 | if (!t) return 0; 143 | let { transitionDuration: e, transitionDelay: i } = 144 | window.getComputedStyle(t); 145 | const s = Number.parseFloat(e), 146 | n = Number.parseFloat(i); 147 | return s || n 148 | ? ((e = e.split(",")[0]), 149 | (i = i.split(",")[0]), 150 | 1e3 * (Number.parseFloat(e) + Number.parseFloat(i))) 151 | : 0; 152 | })(e) + 5; 153 | let n = !1; 154 | const r = ({ target: i }) => { 155 | i === e && ((n = !0), e.removeEventListener(o, r), v(t)); 156 | }; 157 | e.addEventListener(o, r), 158 | setTimeout(() => { 159 | n || a(e); 160 | }, s); 161 | }, 162 | w = (t, e, i, s) => { 163 | const n = t.length; 164 | let o = t.indexOf(e); 165 | return -1 === o 166 | ? !i && s 167 | ? t[n - 1] 168 | : t[0] 169 | : ((o += i ? 1 : -1), 170 | s && (o = (o + n) % n), 171 | t[Math.max(0, Math.min(o, n - 1))]); 172 | }, 173 | A = /[^.]*(?=\..*)\.|.*/, 174 | E = /\..*/, 175 | C = /::\d+$/, 176 | T = {}; 177 | let k = 1; 178 | const $ = { mouseenter: "mouseover", mouseleave: "mouseout" }, 179 | S = new Set([ 180 | "click", 181 | "dblclick", 182 | "mouseup", 183 | "mousedown", 184 | "contextmenu", 185 | "mousewheel", 186 | "DOMMouseScroll", 187 | "mouseover", 188 | "mouseout", 189 | "mousemove", 190 | "selectstart", 191 | "selectend", 192 | "keydown", 193 | "keypress", 194 | "keyup", 195 | "orientationchange", 196 | "touchstart", 197 | "touchmove", 198 | "touchend", 199 | "touchcancel", 200 | "pointerdown", 201 | "pointermove", 202 | "pointerup", 203 | "pointerleave", 204 | "pointercancel", 205 | "gesturestart", 206 | "gesturechange", 207 | "gestureend", 208 | "focus", 209 | "blur", 210 | "change", 211 | "reset", 212 | "select", 213 | "submit", 214 | "focusin", 215 | "focusout", 216 | "load", 217 | "unload", 218 | "beforeunload", 219 | "resize", 220 | "move", 221 | "DOMContentLoaded", 222 | "readystatechange", 223 | "error", 224 | "abort", 225 | "scroll", 226 | ]); 227 | function L(t, e) { 228 | return (e && `${e}::${k++}`) || t.uidEvent || k++; 229 | } 230 | function O(t) { 231 | const e = L(t); 232 | return (t.uidEvent = e), (T[e] = T[e] || {}), T[e]; 233 | } 234 | function I(t, e, i = null) { 235 | return Object.values(t).find( 236 | (t) => t.callable === e && t.delegationSelector === i 237 | ); 238 | } 239 | function D(t, e, i) { 240 | const s = "string" == typeof e, 241 | n = s ? i : e || i; 242 | let o = M(t); 243 | return S.has(o) || (o = t), [s, n, o]; 244 | } 245 | function N(t, e, i, s, n) { 246 | if ("string" != typeof e || !t) return; 247 | let [o, r, a] = D(e, i, s); 248 | if (e in $) { 249 | const t = (t) => 250 | function (e) { 251 | if ( 252 | !e.relatedTarget || 253 | (e.relatedTarget !== e.delegateTarget && 254 | !e.delegateTarget.contains(e.relatedTarget)) 255 | ) 256 | return t.call(this, e); 257 | }; 258 | r = t(r); 259 | } 260 | const l = O(t), 261 | c = l[a] || (l[a] = {}), 262 | h = I(c, r, o ? i : null); 263 | if (h) return void (h.oneOff = h.oneOff && n); 264 | const d = L(r, e.replace(A, "")), 265 | u = o 266 | ? (function (t, e, i) { 267 | return function s(n) { 268 | const o = t.querySelectorAll(e); 269 | for (let { target: r } = n; r && r !== this; r = r.parentNode) 270 | for (const a of o) 271 | if (a === r) 272 | return ( 273 | F(n, { delegateTarget: r }), 274 | s.oneOff && j.off(t, n.type, e, i), 275 | i.apply(r, [n]) 276 | ); 277 | }; 278 | })(t, i, r) 279 | : (function (t, e) { 280 | return function i(s) { 281 | return ( 282 | F(s, { delegateTarget: t }), 283 | i.oneOff && j.off(t, s.type, e), 284 | e.apply(t, [s]) 285 | ); 286 | }; 287 | })(t, r); 288 | (u.delegationSelector = o ? i : null), 289 | (u.callable = r), 290 | (u.oneOff = n), 291 | (u.uidEvent = d), 292 | (c[d] = u), 293 | t.addEventListener(a, u, o); 294 | } 295 | function P(t, e, i, s, n) { 296 | const o = I(e[i], s, n); 297 | o && (t.removeEventListener(i, o, Boolean(n)), delete e[i][o.uidEvent]); 298 | } 299 | function x(t, e, i, s) { 300 | const n = e[i] || {}; 301 | for (const [o, r] of Object.entries(n)) 302 | o.includes(s) && P(t, e, i, r.callable, r.delegationSelector); 303 | } 304 | function M(t) { 305 | return (t = t.replace(E, "")), $[t] || t; 306 | } 307 | const j = { 308 | on(t, e, i, s) { 309 | N(t, e, i, s, !1); 310 | }, 311 | one(t, e, i, s) { 312 | N(t, e, i, s, !0); 313 | }, 314 | off(t, e, i, s) { 315 | if ("string" != typeof e || !t) return; 316 | const [n, o, r] = D(e, i, s), 317 | a = r !== e, 318 | l = O(t), 319 | c = l[r] || {}, 320 | h = e.startsWith("."); 321 | if (void 0 === o) { 322 | if (h) for (const i of Object.keys(l)) x(t, l, i, e.slice(1)); 323 | for (const [i, s] of Object.entries(c)) { 324 | const n = i.replace(C, ""); 325 | (a && !e.includes(n)) || P(t, l, r, s.callable, s.delegationSelector); 326 | } 327 | } else { 328 | if (!Object.keys(c).length) return; 329 | P(t, l, r, o, n ? i : null); 330 | } 331 | }, 332 | trigger(t, e, i) { 333 | if ("string" != typeof e || !t) return null; 334 | const s = f(); 335 | let n = null, 336 | o = !0, 337 | r = !0, 338 | a = !1; 339 | e !== M(e) && 340 | s && 341 | ((n = s.Event(e, i)), 342 | s(t).trigger(n), 343 | (o = !n.isPropagationStopped()), 344 | (r = !n.isImmediatePropagationStopped()), 345 | (a = n.isDefaultPrevented())); 346 | const l = F(new Event(e, { bubbles: o, cancelable: !0 }), i); 347 | return ( 348 | a && l.preventDefault(), 349 | r && t.dispatchEvent(l), 350 | l.defaultPrevented && n && n.preventDefault(), 351 | l 352 | ); 353 | }, 354 | }; 355 | function F(t, e = {}) { 356 | for (const [i, s] of Object.entries(e)) 357 | try { 358 | t[i] = s; 359 | } catch (e) { 360 | Object.defineProperty(t, i, { configurable: !0, get: () => s }); 361 | } 362 | return t; 363 | } 364 | function z(t) { 365 | if ("true" === t) return !0; 366 | if ("false" === t) return !1; 367 | if (t === Number(t).toString()) return Number(t); 368 | if ("" === t || "null" === t) return null; 369 | if ("string" != typeof t) return t; 370 | try { 371 | return JSON.parse(decodeURIComponent(t)); 372 | } catch (e) { 373 | return t; 374 | } 375 | } 376 | function H(t) { 377 | return t.replace(/[A-Z]/g, (t) => `-${t.toLowerCase()}`); 378 | } 379 | const B = { 380 | setDataAttribute(t, e, i) { 381 | t.setAttribute(`data-bs-${H(e)}`, i); 382 | }, 383 | removeDataAttribute(t, e) { 384 | t.removeAttribute(`data-bs-${H(e)}`); 385 | }, 386 | getDataAttributes(t) { 387 | if (!t) return {}; 388 | const e = {}, 389 | i = Object.keys(t.dataset).filter( 390 | (t) => t.startsWith("bs") && !t.startsWith("bsConfig") 391 | ); 392 | for (const s of i) { 393 | let i = s.replace(/^bs/, ""); 394 | (i = i.charAt(0).toLowerCase() + i.slice(1, i.length)), 395 | (e[i] = z(t.dataset[s])); 396 | } 397 | return e; 398 | }, 399 | getDataAttribute: (t, e) => z(t.getAttribute(`data-bs-${H(e)}`)), 400 | }; 401 | class q { 402 | static get Default() { 403 | return {}; 404 | } 405 | static get DefaultType() { 406 | return {}; 407 | } 408 | static get NAME() { 409 | throw new Error( 410 | 'You have to implement the static method "NAME", for each component!' 411 | ); 412 | } 413 | _getConfig(t) { 414 | return ( 415 | (t = this._mergeConfigObj(t)), 416 | (t = this._configAfterMerge(t)), 417 | this._typeCheckConfig(t), 418 | t 419 | ); 420 | } 421 | _configAfterMerge(t) { 422 | return t; 423 | } 424 | _mergeConfigObj(t, e) { 425 | const i = l(e) ? B.getDataAttribute(e, "config") : {}; 426 | return { 427 | ...this.constructor.Default, 428 | ...("object" == typeof i ? i : {}), 429 | ...(l(e) ? B.getDataAttributes(e) : {}), 430 | ...("object" == typeof t ? t : {}), 431 | }; 432 | } 433 | _typeCheckConfig(t, e = this.constructor.DefaultType) { 434 | for (const [s, n] of Object.entries(e)) { 435 | const e = t[s], 436 | o = l(e) 437 | ? "element" 438 | : null == (i = e) 439 | ? `${i}` 440 | : Object.prototype.toString 441 | .call(i) 442 | .match(/\s([a-z]+)/i)[1] 443 | .toLowerCase(); 444 | if (!new RegExp(n).test(o)) 445 | throw new TypeError( 446 | `${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${n}".` 447 | ); 448 | } 449 | var i; 450 | } 451 | } 452 | class W extends q { 453 | constructor(t, e) { 454 | super(), 455 | (t = c(t)) && 456 | ((this._element = t), 457 | (this._config = this._getConfig(e)), 458 | n.set(this._element, this.constructor.DATA_KEY, this)); 459 | } 460 | dispose() { 461 | n.remove(this._element, this.constructor.DATA_KEY), 462 | j.off(this._element, this.constructor.EVENT_KEY); 463 | for (const t of Object.getOwnPropertyNames(this)) this[t] = null; 464 | } 465 | _queueCallback(t, e, i = !0) { 466 | y(t, e, i); 467 | } 468 | _getConfig(t) { 469 | return ( 470 | (t = this._mergeConfigObj(t, this._element)), 471 | (t = this._configAfterMerge(t)), 472 | this._typeCheckConfig(t), 473 | t 474 | ); 475 | } 476 | static getInstance(t) { 477 | return n.get(c(t), this.DATA_KEY); 478 | } 479 | static getOrCreateInstance(t, e = {}) { 480 | return ( 481 | this.getInstance(t) || new this(t, "object" == typeof e ? e : null) 482 | ); 483 | } 484 | static get VERSION() { 485 | return "5.3.2"; 486 | } 487 | static get DATA_KEY() { 488 | return `bs.${this.NAME}`; 489 | } 490 | static get EVENT_KEY() { 491 | return `.${this.DATA_KEY}`; 492 | } 493 | static eventName(t) { 494 | return `${t}${this.EVENT_KEY}`; 495 | } 496 | } 497 | const R = (t) => { 498 | let e = t.getAttribute("data-bs-target"); 499 | if (!e || "#" === e) { 500 | let i = t.getAttribute("href"); 501 | if (!i || (!i.includes("#") && !i.startsWith("."))) return null; 502 | i.includes("#") && !i.startsWith("#") && (i = `#${i.split("#")[1]}`), 503 | (e = i && "#" !== i ? r(i.trim()) : null); 504 | } 505 | return e; 506 | }, 507 | K = { 508 | find: (t, e = document.documentElement) => 509 | [].concat(...Element.prototype.querySelectorAll.call(e, t)), 510 | findOne: (t, e = document.documentElement) => 511 | Element.prototype.querySelector.call(e, t), 512 | children: (t, e) => [].concat(...t.children).filter((t) => t.matches(e)), 513 | parents(t, e) { 514 | const i = []; 515 | let s = t.parentNode.closest(e); 516 | for (; s; ) i.push(s), (s = s.parentNode.closest(e)); 517 | return i; 518 | }, 519 | prev(t, e) { 520 | let i = t.previousElementSibling; 521 | for (; i; ) { 522 | if (i.matches(e)) return [i]; 523 | i = i.previousElementSibling; 524 | } 525 | return []; 526 | }, 527 | next(t, e) { 528 | let i = t.nextElementSibling; 529 | for (; i; ) { 530 | if (i.matches(e)) return [i]; 531 | i = i.nextElementSibling; 532 | } 533 | return []; 534 | }, 535 | focusableChildren(t) { 536 | const e = [ 537 | "a", 538 | "button", 539 | "input", 540 | "textarea", 541 | "select", 542 | "details", 543 | "[tabindex]", 544 | '[contenteditable="true"]', 545 | ] 546 | .map((t) => `${t}:not([tabindex^="-"])`) 547 | .join(","); 548 | return this.find(e, t).filter((t) => !d(t) && h(t)); 549 | }, 550 | getSelectorFromElement(t) { 551 | const e = R(t); 552 | return e && K.findOne(e) ? e : null; 553 | }, 554 | getElementFromSelector(t) { 555 | const e = R(t); 556 | return e ? K.findOne(e) : null; 557 | }, 558 | getMultipleElementsFromSelector(t) { 559 | const e = R(t); 560 | return e ? K.find(e) : []; 561 | }, 562 | }, 563 | V = (t, e = "hide") => { 564 | const i = `click.dismiss${t.EVENT_KEY}`, 565 | s = t.NAME; 566 | j.on(document, i, `[data-bs-dismiss="${s}"]`, function (i) { 567 | if ( 568 | (["A", "AREA"].includes(this.tagName) && i.preventDefault(), d(this)) 569 | ) 570 | return; 571 | const n = K.getElementFromSelector(this) || this.closest(`.${s}`); 572 | t.getOrCreateInstance(n)[e](); 573 | }); 574 | }, 575 | Q = ".bs.alert", 576 | X = `close${Q}`, 577 | Y = `closed${Q}`; 578 | class U extends W { 579 | static get NAME() { 580 | return "alert"; 581 | } 582 | close() { 583 | if (j.trigger(this._element, X).defaultPrevented) return; 584 | this._element.classList.remove("show"); 585 | const t = this._element.classList.contains("fade"); 586 | this._queueCallback(() => this._destroyElement(), this._element, t); 587 | } 588 | _destroyElement() { 589 | this._element.remove(), j.trigger(this._element, Y), this.dispose(); 590 | } 591 | static jQueryInterface(t) { 592 | return this.each(function () { 593 | const e = U.getOrCreateInstance(this); 594 | if ("string" == typeof t) { 595 | if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) 596 | throw new TypeError(`No method named "${t}"`); 597 | e[t](this); 598 | } 599 | }); 600 | } 601 | } 602 | V(U, "close"), b(U); 603 | const G = '[data-bs-toggle="button"]'; 604 | class J extends W { 605 | static get NAME() { 606 | return "button"; 607 | } 608 | toggle() { 609 | this._element.setAttribute( 610 | "aria-pressed", 611 | this._element.classList.toggle("active") 612 | ); 613 | } 614 | static jQueryInterface(t) { 615 | return this.each(function () { 616 | const e = J.getOrCreateInstance(this); 617 | "toggle" === t && e[t](); 618 | }); 619 | } 620 | } 621 | j.on(document, "click.bs.button.data-api", G, (t) => { 622 | t.preventDefault(); 623 | const e = t.target.closest(G); 624 | J.getOrCreateInstance(e).toggle(); 625 | }), 626 | b(J); 627 | const Z = ".bs.swipe", 628 | tt = `touchstart${Z}`, 629 | et = `touchmove${Z}`, 630 | it = `touchend${Z}`, 631 | st = `pointerdown${Z}`, 632 | nt = `pointerup${Z}`, 633 | ot = { endCallback: null, leftCallback: null, rightCallback: null }, 634 | rt = { 635 | endCallback: "(function|null)", 636 | leftCallback: "(function|null)", 637 | rightCallback: "(function|null)", 638 | }; 639 | class at extends q { 640 | constructor(t, e) { 641 | super(), 642 | (this._element = t), 643 | t && 644 | at.isSupported() && 645 | ((this._config = this._getConfig(e)), 646 | (this._deltaX = 0), 647 | (this._supportPointerEvents = Boolean(window.PointerEvent)), 648 | this._initEvents()); 649 | } 650 | static get Default() { 651 | return ot; 652 | } 653 | static get DefaultType() { 654 | return rt; 655 | } 656 | static get NAME() { 657 | return "swipe"; 658 | } 659 | dispose() { 660 | j.off(this._element, Z); 661 | } 662 | _start(t) { 663 | this._supportPointerEvents 664 | ? this._eventIsPointerPenTouch(t) && (this._deltaX = t.clientX) 665 | : (this._deltaX = t.touches[0].clientX); 666 | } 667 | _end(t) { 668 | this._eventIsPointerPenTouch(t) && 669 | (this._deltaX = t.clientX - this._deltaX), 670 | this._handleSwipe(), 671 | v(this._config.endCallback); 672 | } 673 | _move(t) { 674 | this._deltaX = 675 | t.touches && t.touches.length > 1 676 | ? 0 677 | : t.touches[0].clientX - this._deltaX; 678 | } 679 | _handleSwipe() { 680 | const t = Math.abs(this._deltaX); 681 | if (t <= 40) return; 682 | const e = t / this._deltaX; 683 | (this._deltaX = 0), 684 | e && v(e > 0 ? this._config.rightCallback : this._config.leftCallback); 685 | } 686 | _initEvents() { 687 | this._supportPointerEvents 688 | ? (j.on(this._element, st, (t) => this._start(t)), 689 | j.on(this._element, nt, (t) => this._end(t)), 690 | this._element.classList.add("pointer-event")) 691 | : (j.on(this._element, tt, (t) => this._start(t)), 692 | j.on(this._element, et, (t) => this._move(t)), 693 | j.on(this._element, it, (t) => this._end(t))); 694 | } 695 | _eventIsPointerPenTouch(t) { 696 | return ( 697 | this._supportPointerEvents && 698 | ("pen" === t.pointerType || "touch" === t.pointerType) 699 | ); 700 | } 701 | static isSupported() { 702 | return ( 703 | "ontouchstart" in document.documentElement || 704 | navigator.maxTouchPoints > 0 705 | ); 706 | } 707 | } 708 | const lt = ".bs.carousel", 709 | ct = ".data-api", 710 | ht = "next", 711 | dt = "prev", 712 | ut = "left", 713 | _t = "right", 714 | gt = `slide${lt}`, 715 | ft = `slid${lt}`, 716 | mt = `keydown${lt}`, 717 | pt = `mouseenter${lt}`, 718 | bt = `mouseleave${lt}`, 719 | vt = `dragstart${lt}`, 720 | yt = `load${lt}${ct}`, 721 | wt = `click${lt}${ct}`, 722 | At = "carousel", 723 | Et = "active", 724 | Ct = ".active", 725 | Tt = ".carousel-item", 726 | kt = Ct + Tt, 727 | $t = { ArrowLeft: _t, ArrowRight: ut }, 728 | St = { 729 | interval: 5e3, 730 | keyboard: !0, 731 | pause: "hover", 732 | ride: !1, 733 | touch: !0, 734 | wrap: !0, 735 | }, 736 | Lt = { 737 | interval: "(number|boolean)", 738 | keyboard: "boolean", 739 | pause: "(string|boolean)", 740 | ride: "(boolean|string)", 741 | touch: "boolean", 742 | wrap: "boolean", 743 | }; 744 | class Ot extends W { 745 | constructor(t, e) { 746 | super(t, e), 747 | (this._interval = null), 748 | (this._activeElement = null), 749 | (this._isSliding = !1), 750 | (this.touchTimeout = null), 751 | (this._swipeHelper = null), 752 | (this._indicatorsElement = K.findOne( 753 | ".carousel-indicators", 754 | this._element 755 | )), 756 | this._addEventListeners(), 757 | this._config.ride === At && this.cycle(); 758 | } 759 | static get Default() { 760 | return St; 761 | } 762 | static get DefaultType() { 763 | return Lt; 764 | } 765 | static get NAME() { 766 | return "carousel"; 767 | } 768 | next() { 769 | this._slide(ht); 770 | } 771 | nextWhenVisible() { 772 | !document.hidden && h(this._element) && this.next(); 773 | } 774 | prev() { 775 | this._slide(dt); 776 | } 777 | pause() { 778 | this._isSliding && a(this._element), this._clearInterval(); 779 | } 780 | cycle() { 781 | this._clearInterval(), 782 | this._updateInterval(), 783 | (this._interval = setInterval( 784 | () => this.nextWhenVisible(), 785 | this._config.interval 786 | )); 787 | } 788 | _maybeEnableCycle() { 789 | this._config.ride && 790 | (this._isSliding 791 | ? j.one(this._element, ft, () => this.cycle()) 792 | : this.cycle()); 793 | } 794 | to(t) { 795 | const e = this._getItems(); 796 | if (t > e.length - 1 || t < 0) return; 797 | if (this._isSliding) 798 | return void j.one(this._element, ft, () => this.to(t)); 799 | const i = this._getItemIndex(this._getActive()); 800 | if (i === t) return; 801 | const s = t > i ? ht : dt; 802 | this._slide(s, e[t]); 803 | } 804 | dispose() { 805 | this._swipeHelper && this._swipeHelper.dispose(), super.dispose(); 806 | } 807 | _configAfterMerge(t) { 808 | return (t.defaultInterval = t.interval), t; 809 | } 810 | _addEventListeners() { 811 | this._config.keyboard && j.on(this._element, mt, (t) => this._keydown(t)), 812 | "hover" === this._config.pause && 813 | (j.on(this._element, pt, () => this.pause()), 814 | j.on(this._element, bt, () => this._maybeEnableCycle())), 815 | this._config.touch && 816 | at.isSupported() && 817 | this._addTouchEventListeners(); 818 | } 819 | _addTouchEventListeners() { 820 | for (const t of K.find(".carousel-item img", this._element)) 821 | j.on(t, vt, (t) => t.preventDefault()); 822 | const t = { 823 | leftCallback: () => this._slide(this._directionToOrder(ut)), 824 | rightCallback: () => this._slide(this._directionToOrder(_t)), 825 | endCallback: () => { 826 | "hover" === this._config.pause && 827 | (this.pause(), 828 | this.touchTimeout && clearTimeout(this.touchTimeout), 829 | (this.touchTimeout = setTimeout( 830 | () => this._maybeEnableCycle(), 831 | 500 + this._config.interval 832 | ))); 833 | }, 834 | }; 835 | this._swipeHelper = new at(this._element, t); 836 | } 837 | _keydown(t) { 838 | if (/input|textarea/i.test(t.target.tagName)) return; 839 | const e = $t[t.key]; 840 | e && (t.preventDefault(), this._slide(this._directionToOrder(e))); 841 | } 842 | _getItemIndex(t) { 843 | return this._getItems().indexOf(t); 844 | } 845 | _setActiveIndicatorElement(t) { 846 | if (!this._indicatorsElement) return; 847 | const e = K.findOne(Ct, this._indicatorsElement); 848 | e.classList.remove(Et), e.removeAttribute("aria-current"); 849 | const i = K.findOne(`[data-bs-slide-to="${t}"]`, this._indicatorsElement); 850 | i && (i.classList.add(Et), i.setAttribute("aria-current", "true")); 851 | } 852 | _updateInterval() { 853 | const t = this._activeElement || this._getActive(); 854 | if (!t) return; 855 | const e = Number.parseInt(t.getAttribute("data-bs-interval"), 10); 856 | this._config.interval = e || this._config.defaultInterval; 857 | } 858 | _slide(t, e = null) { 859 | if (this._isSliding) return; 860 | const i = this._getActive(), 861 | s = t === ht, 862 | n = e || w(this._getItems(), i, s, this._config.wrap); 863 | if (n === i) return; 864 | const o = this._getItemIndex(n), 865 | r = (e) => 866 | j.trigger(this._element, e, { 867 | relatedTarget: n, 868 | direction: this._orderToDirection(t), 869 | from: this._getItemIndex(i), 870 | to: o, 871 | }); 872 | if (r(gt).defaultPrevented) return; 873 | if (!i || !n) return; 874 | const a = Boolean(this._interval); 875 | this.pause(), 876 | (this._isSliding = !0), 877 | this._setActiveIndicatorElement(o), 878 | (this._activeElement = n); 879 | const l = s ? "carousel-item-start" : "carousel-item-end", 880 | c = s ? "carousel-item-next" : "carousel-item-prev"; 881 | n.classList.add(c), 882 | g(n), 883 | i.classList.add(l), 884 | n.classList.add(l), 885 | this._queueCallback( 886 | () => { 887 | n.classList.remove(l, c), 888 | n.classList.add(Et), 889 | i.classList.remove(Et, c, l), 890 | (this._isSliding = !1), 891 | r(ft); 892 | }, 893 | i, 894 | this._isAnimated() 895 | ), 896 | a && this.cycle(); 897 | } 898 | _isAnimated() { 899 | return this._element.classList.contains("slide"); 900 | } 901 | _getActive() { 902 | return K.findOne(kt, this._element); 903 | } 904 | _getItems() { 905 | return K.find(Tt, this._element); 906 | } 907 | _clearInterval() { 908 | this._interval && 909 | (clearInterval(this._interval), (this._interval = null)); 910 | } 911 | _directionToOrder(t) { 912 | return p() ? (t === ut ? dt : ht) : t === ut ? ht : dt; 913 | } 914 | _orderToDirection(t) { 915 | return p() ? (t === dt ? ut : _t) : t === dt ? _t : ut; 916 | } 917 | static jQueryInterface(t) { 918 | return this.each(function () { 919 | const e = Ot.getOrCreateInstance(this, t); 920 | if ("number" != typeof t) { 921 | if ("string" == typeof t) { 922 | if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) 923 | throw new TypeError(`No method named "${t}"`); 924 | e[t](); 925 | } 926 | } else e.to(t); 927 | }); 928 | } 929 | } 930 | j.on(document, wt, "[data-bs-slide], [data-bs-slide-to]", function (t) { 931 | const e = K.getElementFromSelector(this); 932 | if (!e || !e.classList.contains(At)) return; 933 | t.preventDefault(); 934 | const i = Ot.getOrCreateInstance(e), 935 | s = this.getAttribute("data-bs-slide-to"); 936 | return s 937 | ? (i.to(s), void i._maybeEnableCycle()) 938 | : "next" === B.getDataAttribute(this, "slide") 939 | ? (i.next(), void i._maybeEnableCycle()) 940 | : (i.prev(), void i._maybeEnableCycle()); 941 | }), 942 | j.on(window, yt, () => { 943 | const t = K.find('[data-bs-ride="carousel"]'); 944 | for (const e of t) Ot.getOrCreateInstance(e); 945 | }), 946 | b(Ot); 947 | const It = ".bs.collapse", 948 | Dt = `show${It}`, 949 | Nt = `shown${It}`, 950 | Pt = `hide${It}`, 951 | xt = `hidden${It}`, 952 | Mt = `click${It}.data-api`, 953 | jt = "show", 954 | Ft = "collapse", 955 | zt = "collapsing", 956 | Ht = `:scope .${Ft} .${Ft}`, 957 | Bt = '[data-bs-toggle="collapse"]', 958 | qt = { parent: null, toggle: !0 }, 959 | Wt = { parent: "(null|element)", toggle: "boolean" }; 960 | class Rt extends W { 961 | constructor(t, e) { 962 | super(t, e), (this._isTransitioning = !1), (this._triggerArray = []); 963 | const i = K.find(Bt); 964 | for (const t of i) { 965 | const e = K.getSelectorFromElement(t), 966 | i = K.find(e).filter((t) => t === this._element); 967 | null !== e && i.length && this._triggerArray.push(t); 968 | } 969 | this._initializeChildren(), 970 | this._config.parent || 971 | this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), 972 | this._config.toggle && this.toggle(); 973 | } 974 | static get Default() { 975 | return qt; 976 | } 977 | static get DefaultType() { 978 | return Wt; 979 | } 980 | static get NAME() { 981 | return "collapse"; 982 | } 983 | toggle() { 984 | this._isShown() ? this.hide() : this.show(); 985 | } 986 | show() { 987 | if (this._isTransitioning || this._isShown()) return; 988 | let t = []; 989 | if ( 990 | (this._config.parent && 991 | (t = this._getFirstLevelChildren( 992 | ".collapse.show, .collapse.collapsing" 993 | ) 994 | .filter((t) => t !== this._element) 995 | .map((t) => Rt.getOrCreateInstance(t, { toggle: !1 }))), 996 | t.length && t[0]._isTransitioning) 997 | ) 998 | return; 999 | if (j.trigger(this._element, Dt).defaultPrevented) return; 1000 | for (const e of t) e.hide(); 1001 | const e = this._getDimension(); 1002 | this._element.classList.remove(Ft), 1003 | this._element.classList.add(zt), 1004 | (this._element.style[e] = 0), 1005 | this._addAriaAndCollapsedClass(this._triggerArray, !0), 1006 | (this._isTransitioning = !0); 1007 | const i = `scroll${e[0].toUpperCase() + e.slice(1)}`; 1008 | this._queueCallback( 1009 | () => { 1010 | (this._isTransitioning = !1), 1011 | this._element.classList.remove(zt), 1012 | this._element.classList.add(Ft, jt), 1013 | (this._element.style[e] = ""), 1014 | j.trigger(this._element, Nt); 1015 | }, 1016 | this._element, 1017 | !0 1018 | ), 1019 | (this._element.style[e] = `${this._element[i]}px`); 1020 | } 1021 | hide() { 1022 | if (this._isTransitioning || !this._isShown()) return; 1023 | if (j.trigger(this._element, Pt).defaultPrevented) return; 1024 | const t = this._getDimension(); 1025 | (this._element.style[t] = `${ 1026 | this._element.getBoundingClientRect()[t] 1027 | }px`), 1028 | g(this._element), 1029 | this._element.classList.add(zt), 1030 | this._element.classList.remove(Ft, jt); 1031 | for (const t of this._triggerArray) { 1032 | const e = K.getElementFromSelector(t); 1033 | e && !this._isShown(e) && this._addAriaAndCollapsedClass([t], !1); 1034 | } 1035 | (this._isTransitioning = !0), 1036 | (this._element.style[t] = ""), 1037 | this._queueCallback( 1038 | () => { 1039 | (this._isTransitioning = !1), 1040 | this._element.classList.remove(zt), 1041 | this._element.classList.add(Ft), 1042 | j.trigger(this._element, xt); 1043 | }, 1044 | this._element, 1045 | !0 1046 | ); 1047 | } 1048 | _isShown(t = this._element) { 1049 | return t.classList.contains(jt); 1050 | } 1051 | _configAfterMerge(t) { 1052 | return (t.toggle = Boolean(t.toggle)), (t.parent = c(t.parent)), t; 1053 | } 1054 | _getDimension() { 1055 | return this._element.classList.contains("collapse-horizontal") 1056 | ? "width" 1057 | : "height"; 1058 | } 1059 | _initializeChildren() { 1060 | if (!this._config.parent) return; 1061 | const t = this._getFirstLevelChildren(Bt); 1062 | for (const e of t) { 1063 | const t = K.getElementFromSelector(e); 1064 | t && this._addAriaAndCollapsedClass([e], this._isShown(t)); 1065 | } 1066 | } 1067 | _getFirstLevelChildren(t) { 1068 | const e = K.find(Ht, this._config.parent); 1069 | return K.find(t, this._config.parent).filter((t) => !e.includes(t)); 1070 | } 1071 | _addAriaAndCollapsedClass(t, e) { 1072 | if (t.length) 1073 | for (const i of t) 1074 | i.classList.toggle("collapsed", !e), 1075 | i.setAttribute("aria-expanded", e); 1076 | } 1077 | static jQueryInterface(t) { 1078 | const e = {}; 1079 | return ( 1080 | "string" == typeof t && /show|hide/.test(t) && (e.toggle = !1), 1081 | this.each(function () { 1082 | const i = Rt.getOrCreateInstance(this, e); 1083 | if ("string" == typeof t) { 1084 | if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); 1085 | i[t](); 1086 | } 1087 | }) 1088 | ); 1089 | } 1090 | } 1091 | j.on(document, Mt, Bt, function (t) { 1092 | ("A" === t.target.tagName || 1093 | (t.delegateTarget && "A" === t.delegateTarget.tagName)) && 1094 | t.preventDefault(); 1095 | for (const t of K.getMultipleElementsFromSelector(this)) 1096 | Rt.getOrCreateInstance(t, { toggle: !1 }).toggle(); 1097 | }), 1098 | b(Rt); 1099 | const Kt = "dropdown", 1100 | Vt = ".bs.dropdown", 1101 | Qt = ".data-api", 1102 | Xt = "ArrowUp", 1103 | Yt = "ArrowDown", 1104 | Ut = `hide${Vt}`, 1105 | Gt = `hidden${Vt}`, 1106 | Jt = `show${Vt}`, 1107 | Zt = `shown${Vt}`, 1108 | te = `click${Vt}${Qt}`, 1109 | ee = `keydown${Vt}${Qt}`, 1110 | ie = `keyup${Vt}${Qt}`, 1111 | se = "show", 1112 | ne = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)', 1113 | oe = `${ne}.${se}`, 1114 | re = ".dropdown-menu", 1115 | ae = p() ? "top-end" : "top-start", 1116 | le = p() ? "top-start" : "top-end", 1117 | ce = p() ? "bottom-end" : "bottom-start", 1118 | he = p() ? "bottom-start" : "bottom-end", 1119 | de = p() ? "left-start" : "right-start", 1120 | ue = p() ? "right-start" : "left-start", 1121 | _e = { 1122 | autoClose: !0, 1123 | boundary: "clippingParents", 1124 | display: "dynamic", 1125 | offset: [0, 2], 1126 | popperConfig: null, 1127 | reference: "toggle", 1128 | }, 1129 | ge = { 1130 | autoClose: "(boolean|string)", 1131 | boundary: "(string|element)", 1132 | display: "string", 1133 | offset: "(array|string|function)", 1134 | popperConfig: "(null|object|function)", 1135 | reference: "(string|element|object)", 1136 | }; 1137 | class fe extends W { 1138 | constructor(t, e) { 1139 | super(t, e), 1140 | (this._popper = null), 1141 | (this._parent = this._element.parentNode), 1142 | (this._menu = 1143 | K.next(this._element, re)[0] || 1144 | K.prev(this._element, re)[0] || 1145 | K.findOne(re, this._parent)), 1146 | (this._inNavbar = this._detectNavbar()); 1147 | } 1148 | static get Default() { 1149 | return _e; 1150 | } 1151 | static get DefaultType() { 1152 | return ge; 1153 | } 1154 | static get NAME() { 1155 | return Kt; 1156 | } 1157 | toggle() { 1158 | return this._isShown() ? this.hide() : this.show(); 1159 | } 1160 | show() { 1161 | if (d(this._element) || this._isShown()) return; 1162 | const t = { relatedTarget: this._element }; 1163 | if (!j.trigger(this._element, Jt, t).defaultPrevented) { 1164 | if ( 1165 | (this._createPopper(), 1166 | "ontouchstart" in document.documentElement && 1167 | !this._parent.closest(".navbar-nav")) 1168 | ) 1169 | for (const t of [].concat(...document.body.children)) 1170 | j.on(t, "mouseover", _); 1171 | this._element.focus(), 1172 | this._element.setAttribute("aria-expanded", !0), 1173 | this._menu.classList.add(se), 1174 | this._element.classList.add(se), 1175 | j.trigger(this._element, Zt, t); 1176 | } 1177 | } 1178 | hide() { 1179 | if (d(this._element) || !this._isShown()) return; 1180 | const t = { relatedTarget: this._element }; 1181 | this._completeHide(t); 1182 | } 1183 | dispose() { 1184 | this._popper && this._popper.destroy(), super.dispose(); 1185 | } 1186 | update() { 1187 | (this._inNavbar = this._detectNavbar()), 1188 | this._popper && this._popper.update(); 1189 | } 1190 | _completeHide(t) { 1191 | if (!j.trigger(this._element, Ut, t).defaultPrevented) { 1192 | if ("ontouchstart" in document.documentElement) 1193 | for (const t of [].concat(...document.body.children)) 1194 | j.off(t, "mouseover", _); 1195 | this._popper && this._popper.destroy(), 1196 | this._menu.classList.remove(se), 1197 | this._element.classList.remove(se), 1198 | this._element.setAttribute("aria-expanded", "false"), 1199 | B.removeDataAttribute(this._menu, "popper"), 1200 | j.trigger(this._element, Gt, t); 1201 | } 1202 | } 1203 | _getConfig(t) { 1204 | if ( 1205 | "object" == typeof (t = super._getConfig(t)).reference && 1206 | !l(t.reference) && 1207 | "function" != typeof t.reference.getBoundingClientRect 1208 | ) 1209 | throw new TypeError( 1210 | `${Kt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.` 1211 | ); 1212 | return t; 1213 | } 1214 | _createPopper() { 1215 | if (void 0 === i) 1216 | throw new TypeError( 1217 | "Bootstrap's dropdowns require Popper (https://popper.js.org)" 1218 | ); 1219 | let t = this._element; 1220 | "parent" === this._config.reference 1221 | ? (t = this._parent) 1222 | : l(this._config.reference) 1223 | ? (t = c(this._config.reference)) 1224 | : "object" == typeof this._config.reference && 1225 | (t = this._config.reference); 1226 | const e = this._getPopperConfig(); 1227 | this._popper = i.createPopper(t, this._menu, e); 1228 | } 1229 | _isShown() { 1230 | return this._menu.classList.contains(se); 1231 | } 1232 | _getPlacement() { 1233 | const t = this._parent; 1234 | if (t.classList.contains("dropend")) return de; 1235 | if (t.classList.contains("dropstart")) return ue; 1236 | if (t.classList.contains("dropup-center")) return "top"; 1237 | if (t.classList.contains("dropdown-center")) return "bottom"; 1238 | const e = 1239 | "end" === 1240 | getComputedStyle(this._menu).getPropertyValue("--bs-position").trim(); 1241 | return t.classList.contains("dropup") ? (e ? le : ae) : e ? he : ce; 1242 | } 1243 | _detectNavbar() { 1244 | return null !== this._element.closest(".navbar"); 1245 | } 1246 | _getOffset() { 1247 | const { offset: t } = this._config; 1248 | return "string" == typeof t 1249 | ? t.split(",").map((t) => Number.parseInt(t, 10)) 1250 | : "function" == typeof t 1251 | ? (e) => t(e, this._element) 1252 | : t; 1253 | } 1254 | _getPopperConfig() { 1255 | const t = { 1256 | placement: this._getPlacement(), 1257 | modifiers: [ 1258 | { 1259 | name: "preventOverflow", 1260 | options: { boundary: this._config.boundary }, 1261 | }, 1262 | { name: "offset", options: { offset: this._getOffset() } }, 1263 | ], 1264 | }; 1265 | return ( 1266 | (this._inNavbar || "static" === this._config.display) && 1267 | (B.setDataAttribute(this._menu, "popper", "static"), 1268 | (t.modifiers = [{ name: "applyStyles", enabled: !1 }])), 1269 | { ...t, ...v(this._config.popperConfig, [t]) } 1270 | ); 1271 | } 1272 | _selectMenuItem({ key: t, target: e }) { 1273 | const i = K.find( 1274 | ".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", 1275 | this._menu 1276 | ).filter((t) => h(t)); 1277 | i.length && w(i, e, t === Yt, !i.includes(e)).focus(); 1278 | } 1279 | static jQueryInterface(t) { 1280 | return this.each(function () { 1281 | const e = fe.getOrCreateInstance(this, t); 1282 | if ("string" == typeof t) { 1283 | if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); 1284 | e[t](); 1285 | } 1286 | }); 1287 | } 1288 | static clearMenus(t) { 1289 | if (2 === t.button || ("keyup" === t.type && "Tab" !== t.key)) return; 1290 | const e = K.find(oe); 1291 | for (const i of e) { 1292 | const e = fe.getInstance(i); 1293 | if (!e || !1 === e._config.autoClose) continue; 1294 | const s = t.composedPath(), 1295 | n = s.includes(e._menu); 1296 | if ( 1297 | s.includes(e._element) || 1298 | ("inside" === e._config.autoClose && !n) || 1299 | ("outside" === e._config.autoClose && n) 1300 | ) 1301 | continue; 1302 | if ( 1303 | e._menu.contains(t.target) && 1304 | (("keyup" === t.type && "Tab" === t.key) || 1305 | /input|select|option|textarea|form/i.test(t.target.tagName)) 1306 | ) 1307 | continue; 1308 | const o = { relatedTarget: e._element }; 1309 | "click" === t.type && (o.clickEvent = t), e._completeHide(o); 1310 | } 1311 | } 1312 | static dataApiKeydownHandler(t) { 1313 | const e = /input|textarea/i.test(t.target.tagName), 1314 | i = "Escape" === t.key, 1315 | s = [Xt, Yt].includes(t.key); 1316 | if (!s && !i) return; 1317 | if (e && !i) return; 1318 | t.preventDefault(); 1319 | const n = this.matches(ne) 1320 | ? this 1321 | : K.prev(this, ne)[0] || 1322 | K.next(this, ne)[0] || 1323 | K.findOne(ne, t.delegateTarget.parentNode), 1324 | o = fe.getOrCreateInstance(n); 1325 | if (s) return t.stopPropagation(), o.show(), void o._selectMenuItem(t); 1326 | o._isShown() && (t.stopPropagation(), o.hide(), n.focus()); 1327 | } 1328 | } 1329 | j.on(document, ee, ne, fe.dataApiKeydownHandler), 1330 | j.on(document, ee, re, fe.dataApiKeydownHandler), 1331 | j.on(document, te, fe.clearMenus), 1332 | j.on(document, ie, fe.clearMenus), 1333 | j.on(document, te, ne, function (t) { 1334 | t.preventDefault(), fe.getOrCreateInstance(this).toggle(); 1335 | }), 1336 | b(fe); 1337 | const me = "backdrop", 1338 | pe = "show", 1339 | be = `mousedown.bs.${me}`, 1340 | ve = { 1341 | className: "modal-backdrop", 1342 | clickCallback: null, 1343 | isAnimated: !1, 1344 | isVisible: !0, 1345 | rootElement: "body", 1346 | }, 1347 | ye = { 1348 | className: "string", 1349 | clickCallback: "(function|null)", 1350 | isAnimated: "boolean", 1351 | isVisible: "boolean", 1352 | rootElement: "(element|string)", 1353 | }; 1354 | class we extends q { 1355 | constructor(t) { 1356 | super(), 1357 | (this._config = this._getConfig(t)), 1358 | (this._isAppended = !1), 1359 | (this._element = null); 1360 | } 1361 | static get Default() { 1362 | return ve; 1363 | } 1364 | static get DefaultType() { 1365 | return ye; 1366 | } 1367 | static get NAME() { 1368 | return me; 1369 | } 1370 | show(t) { 1371 | if (!this._config.isVisible) return void v(t); 1372 | this._append(); 1373 | const e = this._getElement(); 1374 | this._config.isAnimated && g(e), 1375 | e.classList.add(pe), 1376 | this._emulateAnimation(() => { 1377 | v(t); 1378 | }); 1379 | } 1380 | hide(t) { 1381 | this._config.isVisible 1382 | ? (this._getElement().classList.remove(pe), 1383 | this._emulateAnimation(() => { 1384 | this.dispose(), v(t); 1385 | })) 1386 | : v(t); 1387 | } 1388 | dispose() { 1389 | this._isAppended && 1390 | (j.off(this._element, be), 1391 | this._element.remove(), 1392 | (this._isAppended = !1)); 1393 | } 1394 | _getElement() { 1395 | if (!this._element) { 1396 | const t = document.createElement("div"); 1397 | (t.className = this._config.className), 1398 | this._config.isAnimated && t.classList.add("fade"), 1399 | (this._element = t); 1400 | } 1401 | return this._element; 1402 | } 1403 | _configAfterMerge(t) { 1404 | return (t.rootElement = c(t.rootElement)), t; 1405 | } 1406 | _append() { 1407 | if (this._isAppended) return; 1408 | const t = this._getElement(); 1409 | this._config.rootElement.append(t), 1410 | j.on(t, be, () => { 1411 | v(this._config.clickCallback); 1412 | }), 1413 | (this._isAppended = !0); 1414 | } 1415 | _emulateAnimation(t) { 1416 | y(t, this._getElement(), this._config.isAnimated); 1417 | } 1418 | } 1419 | const Ae = ".bs.focustrap", 1420 | Ee = `focusin${Ae}`, 1421 | Ce = `keydown.tab${Ae}`, 1422 | Te = "backward", 1423 | ke = { autofocus: !0, trapElement: null }, 1424 | $e = { autofocus: "boolean", trapElement: "element" }; 1425 | class Se extends q { 1426 | constructor(t) { 1427 | super(), 1428 | (this._config = this._getConfig(t)), 1429 | (this._isActive = !1), 1430 | (this._lastTabNavDirection = null); 1431 | } 1432 | static get Default() { 1433 | return ke; 1434 | } 1435 | static get DefaultType() { 1436 | return $e; 1437 | } 1438 | static get NAME() { 1439 | return "focustrap"; 1440 | } 1441 | activate() { 1442 | this._isActive || 1443 | (this._config.autofocus && this._config.trapElement.focus(), 1444 | j.off(document, Ae), 1445 | j.on(document, Ee, (t) => this._handleFocusin(t)), 1446 | j.on(document, Ce, (t) => this._handleKeydown(t)), 1447 | (this._isActive = !0)); 1448 | } 1449 | deactivate() { 1450 | this._isActive && ((this._isActive = !1), j.off(document, Ae)); 1451 | } 1452 | _handleFocusin(t) { 1453 | const { trapElement: e } = this._config; 1454 | if (t.target === document || t.target === e || e.contains(t.target)) 1455 | return; 1456 | const i = K.focusableChildren(e); 1457 | 0 === i.length 1458 | ? e.focus() 1459 | : this._lastTabNavDirection === Te 1460 | ? i[i.length - 1].focus() 1461 | : i[0].focus(); 1462 | } 1463 | _handleKeydown(t) { 1464 | "Tab" === t.key && 1465 | (this._lastTabNavDirection = t.shiftKey ? Te : "forward"); 1466 | } 1467 | } 1468 | const Le = ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", 1469 | Oe = ".sticky-top", 1470 | Ie = "padding-right", 1471 | De = "margin-right"; 1472 | class Ne { 1473 | constructor() { 1474 | this._element = document.body; 1475 | } 1476 | getWidth() { 1477 | const t = document.documentElement.clientWidth; 1478 | return Math.abs(window.innerWidth - t); 1479 | } 1480 | hide() { 1481 | const t = this.getWidth(); 1482 | this._disableOverFlow(), 1483 | this._setElementAttributes(this._element, Ie, (e) => e + t), 1484 | this._setElementAttributes(Le, Ie, (e) => e + t), 1485 | this._setElementAttributes(Oe, De, (e) => e - t); 1486 | } 1487 | reset() { 1488 | this._resetElementAttributes(this._element, "overflow"), 1489 | this._resetElementAttributes(this._element, Ie), 1490 | this._resetElementAttributes(Le, Ie), 1491 | this._resetElementAttributes(Oe, De); 1492 | } 1493 | isOverflowing() { 1494 | return this.getWidth() > 0; 1495 | } 1496 | _disableOverFlow() { 1497 | this._saveInitialAttribute(this._element, "overflow"), 1498 | (this._element.style.overflow = "hidden"); 1499 | } 1500 | _setElementAttributes(t, e, i) { 1501 | const s = this.getWidth(); 1502 | this._applyManipulationCallback(t, (t) => { 1503 | if (t !== this._element && window.innerWidth > t.clientWidth + s) 1504 | return; 1505 | this._saveInitialAttribute(t, e); 1506 | const n = window.getComputedStyle(t).getPropertyValue(e); 1507 | t.style.setProperty(e, `${i(Number.parseFloat(n))}px`); 1508 | }); 1509 | } 1510 | _saveInitialAttribute(t, e) { 1511 | const i = t.style.getPropertyValue(e); 1512 | i && B.setDataAttribute(t, e, i); 1513 | } 1514 | _resetElementAttributes(t, e) { 1515 | this._applyManipulationCallback(t, (t) => { 1516 | const i = B.getDataAttribute(t, e); 1517 | null !== i 1518 | ? (B.removeDataAttribute(t, e), t.style.setProperty(e, i)) 1519 | : t.style.removeProperty(e); 1520 | }); 1521 | } 1522 | _applyManipulationCallback(t, e) { 1523 | if (l(t)) e(t); 1524 | else for (const i of K.find(t, this._element)) e(i); 1525 | } 1526 | } 1527 | const Pe = ".bs.modal", 1528 | xe = `hide${Pe}`, 1529 | Me = `hidePrevented${Pe}`, 1530 | je = `hidden${Pe}`, 1531 | Fe = `show${Pe}`, 1532 | ze = `shown${Pe}`, 1533 | He = `resize${Pe}`, 1534 | Be = `click.dismiss${Pe}`, 1535 | qe = `mousedown.dismiss${Pe}`, 1536 | We = `keydown.dismiss${Pe}`, 1537 | Re = `click${Pe}.data-api`, 1538 | Ke = "modal-open", 1539 | Ve = "show", 1540 | Qe = "modal-static", 1541 | Xe = { backdrop: !0, focus: !0, keyboard: !0 }, 1542 | Ye = { 1543 | backdrop: "(boolean|string)", 1544 | focus: "boolean", 1545 | keyboard: "boolean", 1546 | }; 1547 | class Ue extends W { 1548 | constructor(t, e) { 1549 | super(t, e), 1550 | (this._dialog = K.findOne(".modal-dialog", this._element)), 1551 | (this._backdrop = this._initializeBackDrop()), 1552 | (this._focustrap = this._initializeFocusTrap()), 1553 | (this._isShown = !1), 1554 | (this._isTransitioning = !1), 1555 | (this._scrollBar = new Ne()), 1556 | this._addEventListeners(); 1557 | } 1558 | static get Default() { 1559 | return Xe; 1560 | } 1561 | static get DefaultType() { 1562 | return Ye; 1563 | } 1564 | static get NAME() { 1565 | return "modal"; 1566 | } 1567 | toggle(t) { 1568 | return this._isShown ? this.hide() : this.show(t); 1569 | } 1570 | show(t) { 1571 | this._isShown || 1572 | this._isTransitioning || 1573 | j.trigger(this._element, Fe, { relatedTarget: t }).defaultPrevented || 1574 | ((this._isShown = !0), 1575 | (this._isTransitioning = !0), 1576 | this._scrollBar.hide(), 1577 | document.body.classList.add(Ke), 1578 | this._adjustDialog(), 1579 | this._backdrop.show(() => this._showElement(t))); 1580 | } 1581 | hide() { 1582 | this._isShown && 1583 | !this._isTransitioning && 1584 | (j.trigger(this._element, xe).defaultPrevented || 1585 | ((this._isShown = !1), 1586 | (this._isTransitioning = !0), 1587 | this._focustrap.deactivate(), 1588 | this._element.classList.remove(Ve), 1589 | this._queueCallback( 1590 | () => this._hideModal(), 1591 | this._element, 1592 | this._isAnimated() 1593 | ))); 1594 | } 1595 | dispose() { 1596 | j.off(window, Pe), 1597 | j.off(this._dialog, Pe), 1598 | this._backdrop.dispose(), 1599 | this._focustrap.deactivate(), 1600 | super.dispose(); 1601 | } 1602 | handleUpdate() { 1603 | this._adjustDialog(); 1604 | } 1605 | _initializeBackDrop() { 1606 | return new we({ 1607 | isVisible: Boolean(this._config.backdrop), 1608 | isAnimated: this._isAnimated(), 1609 | }); 1610 | } 1611 | _initializeFocusTrap() { 1612 | return new Se({ trapElement: this._element }); 1613 | } 1614 | _showElement(t) { 1615 | document.body.contains(this._element) || 1616 | document.body.append(this._element), 1617 | (this._element.style.display = "block"), 1618 | this._element.removeAttribute("aria-hidden"), 1619 | this._element.setAttribute("aria-modal", !0), 1620 | this._element.setAttribute("role", "dialog"), 1621 | (this._element.scrollTop = 0); 1622 | const e = K.findOne(".modal-body", this._dialog); 1623 | e && (e.scrollTop = 0), 1624 | g(this._element), 1625 | this._element.classList.add(Ve), 1626 | this._queueCallback( 1627 | () => { 1628 | this._config.focus && this._focustrap.activate(), 1629 | (this._isTransitioning = !1), 1630 | j.trigger(this._element, ze, { relatedTarget: t }); 1631 | }, 1632 | this._dialog, 1633 | this._isAnimated() 1634 | ); 1635 | } 1636 | _addEventListeners() { 1637 | j.on(this._element, We, (t) => { 1638 | "Escape" === t.key && 1639 | (this._config.keyboard 1640 | ? this.hide() 1641 | : this._triggerBackdropTransition()); 1642 | }), 1643 | j.on(window, He, () => { 1644 | this._isShown && !this._isTransitioning && this._adjustDialog(); 1645 | }), 1646 | j.on(this._element, qe, (t) => { 1647 | j.one(this._element, Be, (e) => { 1648 | this._element === t.target && 1649 | this._element === e.target && 1650 | ("static" !== this._config.backdrop 1651 | ? this._config.backdrop && this.hide() 1652 | : this._triggerBackdropTransition()); 1653 | }); 1654 | }); 1655 | } 1656 | _hideModal() { 1657 | (this._element.style.display = "none"), 1658 | this._element.setAttribute("aria-hidden", !0), 1659 | this._element.removeAttribute("aria-modal"), 1660 | this._element.removeAttribute("role"), 1661 | (this._isTransitioning = !1), 1662 | this._backdrop.hide(() => { 1663 | document.body.classList.remove(Ke), 1664 | this._resetAdjustments(), 1665 | this._scrollBar.reset(), 1666 | j.trigger(this._element, je); 1667 | }); 1668 | } 1669 | _isAnimated() { 1670 | return this._element.classList.contains("fade"); 1671 | } 1672 | _triggerBackdropTransition() { 1673 | if (j.trigger(this._element, Me).defaultPrevented) return; 1674 | const t = 1675 | this._element.scrollHeight > document.documentElement.clientHeight, 1676 | e = this._element.style.overflowY; 1677 | "hidden" === e || 1678 | this._element.classList.contains(Qe) || 1679 | (t || (this._element.style.overflowY = "hidden"), 1680 | this._element.classList.add(Qe), 1681 | this._queueCallback(() => { 1682 | this._element.classList.remove(Qe), 1683 | this._queueCallback(() => { 1684 | this._element.style.overflowY = e; 1685 | }, this._dialog); 1686 | }, this._dialog), 1687 | this._element.focus()); 1688 | } 1689 | _adjustDialog() { 1690 | const t = 1691 | this._element.scrollHeight > document.documentElement.clientHeight, 1692 | e = this._scrollBar.getWidth(), 1693 | i = e > 0; 1694 | if (i && !t) { 1695 | const t = p() ? "paddingLeft" : "paddingRight"; 1696 | this._element.style[t] = `${e}px`; 1697 | } 1698 | if (!i && t) { 1699 | const t = p() ? "paddingRight" : "paddingLeft"; 1700 | this._element.style[t] = `${e}px`; 1701 | } 1702 | } 1703 | _resetAdjustments() { 1704 | (this._element.style.paddingLeft = ""), 1705 | (this._element.style.paddingRight = ""); 1706 | } 1707 | static jQueryInterface(t, e) { 1708 | return this.each(function () { 1709 | const i = Ue.getOrCreateInstance(this, t); 1710 | if ("string" == typeof t) { 1711 | if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); 1712 | i[t](e); 1713 | } 1714 | }); 1715 | } 1716 | } 1717 | j.on(document, Re, '[data-bs-toggle="modal"]', function (t) { 1718 | const e = K.getElementFromSelector(this); 1719 | ["A", "AREA"].includes(this.tagName) && t.preventDefault(), 1720 | j.one(e, Fe, (t) => { 1721 | t.defaultPrevented || 1722 | j.one(e, je, () => { 1723 | h(this) && this.focus(); 1724 | }); 1725 | }); 1726 | const i = K.findOne(".modal.show"); 1727 | i && Ue.getInstance(i).hide(), Ue.getOrCreateInstance(e).toggle(this); 1728 | }), 1729 | V(Ue), 1730 | b(Ue); 1731 | const Ge = ".bs.offcanvas", 1732 | Je = ".data-api", 1733 | Ze = `load${Ge}${Je}`, 1734 | ti = "show", 1735 | ei = "showing", 1736 | ii = "hiding", 1737 | si = ".offcanvas.show", 1738 | ni = `show${Ge}`, 1739 | oi = `shown${Ge}`, 1740 | ri = `hide${Ge}`, 1741 | ai = `hidePrevented${Ge}`, 1742 | li = `hidden${Ge}`, 1743 | ci = `resize${Ge}`, 1744 | hi = `click${Ge}${Je}`, 1745 | di = `keydown.dismiss${Ge}`, 1746 | ui = { backdrop: !0, keyboard: !0, scroll: !1 }, 1747 | _i = { 1748 | backdrop: "(boolean|string)", 1749 | keyboard: "boolean", 1750 | scroll: "boolean", 1751 | }; 1752 | class gi extends W { 1753 | constructor(t, e) { 1754 | super(t, e), 1755 | (this._isShown = !1), 1756 | (this._backdrop = this._initializeBackDrop()), 1757 | (this._focustrap = this._initializeFocusTrap()), 1758 | this._addEventListeners(); 1759 | } 1760 | static get Default() { 1761 | return ui; 1762 | } 1763 | static get DefaultType() { 1764 | return _i; 1765 | } 1766 | static get NAME() { 1767 | return "offcanvas"; 1768 | } 1769 | toggle(t) { 1770 | return this._isShown ? this.hide() : this.show(t); 1771 | } 1772 | show(t) { 1773 | this._isShown || 1774 | j.trigger(this._element, ni, { relatedTarget: t }).defaultPrevented || 1775 | ((this._isShown = !0), 1776 | this._backdrop.show(), 1777 | this._config.scroll || new Ne().hide(), 1778 | this._element.setAttribute("aria-modal", !0), 1779 | this._element.setAttribute("role", "dialog"), 1780 | this._element.classList.add(ei), 1781 | this._queueCallback( 1782 | () => { 1783 | (this._config.scroll && !this._config.backdrop) || 1784 | this._focustrap.activate(), 1785 | this._element.classList.add(ti), 1786 | this._element.classList.remove(ei), 1787 | j.trigger(this._element, oi, { relatedTarget: t }); 1788 | }, 1789 | this._element, 1790 | !0 1791 | )); 1792 | } 1793 | hide() { 1794 | this._isShown && 1795 | (j.trigger(this._element, ri).defaultPrevented || 1796 | (this._focustrap.deactivate(), 1797 | this._element.blur(), 1798 | (this._isShown = !1), 1799 | this._element.classList.add(ii), 1800 | this._backdrop.hide(), 1801 | this._queueCallback( 1802 | () => { 1803 | this._element.classList.remove(ti, ii), 1804 | this._element.removeAttribute("aria-modal"), 1805 | this._element.removeAttribute("role"), 1806 | this._config.scroll || new Ne().reset(), 1807 | j.trigger(this._element, li); 1808 | }, 1809 | this._element, 1810 | !0 1811 | ))); 1812 | } 1813 | dispose() { 1814 | this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose(); 1815 | } 1816 | _initializeBackDrop() { 1817 | const t = Boolean(this._config.backdrop); 1818 | return new we({ 1819 | className: "offcanvas-backdrop", 1820 | isVisible: t, 1821 | isAnimated: !0, 1822 | rootElement: this._element.parentNode, 1823 | clickCallback: t 1824 | ? () => { 1825 | "static" !== this._config.backdrop 1826 | ? this.hide() 1827 | : j.trigger(this._element, ai); 1828 | } 1829 | : null, 1830 | }); 1831 | } 1832 | _initializeFocusTrap() { 1833 | return new Se({ trapElement: this._element }); 1834 | } 1835 | _addEventListeners() { 1836 | j.on(this._element, di, (t) => { 1837 | "Escape" === t.key && 1838 | (this._config.keyboard ? this.hide() : j.trigger(this._element, ai)); 1839 | }); 1840 | } 1841 | static jQueryInterface(t) { 1842 | return this.each(function () { 1843 | const e = gi.getOrCreateInstance(this, t); 1844 | if ("string" == typeof t) { 1845 | if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) 1846 | throw new TypeError(`No method named "${t}"`); 1847 | e[t](this); 1848 | } 1849 | }); 1850 | } 1851 | } 1852 | j.on(document, hi, '[data-bs-toggle="offcanvas"]', function (t) { 1853 | const e = K.getElementFromSelector(this); 1854 | if ((["A", "AREA"].includes(this.tagName) && t.preventDefault(), d(this))) 1855 | return; 1856 | j.one(e, li, () => { 1857 | h(this) && this.focus(); 1858 | }); 1859 | const i = K.findOne(si); 1860 | i && i !== e && gi.getInstance(i).hide(), 1861 | gi.getOrCreateInstance(e).toggle(this); 1862 | }), 1863 | j.on(window, Ze, () => { 1864 | for (const t of K.find(si)) gi.getOrCreateInstance(t).show(); 1865 | }), 1866 | j.on(window, ci, () => { 1867 | for (const t of K.find("[aria-modal][class*=show][class*=offcanvas-]")) 1868 | "fixed" !== getComputedStyle(t).position && 1869 | gi.getOrCreateInstance(t).hide(); 1870 | }), 1871 | V(gi), 1872 | b(gi); 1873 | const fi = { 1874 | "*": ["class", "dir", "id", "lang", "role", /^aria-[\w-]*$/i], 1875 | a: ["target", "href", "title", "rel"], 1876 | area: [], 1877 | b: [], 1878 | br: [], 1879 | col: [], 1880 | code: [], 1881 | div: [], 1882 | em: [], 1883 | hr: [], 1884 | h1: [], 1885 | h2: [], 1886 | h3: [], 1887 | h4: [], 1888 | h5: [], 1889 | h6: [], 1890 | i: [], 1891 | img: ["src", "srcset", "alt", "title", "width", "height"], 1892 | li: [], 1893 | ol: [], 1894 | p: [], 1895 | pre: [], 1896 | s: [], 1897 | small: [], 1898 | span: [], 1899 | sub: [], 1900 | sup: [], 1901 | strong: [], 1902 | u: [], 1903 | ul: [], 1904 | }, 1905 | mi = new Set([ 1906 | "background", 1907 | "cite", 1908 | "href", 1909 | "itemtype", 1910 | "longdesc", 1911 | "poster", 1912 | "src", 1913 | "xlink:href", 1914 | ]), 1915 | pi = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i, 1916 | bi = (t, e) => { 1917 | const i = t.nodeName.toLowerCase(); 1918 | return e.includes(i) 1919 | ? !mi.has(i) || Boolean(pi.test(t.nodeValue)) 1920 | : e.filter((t) => t instanceof RegExp).some((t) => t.test(i)); 1921 | }, 1922 | vi = { 1923 | allowList: fi, 1924 | content: {}, 1925 | extraClass: "", 1926 | html: !1, 1927 | sanitize: !0, 1928 | sanitizeFn: null, 1929 | template: "
", 1930 | }, 1931 | yi = { 1932 | allowList: "object", 1933 | content: "object", 1934 | extraClass: "(string|function)", 1935 | html: "boolean", 1936 | sanitize: "boolean", 1937 | sanitizeFn: "(null|function)", 1938 | template: "string", 1939 | }, 1940 | wi = { 1941 | entry: "(string|element|function|null)", 1942 | selector: "(string|element)", 1943 | }; 1944 | class Ai extends q { 1945 | constructor(t) { 1946 | super(), (this._config = this._getConfig(t)); 1947 | } 1948 | static get Default() { 1949 | return vi; 1950 | } 1951 | static get DefaultType() { 1952 | return yi; 1953 | } 1954 | static get NAME() { 1955 | return "TemplateFactory"; 1956 | } 1957 | getContent() { 1958 | return Object.values(this._config.content) 1959 | .map((t) => this._resolvePossibleFunction(t)) 1960 | .filter(Boolean); 1961 | } 1962 | hasContent() { 1963 | return this.getContent().length > 0; 1964 | } 1965 | changeContent(t) { 1966 | return ( 1967 | this._checkContent(t), 1968 | (this._config.content = { ...this._config.content, ...t }), 1969 | this 1970 | ); 1971 | } 1972 | toHtml() { 1973 | const t = document.createElement("div"); 1974 | t.innerHTML = this._maybeSanitize(this._config.template); 1975 | for (const [e, i] of Object.entries(this._config.content)) 1976 | this._setContent(t, i, e); 1977 | const e = t.children[0], 1978 | i = this._resolvePossibleFunction(this._config.extraClass); 1979 | return i && e.classList.add(...i.split(" ")), e; 1980 | } 1981 | _typeCheckConfig(t) { 1982 | super._typeCheckConfig(t), this._checkContent(t.content); 1983 | } 1984 | _checkContent(t) { 1985 | for (const [e, i] of Object.entries(t)) 1986 | super._typeCheckConfig({ selector: e, entry: i }, wi); 1987 | } 1988 | _setContent(t, e, i) { 1989 | const s = K.findOne(i, t); 1990 | s && 1991 | ((e = this._resolvePossibleFunction(e)) 1992 | ? l(e) 1993 | ? this._putElementInTemplate(c(e), s) 1994 | : this._config.html 1995 | ? (s.innerHTML = this._maybeSanitize(e)) 1996 | : (s.textContent = e) 1997 | : s.remove()); 1998 | } 1999 | _maybeSanitize(t) { 2000 | return this._config.sanitize 2001 | ? (function (t, e, i) { 2002 | if (!t.length) return t; 2003 | if (i && "function" == typeof i) return i(t); 2004 | const s = new window.DOMParser().parseFromString(t, "text/html"), 2005 | n = [].concat(...s.body.querySelectorAll("*")); 2006 | for (const t of n) { 2007 | const i = t.nodeName.toLowerCase(); 2008 | if (!Object.keys(e).includes(i)) { 2009 | t.remove(); 2010 | continue; 2011 | } 2012 | const s = [].concat(...t.attributes), 2013 | n = [].concat(e["*"] || [], e[i] || []); 2014 | for (const e of s) bi(e, n) || t.removeAttribute(e.nodeName); 2015 | } 2016 | return s.body.innerHTML; 2017 | })(t, this._config.allowList, this._config.sanitizeFn) 2018 | : t; 2019 | } 2020 | _resolvePossibleFunction(t) { 2021 | return v(t, [this]); 2022 | } 2023 | _putElementInTemplate(t, e) { 2024 | if (this._config.html) return (e.innerHTML = ""), void e.append(t); 2025 | e.textContent = t.textContent; 2026 | } 2027 | } 2028 | const Ei = new Set(["sanitize", "allowList", "sanitizeFn"]), 2029 | Ci = "fade", 2030 | Ti = "show", 2031 | ki = ".modal", 2032 | $i = "hide.bs.modal", 2033 | Si = "hover", 2034 | Li = "focus", 2035 | Oi = { 2036 | AUTO: "auto", 2037 | TOP: "top", 2038 | RIGHT: p() ? "left" : "right", 2039 | BOTTOM: "bottom", 2040 | LEFT: p() ? "right" : "left", 2041 | }, 2042 | Ii = { 2043 | allowList: fi, 2044 | animation: !0, 2045 | boundary: "clippingParents", 2046 | container: !1, 2047 | customClass: "", 2048 | delay: 0, 2049 | fallbackPlacements: ["top", "right", "bottom", "left"], 2050 | html: !1, 2051 | offset: [0, 6], 2052 | placement: "top", 2053 | popperConfig: null, 2054 | sanitize: !0, 2055 | sanitizeFn: null, 2056 | selector: !1, 2057 | template: 2058 | '', 2059 | title: "", 2060 | trigger: "hover focus", 2061 | }, 2062 | Di = { 2063 | allowList: "object", 2064 | animation: "boolean", 2065 | boundary: "(string|element)", 2066 | container: "(string|element|boolean)", 2067 | customClass: "(string|function)", 2068 | delay: "(number|object)", 2069 | fallbackPlacements: "array", 2070 | html: "boolean", 2071 | offset: "(array|string|function)", 2072 | placement: "(string|function)", 2073 | popperConfig: "(null|object|function)", 2074 | sanitize: "boolean", 2075 | sanitizeFn: "(null|function)", 2076 | selector: "(string|boolean)", 2077 | template: "string", 2078 | title: "(string|element|function)", 2079 | trigger: "string", 2080 | }; 2081 | class Ni extends W { 2082 | constructor(t, e) { 2083 | if (void 0 === i) 2084 | throw new TypeError( 2085 | "Bootstrap's tooltips require Popper (https://popper.js.org)" 2086 | ); 2087 | super(t, e), 2088 | (this._isEnabled = !0), 2089 | (this._timeout = 0), 2090 | (this._isHovered = null), 2091 | (this._activeTrigger = {}), 2092 | (this._popper = null), 2093 | (this._templateFactory = null), 2094 | (this._newContent = null), 2095 | (this.tip = null), 2096 | this._setListeners(), 2097 | this._config.selector || this._fixTitle(); 2098 | } 2099 | static get Default() { 2100 | return Ii; 2101 | } 2102 | static get DefaultType() { 2103 | return Di; 2104 | } 2105 | static get NAME() { 2106 | return "tooltip"; 2107 | } 2108 | enable() { 2109 | this._isEnabled = !0; 2110 | } 2111 | disable() { 2112 | this._isEnabled = !1; 2113 | } 2114 | toggleEnabled() { 2115 | this._isEnabled = !this._isEnabled; 2116 | } 2117 | toggle() { 2118 | this._isEnabled && 2119 | ((this._activeTrigger.click = !this._activeTrigger.click), 2120 | this._isShown() ? this._leave() : this._enter()); 2121 | } 2122 | dispose() { 2123 | clearTimeout(this._timeout), 2124 | j.off(this._element.closest(ki), $i, this._hideModalHandler), 2125 | this._element.getAttribute("data-bs-original-title") && 2126 | this._element.setAttribute( 2127 | "title", 2128 | this._element.getAttribute("data-bs-original-title") 2129 | ), 2130 | this._disposePopper(), 2131 | super.dispose(); 2132 | } 2133 | show() { 2134 | if ("none" === this._element.style.display) 2135 | throw new Error("Please use show on visible elements"); 2136 | if (!this._isWithContent() || !this._isEnabled) return; 2137 | const t = j.trigger(this._element, this.constructor.eventName("show")), 2138 | e = ( 2139 | u(this._element) || this._element.ownerDocument.documentElement 2140 | ).contains(this._element); 2141 | if (t.defaultPrevented || !e) return; 2142 | this._disposePopper(); 2143 | const i = this._getTipElement(); 2144 | this._element.setAttribute("aria-describedby", i.getAttribute("id")); 2145 | const { container: s } = this._config; 2146 | if ( 2147 | (this._element.ownerDocument.documentElement.contains(this.tip) || 2148 | (s.append(i), 2149 | j.trigger(this._element, this.constructor.eventName("inserted"))), 2150 | (this._popper = this._createPopper(i)), 2151 | i.classList.add(Ti), 2152 | "ontouchstart" in document.documentElement) 2153 | ) 2154 | for (const t of [].concat(...document.body.children)) 2155 | j.on(t, "mouseover", _); 2156 | this._queueCallback( 2157 | () => { 2158 | j.trigger(this._element, this.constructor.eventName("shown")), 2159 | !1 === this._isHovered && this._leave(), 2160 | (this._isHovered = !1); 2161 | }, 2162 | this.tip, 2163 | this._isAnimated() 2164 | ); 2165 | } 2166 | hide() { 2167 | if ( 2168 | this._isShown() && 2169 | !j.trigger(this._element, this.constructor.eventName("hide")) 2170 | .defaultPrevented 2171 | ) { 2172 | if ( 2173 | (this._getTipElement().classList.remove(Ti), 2174 | "ontouchstart" in document.documentElement) 2175 | ) 2176 | for (const t of [].concat(...document.body.children)) 2177 | j.off(t, "mouseover", _); 2178 | (this._activeTrigger.click = !1), 2179 | (this._activeTrigger[Li] = !1), 2180 | (this._activeTrigger[Si] = !1), 2181 | (this._isHovered = null), 2182 | this._queueCallback( 2183 | () => { 2184 | this._isWithActiveTrigger() || 2185 | (this._isHovered || this._disposePopper(), 2186 | this._element.removeAttribute("aria-describedby"), 2187 | j.trigger(this._element, this.constructor.eventName("hidden"))); 2188 | }, 2189 | this.tip, 2190 | this._isAnimated() 2191 | ); 2192 | } 2193 | } 2194 | update() { 2195 | this._popper && this._popper.update(); 2196 | } 2197 | _isWithContent() { 2198 | return Boolean(this._getTitle()); 2199 | } 2200 | _getTipElement() { 2201 | return ( 2202 | this.tip || 2203 | (this.tip = this._createTipElement( 2204 | this._newContent || this._getContentForTemplate() 2205 | )), 2206 | this.tip 2207 | ); 2208 | } 2209 | _createTipElement(t) { 2210 | const e = this._getTemplateFactory(t).toHtml(); 2211 | if (!e) return null; 2212 | e.classList.remove(Ci, Ti), 2213 | e.classList.add(`bs-${this.constructor.NAME}-auto`); 2214 | const i = ((t) => { 2215 | do { 2216 | t += Math.floor(1e6 * Math.random()); 2217 | } while (document.getElementById(t)); 2218 | return t; 2219 | })(this.constructor.NAME).toString(); 2220 | return ( 2221 | e.setAttribute("id", i), this._isAnimated() && e.classList.add(Ci), e 2222 | ); 2223 | } 2224 | setContent(t) { 2225 | (this._newContent = t), 2226 | this._isShown() && (this._disposePopper(), this.show()); 2227 | } 2228 | _getTemplateFactory(t) { 2229 | return ( 2230 | this._templateFactory 2231 | ? this._templateFactory.changeContent(t) 2232 | : (this._templateFactory = new Ai({ 2233 | ...this._config, 2234 | content: t, 2235 | extraClass: this._resolvePossibleFunction( 2236 | this._config.customClass 2237 | ), 2238 | })), 2239 | this._templateFactory 2240 | ); 2241 | } 2242 | _getContentForTemplate() { 2243 | return { ".tooltip-inner": this._getTitle() }; 2244 | } 2245 | _getTitle() { 2246 | return ( 2247 | this._resolvePossibleFunction(this._config.title) || 2248 | this._element.getAttribute("data-bs-original-title") 2249 | ); 2250 | } 2251 | _initializeOnDelegatedTarget(t) { 2252 | return this.constructor.getOrCreateInstance( 2253 | t.delegateTarget, 2254 | this._getDelegateConfig() 2255 | ); 2256 | } 2257 | _isAnimated() { 2258 | return ( 2259 | this._config.animation || (this.tip && this.tip.classList.contains(Ci)) 2260 | ); 2261 | } 2262 | _isShown() { 2263 | return this.tip && this.tip.classList.contains(Ti); 2264 | } 2265 | _createPopper(t) { 2266 | const e = v(this._config.placement, [this, t, this._element]), 2267 | s = Oi[e.toUpperCase()]; 2268 | return i.createPopper(this._element, t, this._getPopperConfig(s)); 2269 | } 2270 | _getOffset() { 2271 | const { offset: t } = this._config; 2272 | return "string" == typeof t 2273 | ? t.split(",").map((t) => Number.parseInt(t, 10)) 2274 | : "function" == typeof t 2275 | ? (e) => t(e, this._element) 2276 | : t; 2277 | } 2278 | _resolvePossibleFunction(t) { 2279 | return v(t, [this._element]); 2280 | } 2281 | _getPopperConfig(t) { 2282 | const e = { 2283 | placement: t, 2284 | modifiers: [ 2285 | { 2286 | name: "flip", 2287 | options: { fallbackPlacements: this._config.fallbackPlacements }, 2288 | }, 2289 | { name: "offset", options: { offset: this._getOffset() } }, 2290 | { 2291 | name: "preventOverflow", 2292 | options: { boundary: this._config.boundary }, 2293 | }, 2294 | { 2295 | name: "arrow", 2296 | options: { element: `.${this.constructor.NAME}-arrow` }, 2297 | }, 2298 | { 2299 | name: "preSetPlacement", 2300 | enabled: !0, 2301 | phase: "beforeMain", 2302 | fn: (t) => { 2303 | this._getTipElement().setAttribute( 2304 | "data-popper-placement", 2305 | t.state.placement 2306 | ); 2307 | }, 2308 | }, 2309 | ], 2310 | }; 2311 | return { ...e, ...v(this._config.popperConfig, [e]) }; 2312 | } 2313 | _setListeners() { 2314 | const t = this._config.trigger.split(" "); 2315 | for (const e of t) 2316 | if ("click" === e) 2317 | j.on( 2318 | this._element, 2319 | this.constructor.eventName("click"), 2320 | this._config.selector, 2321 | (t) => { 2322 | this._initializeOnDelegatedTarget(t).toggle(); 2323 | } 2324 | ); 2325 | else if ("manual" !== e) { 2326 | const t = 2327 | e === Si 2328 | ? this.constructor.eventName("mouseenter") 2329 | : this.constructor.eventName("focusin"), 2330 | i = 2331 | e === Si 2332 | ? this.constructor.eventName("mouseleave") 2333 | : this.constructor.eventName("focusout"); 2334 | j.on(this._element, t, this._config.selector, (t) => { 2335 | const e = this._initializeOnDelegatedTarget(t); 2336 | (e._activeTrigger["focusin" === t.type ? Li : Si] = !0), e._enter(); 2337 | }), 2338 | j.on(this._element, i, this._config.selector, (t) => { 2339 | const e = this._initializeOnDelegatedTarget(t); 2340 | (e._activeTrigger["focusout" === t.type ? Li : Si] = 2341 | e._element.contains(t.relatedTarget)), 2342 | e._leave(); 2343 | }); 2344 | } 2345 | (this._hideModalHandler = () => { 2346 | this._element && this.hide(); 2347 | }), 2348 | j.on(this._element.closest(ki), $i, this._hideModalHandler); 2349 | } 2350 | _fixTitle() { 2351 | const t = this._element.getAttribute("title"); 2352 | t && 2353 | (this._element.getAttribute("aria-label") || 2354 | this._element.textContent.trim() || 2355 | this._element.setAttribute("aria-label", t), 2356 | this._element.setAttribute("data-bs-original-title", t), 2357 | this._element.removeAttribute("title")); 2358 | } 2359 | _enter() { 2360 | this._isShown() || this._isHovered 2361 | ? (this._isHovered = !0) 2362 | : ((this._isHovered = !0), 2363 | this._setTimeout(() => { 2364 | this._isHovered && this.show(); 2365 | }, this._config.delay.show)); 2366 | } 2367 | _leave() { 2368 | this._isWithActiveTrigger() || 2369 | ((this._isHovered = !1), 2370 | this._setTimeout(() => { 2371 | this._isHovered || this.hide(); 2372 | }, this._config.delay.hide)); 2373 | } 2374 | _setTimeout(t, e) { 2375 | clearTimeout(this._timeout), (this._timeout = setTimeout(t, e)); 2376 | } 2377 | _isWithActiveTrigger() { 2378 | return Object.values(this._activeTrigger).includes(!0); 2379 | } 2380 | _getConfig(t) { 2381 | const e = B.getDataAttributes(this._element); 2382 | for (const t of Object.keys(e)) Ei.has(t) && delete e[t]; 2383 | return ( 2384 | (t = { ...e, ...("object" == typeof t && t ? t : {}) }), 2385 | (t = this._mergeConfigObj(t)), 2386 | (t = this._configAfterMerge(t)), 2387 | this._typeCheckConfig(t), 2388 | t 2389 | ); 2390 | } 2391 | _configAfterMerge(t) { 2392 | return ( 2393 | (t.container = !1 === t.container ? document.body : c(t.container)), 2394 | "number" == typeof t.delay && 2395 | (t.delay = { show: t.delay, hide: t.delay }), 2396 | "number" == typeof t.title && (t.title = t.title.toString()), 2397 | "number" == typeof t.content && (t.content = t.content.toString()), 2398 | t 2399 | ); 2400 | } 2401 | _getDelegateConfig() { 2402 | const t = {}; 2403 | for (const [e, i] of Object.entries(this._config)) 2404 | this.constructor.Default[e] !== i && (t[e] = i); 2405 | return (t.selector = !1), (t.trigger = "manual"), t; 2406 | } 2407 | _disposePopper() { 2408 | this._popper && (this._popper.destroy(), (this._popper = null)), 2409 | this.tip && (this.tip.remove(), (this.tip = null)); 2410 | } 2411 | static jQueryInterface(t) { 2412 | return this.each(function () { 2413 | const e = Ni.getOrCreateInstance(this, t); 2414 | if ("string" == typeof t) { 2415 | if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); 2416 | e[t](); 2417 | } 2418 | }); 2419 | } 2420 | } 2421 | b(Ni); 2422 | const Pi = { 2423 | ...Ni.Default, 2424 | content: "", 2425 | offset: [0, 8], 2426 | placement: "right", 2427 | template: 2428 | '', 2429 | trigger: "click", 2430 | }, 2431 | xi = { ...Ni.DefaultType, content: "(null|string|element|function)" }; 2432 | class Mi extends Ni { 2433 | static get Default() { 2434 | return Pi; 2435 | } 2436 | static get DefaultType() { 2437 | return xi; 2438 | } 2439 | static get NAME() { 2440 | return "popover"; 2441 | } 2442 | _isWithContent() { 2443 | return this._getTitle() || this._getContent(); 2444 | } 2445 | _getContentForTemplate() { 2446 | return { 2447 | ".popover-header": this._getTitle(), 2448 | ".popover-body": this._getContent(), 2449 | }; 2450 | } 2451 | _getContent() { 2452 | return this._resolvePossibleFunction(this._config.content); 2453 | } 2454 | static jQueryInterface(t) { 2455 | return this.each(function () { 2456 | const e = Mi.getOrCreateInstance(this, t); 2457 | if ("string" == typeof t) { 2458 | if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); 2459 | e[t](); 2460 | } 2461 | }); 2462 | } 2463 | } 2464 | b(Mi); 2465 | const ji = ".bs.scrollspy", 2466 | Fi = `activate${ji}`, 2467 | zi = `click${ji}`, 2468 | Hi = `load${ji}.data-api`, 2469 | Bi = "active", 2470 | qi = "[href]", 2471 | Wi = ".nav-link", 2472 | Ri = `${Wi}, .nav-item > ${Wi}, .list-group-item`, 2473 | Ki = { 2474 | offset: null, 2475 | rootMargin: "0px 0px -25%", 2476 | smoothScroll: !1, 2477 | target: null, 2478 | threshold: [0.1, 0.5, 1], 2479 | }, 2480 | Vi = { 2481 | offset: "(number|null)", 2482 | rootMargin: "string", 2483 | smoothScroll: "boolean", 2484 | target: "element", 2485 | threshold: "array", 2486 | }; 2487 | class Qi extends W { 2488 | constructor(t, e) { 2489 | super(t, e), 2490 | (this._targetLinks = new Map()), 2491 | (this._observableSections = new Map()), 2492 | (this._rootElement = 2493 | "visible" === getComputedStyle(this._element).overflowY 2494 | ? null 2495 | : this._element), 2496 | (this._activeTarget = null), 2497 | (this._observer = null), 2498 | (this._previousScrollData = { visibleEntryTop: 0, parentScrollTop: 0 }), 2499 | this.refresh(); 2500 | } 2501 | static get Default() { 2502 | return Ki; 2503 | } 2504 | static get DefaultType() { 2505 | return Vi; 2506 | } 2507 | static get NAME() { 2508 | return "scrollspy"; 2509 | } 2510 | refresh() { 2511 | this._initializeTargetsAndObservables(), 2512 | this._maybeEnableSmoothScroll(), 2513 | this._observer 2514 | ? this._observer.disconnect() 2515 | : (this._observer = this._getNewObserver()); 2516 | for (const t of this._observableSections.values()) 2517 | this._observer.observe(t); 2518 | } 2519 | dispose() { 2520 | this._observer.disconnect(), super.dispose(); 2521 | } 2522 | _configAfterMerge(t) { 2523 | return ( 2524 | (t.target = c(t.target) || document.body), 2525 | (t.rootMargin = t.offset ? `${t.offset}px 0px -30%` : t.rootMargin), 2526 | "string" == typeof t.threshold && 2527 | (t.threshold = t.threshold 2528 | .split(",") 2529 | .map((t) => Number.parseFloat(t))), 2530 | t 2531 | ); 2532 | } 2533 | _maybeEnableSmoothScroll() { 2534 | this._config.smoothScroll && 2535 | (j.off(this._config.target, zi), 2536 | j.on(this._config.target, zi, qi, (t) => { 2537 | const e = this._observableSections.get(t.target.hash); 2538 | if (e) { 2539 | t.preventDefault(); 2540 | const i = this._rootElement || window, 2541 | s = e.offsetTop - this._element.offsetTop; 2542 | if (i.scrollTo) 2543 | return void i.scrollTo({ top: s, behavior: "smooth" }); 2544 | i.scrollTop = s; 2545 | } 2546 | })); 2547 | } 2548 | _getNewObserver() { 2549 | const t = { 2550 | root: this._rootElement, 2551 | threshold: this._config.threshold, 2552 | rootMargin: this._config.rootMargin, 2553 | }; 2554 | return new IntersectionObserver((t) => this._observerCallback(t), t); 2555 | } 2556 | _observerCallback(t) { 2557 | const e = (t) => this._targetLinks.get(`#${t.target.id}`), 2558 | i = (t) => { 2559 | (this._previousScrollData.visibleEntryTop = t.target.offsetTop), 2560 | this._process(e(t)); 2561 | }, 2562 | s = (this._rootElement || document.documentElement).scrollTop, 2563 | n = s >= this._previousScrollData.parentScrollTop; 2564 | this._previousScrollData.parentScrollTop = s; 2565 | for (const o of t) { 2566 | if (!o.isIntersecting) { 2567 | (this._activeTarget = null), this._clearActiveClass(e(o)); 2568 | continue; 2569 | } 2570 | const t = 2571 | o.target.offsetTop >= this._previousScrollData.visibleEntryTop; 2572 | if (n && t) { 2573 | if ((i(o), !s)) return; 2574 | } else n || t || i(o); 2575 | } 2576 | } 2577 | _initializeTargetsAndObservables() { 2578 | (this._targetLinks = new Map()), (this._observableSections = new Map()); 2579 | const t = K.find(qi, this._config.target); 2580 | for (const e of t) { 2581 | if (!e.hash || d(e)) continue; 2582 | const t = K.findOne(decodeURI(e.hash), this._element); 2583 | h(t) && 2584 | (this._targetLinks.set(decodeURI(e.hash), e), 2585 | this._observableSections.set(e.hash, t)); 2586 | } 2587 | } 2588 | _process(t) { 2589 | this._activeTarget !== t && 2590 | (this._clearActiveClass(this._config.target), 2591 | (this._activeTarget = t), 2592 | t.classList.add(Bi), 2593 | this._activateParents(t), 2594 | j.trigger(this._element, Fi, { relatedTarget: t })); 2595 | } 2596 | _activateParents(t) { 2597 | if (t.classList.contains("dropdown-item")) 2598 | K.findOne(".dropdown-toggle", t.closest(".dropdown")).classList.add(Bi); 2599 | else 2600 | for (const e of K.parents(t, ".nav, .list-group")) 2601 | for (const t of K.prev(e, Ri)) t.classList.add(Bi); 2602 | } 2603 | _clearActiveClass(t) { 2604 | t.classList.remove(Bi); 2605 | const e = K.find(`${qi}.${Bi}`, t); 2606 | for (const t of e) t.classList.remove(Bi); 2607 | } 2608 | static jQueryInterface(t) { 2609 | return this.each(function () { 2610 | const e = Qi.getOrCreateInstance(this, t); 2611 | if ("string" == typeof t) { 2612 | if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) 2613 | throw new TypeError(`No method named "${t}"`); 2614 | e[t](); 2615 | } 2616 | }); 2617 | } 2618 | } 2619 | j.on(window, Hi, () => { 2620 | for (const t of K.find('[data-bs-spy="scroll"]')) Qi.getOrCreateInstance(t); 2621 | }), 2622 | b(Qi); 2623 | const Xi = ".bs.tab", 2624 | Yi = `hide${Xi}`, 2625 | Ui = `hidden${Xi}`, 2626 | Gi = `show${Xi}`, 2627 | Ji = `shown${Xi}`, 2628 | Zi = `click${Xi}`, 2629 | ts = `keydown${Xi}`, 2630 | es = `load${Xi}`, 2631 | is = "ArrowLeft", 2632 | ss = "ArrowRight", 2633 | ns = "ArrowUp", 2634 | os = "ArrowDown", 2635 | rs = "Home", 2636 | as = "End", 2637 | ls = "active", 2638 | cs = "fade", 2639 | hs = "show", 2640 | ds = ".dropdown-toggle", 2641 | us = `:not(${ds})`, 2642 | _s = 2643 | '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', 2644 | gs = `.nav-link${us}, .list-group-item${us}, [role="tab"]${us}, ${_s}`, 2645 | fs = `.${ls}[data-bs-toggle="tab"], .${ls}[data-bs-toggle="pill"], .${ls}[data-bs-toggle="list"]`; 2646 | class ms extends W { 2647 | constructor(t) { 2648 | super(t), 2649 | (this._parent = this._element.closest( 2650 | '.list-group, .nav, [role="tablist"]' 2651 | )), 2652 | this._parent && 2653 | (this._setInitialAttributes(this._parent, this._getChildren()), 2654 | j.on(this._element, ts, (t) => this._keydown(t))); 2655 | } 2656 | static get NAME() { 2657 | return "tab"; 2658 | } 2659 | show() { 2660 | const t = this._element; 2661 | if (this._elemIsActive(t)) return; 2662 | const e = this._getActiveElem(), 2663 | i = e ? j.trigger(e, Yi, { relatedTarget: t }) : null; 2664 | j.trigger(t, Gi, { relatedTarget: e }).defaultPrevented || 2665 | (i && i.defaultPrevented) || 2666 | (this._deactivate(e, t), this._activate(t, e)); 2667 | } 2668 | _activate(t, e) { 2669 | t && 2670 | (t.classList.add(ls), 2671 | this._activate(K.getElementFromSelector(t)), 2672 | this._queueCallback( 2673 | () => { 2674 | "tab" === t.getAttribute("role") 2675 | ? (t.removeAttribute("tabindex"), 2676 | t.setAttribute("aria-selected", !0), 2677 | this._toggleDropDown(t, !0), 2678 | j.trigger(t, Ji, { relatedTarget: e })) 2679 | : t.classList.add(hs); 2680 | }, 2681 | t, 2682 | t.classList.contains(cs) 2683 | )); 2684 | } 2685 | _deactivate(t, e) { 2686 | t && 2687 | (t.classList.remove(ls), 2688 | t.blur(), 2689 | this._deactivate(K.getElementFromSelector(t)), 2690 | this._queueCallback( 2691 | () => { 2692 | "tab" === t.getAttribute("role") 2693 | ? (t.setAttribute("aria-selected", !1), 2694 | t.setAttribute("tabindex", "-1"), 2695 | this._toggleDropDown(t, !1), 2696 | j.trigger(t, Ui, { relatedTarget: e })) 2697 | : t.classList.remove(hs); 2698 | }, 2699 | t, 2700 | t.classList.contains(cs) 2701 | )); 2702 | } 2703 | _keydown(t) { 2704 | if (![is, ss, ns, os, rs, as].includes(t.key)) return; 2705 | t.stopPropagation(), t.preventDefault(); 2706 | const e = this._getChildren().filter((t) => !d(t)); 2707 | let i; 2708 | if ([rs, as].includes(t.key)) i = e[t.key === rs ? 0 : e.length - 1]; 2709 | else { 2710 | const s = [ss, os].includes(t.key); 2711 | i = w(e, t.target, s, !0); 2712 | } 2713 | i && (i.focus({ preventScroll: !0 }), ms.getOrCreateInstance(i).show()); 2714 | } 2715 | _getChildren() { 2716 | return K.find(gs, this._parent); 2717 | } 2718 | _getActiveElem() { 2719 | return this._getChildren().find((t) => this._elemIsActive(t)) || null; 2720 | } 2721 | _setInitialAttributes(t, e) { 2722 | this._setAttributeIfNotExists(t, "role", "tablist"); 2723 | for (const t of e) this._setInitialAttributesOnChild(t); 2724 | } 2725 | _setInitialAttributesOnChild(t) { 2726 | t = this._getInnerElement(t); 2727 | const e = this._elemIsActive(t), 2728 | i = this._getOuterElement(t); 2729 | t.setAttribute("aria-selected", e), 2730 | i !== t && this._setAttributeIfNotExists(i, "role", "presentation"), 2731 | e || t.setAttribute("tabindex", "-1"), 2732 | this._setAttributeIfNotExists(t, "role", "tab"), 2733 | this._setInitialAttributesOnTargetPanel(t); 2734 | } 2735 | _setInitialAttributesOnTargetPanel(t) { 2736 | const e = K.getElementFromSelector(t); 2737 | e && 2738 | (this._setAttributeIfNotExists(e, "role", "tabpanel"), 2739 | t.id && this._setAttributeIfNotExists(e, "aria-labelledby", `${t.id}`)); 2740 | } 2741 | _toggleDropDown(t, e) { 2742 | const i = this._getOuterElement(t); 2743 | if (!i.classList.contains("dropdown")) return; 2744 | const s = (t, s) => { 2745 | const n = K.findOne(t, i); 2746 | n && n.classList.toggle(s, e); 2747 | }; 2748 | s(ds, ls), s(".dropdown-menu", hs), i.setAttribute("aria-expanded", e); 2749 | } 2750 | _setAttributeIfNotExists(t, e, i) { 2751 | t.hasAttribute(e) || t.setAttribute(e, i); 2752 | } 2753 | _elemIsActive(t) { 2754 | return t.classList.contains(ls); 2755 | } 2756 | _getInnerElement(t) { 2757 | return t.matches(gs) ? t : K.findOne(gs, t); 2758 | } 2759 | _getOuterElement(t) { 2760 | return t.closest(".nav-item, .list-group-item") || t; 2761 | } 2762 | static jQueryInterface(t) { 2763 | return this.each(function () { 2764 | const e = ms.getOrCreateInstance(this); 2765 | if ("string" == typeof t) { 2766 | if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) 2767 | throw new TypeError(`No method named "${t}"`); 2768 | e[t](); 2769 | } 2770 | }); 2771 | } 2772 | } 2773 | j.on(document, Zi, _s, function (t) { 2774 | ["A", "AREA"].includes(this.tagName) && t.preventDefault(), 2775 | d(this) || ms.getOrCreateInstance(this).show(); 2776 | }), 2777 | j.on(window, es, () => { 2778 | for (const t of K.find(fs)) ms.getOrCreateInstance(t); 2779 | }), 2780 | b(ms); 2781 | const ps = ".bs.toast", 2782 | bs = `mouseover${ps}`, 2783 | vs = `mouseout${ps}`, 2784 | ys = `focusin${ps}`, 2785 | ws = `focusout${ps}`, 2786 | As = `hide${ps}`, 2787 | Es = `hidden${ps}`, 2788 | Cs = `show${ps}`, 2789 | Ts = `shown${ps}`, 2790 | ks = "hide", 2791 | $s = "show", 2792 | Ss = "showing", 2793 | Ls = { animation: "boolean", autohide: "boolean", delay: "number" }, 2794 | Os = { animation: !0, autohide: !0, delay: 5e3 }; 2795 | class Is extends W { 2796 | constructor(t, e) { 2797 | super(t, e), 2798 | (this._timeout = null), 2799 | (this._hasMouseInteraction = !1), 2800 | (this._hasKeyboardInteraction = !1), 2801 | this._setListeners(); 2802 | } 2803 | static get Default() { 2804 | return Os; 2805 | } 2806 | static get DefaultType() { 2807 | return Ls; 2808 | } 2809 | static get NAME() { 2810 | return "toast"; 2811 | } 2812 | show() { 2813 | j.trigger(this._element, Cs).defaultPrevented || 2814 | (this._clearTimeout(), 2815 | this._config.animation && this._element.classList.add("fade"), 2816 | this._element.classList.remove(ks), 2817 | g(this._element), 2818 | this._element.classList.add($s, Ss), 2819 | this._queueCallback( 2820 | () => { 2821 | this._element.classList.remove(Ss), 2822 | j.trigger(this._element, Ts), 2823 | this._maybeScheduleHide(); 2824 | }, 2825 | this._element, 2826 | this._config.animation 2827 | )); 2828 | } 2829 | hide() { 2830 | this.isShown() && 2831 | (j.trigger(this._element, As).defaultPrevented || 2832 | (this._element.classList.add(Ss), 2833 | this._queueCallback( 2834 | () => { 2835 | this._element.classList.add(ks), 2836 | this._element.classList.remove(Ss, $s), 2837 | j.trigger(this._element, Es); 2838 | }, 2839 | this._element, 2840 | this._config.animation 2841 | ))); 2842 | } 2843 | dispose() { 2844 | this._clearTimeout(), 2845 | this.isShown() && this._element.classList.remove($s), 2846 | super.dispose(); 2847 | } 2848 | isShown() { 2849 | return this._element.classList.contains($s); 2850 | } 2851 | _maybeScheduleHide() { 2852 | this._config.autohide && 2853 | (this._hasMouseInteraction || 2854 | this._hasKeyboardInteraction || 2855 | (this._timeout = setTimeout(() => { 2856 | this.hide(); 2857 | }, this._config.delay))); 2858 | } 2859 | _onInteraction(t, e) { 2860 | switch (t.type) { 2861 | case "mouseover": 2862 | case "mouseout": 2863 | this._hasMouseInteraction = e; 2864 | break; 2865 | case "focusin": 2866 | case "focusout": 2867 | this._hasKeyboardInteraction = e; 2868 | } 2869 | if (e) return void this._clearTimeout(); 2870 | const i = t.relatedTarget; 2871 | this._element === i || 2872 | this._element.contains(i) || 2873 | this._maybeScheduleHide(); 2874 | } 2875 | _setListeners() { 2876 | j.on(this._element, bs, (t) => this._onInteraction(t, !0)), 2877 | j.on(this._element, vs, (t) => this._onInteraction(t, !1)), 2878 | j.on(this._element, ys, (t) => this._onInteraction(t, !0)), 2879 | j.on(this._element, ws, (t) => this._onInteraction(t, !1)); 2880 | } 2881 | _clearTimeout() { 2882 | clearTimeout(this._timeout), (this._timeout = null); 2883 | } 2884 | static jQueryInterface(t) { 2885 | return this.each(function () { 2886 | const e = Is.getOrCreateInstance(this, t); 2887 | if ("string" == typeof t) { 2888 | if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); 2889 | e[t](this); 2890 | } 2891 | }); 2892 | } 2893 | } 2894 | return ( 2895 | V(Is), 2896 | b(Is), 2897 | { 2898 | Alert: U, 2899 | Button: J, 2900 | Carousel: Ot, 2901 | Collapse: Rt, 2902 | Dropdown: fe, 2903 | Modal: Ue, 2904 | Offcanvas: gi, 2905 | Popover: Mi, 2906 | ScrollSpy: Qi, 2907 | Tab: ms, 2908 | Toast: Is, 2909 | Tooltip: Ni, 2910 | } 2911 | ); 2912 | }); 2913 | //# sourceMappingURL=bootstrap.min.js.map 2914 | --------------------------------------------------------------------------------