SergeyRasubaev_PIbd-21_IP_R.../3 lab/dist/assets/lines-b7354fa1.js.map

1 line
243 KiB
Plaintext
Raw Normal View History

{"version":3,"file":"lines-b7354fa1.js","sources":["../../js/validation.js","../../node_modules/bootstrap/dist/js/bootstrap.esm.js","../../js/lines-ui.js","../../js/lines-modal.js","../../js/lines-rest-api.js","../../js/lines.js"],"sourcesContent":["// модуль используется для валидации форма на странице\n\nfunction validation() {\n // поиск всех форма с классом .needs-validation\n const forms = document.querySelectorAll(\"form.needs-validation\");\n\n for (let i = 0; i < forms.length; i += 1) {\n const form = forms[i];\n // для каждой формы добавляется обработчик события отправки\n form.addEventListener(\"submit\", (event) => {\n // если форма не прошла валидацию\n // то выключить стандартное действие\n if (!form.checkValidity()) {\n event.preventDefault();\n // предотвращает распространение preventDefault\n // на другие объекты\n event.stopPropagation();\n }\n // добавляет к форме класс was-validated\n form.classList.add(\"was-validated\");\n });\n }\n}\n\nexport default validation;\n","/*!\n * Bootstrap v5.2.1 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\nimport * as Popper from '@popperjs/core';\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n};\n/**\n * Public Util API\n */\n\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDurat