TrainingPlatform_Django/static/dist/js/tabler.min.js

15 lines
133 KiB
JavaScript
Raw Permalink Normal View History

2025-06-03 16:10:11 +08:00
/*!
* Tabler v1.0.0-beta20 (https://tabler.io)
* @version 1.0.0-beta20
* @link https://tabler.io
* Copyright 2018-2023 The Tabler Authors
* Copyright 2018-2023 codecalm.net Paweł Kuna
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
*/
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";var t=new Map;function e(e){var s=t.get(e);s&&s.destroy()}function s(e){var s=t.get(e);s&&s.update()}var i=null;"undefined"==typeof window?((i=function(t){return t}).destroy=function(t){return t},i.update=function(t){return t}):((i=function(e,s){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!t.has(e)){var s,i=null,n=window.getComputedStyle(e),r=(s=e.value,function(){a({testForHeightReduction:""===s||!e.value.startsWith(s),restoreTextAlign:null}),s=e.value}),o=function(s){e.removeEventListener("autosize:destroy",o),e.removeEventListener("autosize:update",l),e.removeEventListener("input",r),window.removeEventListener("resize",l),Object.keys(s).forEach((function(t){return e.style[t]=s[t]})),t.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,textAlign:e.style.textAlign,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",o),e.addEventListener("autosize:update",l),e.addEventListener("input",r),window.addEventListener("resize",l),e.style.overflowX="hidden",e.style.wordWrap="break-word",t.set(e,{destroy:o,update:l}),l()}function a(t){var s,r,o=t.restoreTextAlign,l=void 0===o?null:o,u=t.testForHeightReduction,h=void 0===u||u,c=n.overflowY;if(0!==e.scrollHeight&&("vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),h&&(s=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],s=t[1];e.style.scrollBehavior="auto",e.scrollTop=s,e.style.scrollBehavior=null}))}}(e),e.style.height=""),r="content-box"===n.boxSizing?e.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):e.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&r>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(e.style.overflow="scroll"),r=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(e.style.overflow="hidden"),e.style.height=r+"px",l&&(e.style.textAlign=l),s&&s(),i!==r&&(e.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),i=r),c!==n.overflow&&!l)){var d=n.textAlign;"hidden"===n.overflow&&(e.style.textAlign="start"===d?"end":"start"),a({restoreTextAlign:d,testForHeightReduction:!0})}}function l(){a({testForHeightReduction:!0,restoreTextAlign:null})}}(e)})),e}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],e),t},i.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],s),t});var n=i,r=document.querySelectorAll('[data-bs-toggle="autosize"]');function o(t,e){if(null==t)return{};var s,i,n={},r=Object.keys(t);for(i=0;i<r.length;i++)s=r[i],e.indexOf(s)>=0||(n[s]=t[s]);return n}function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new a.InputMask(t,e)}r.length&&r.forEach((function(t){n(t)}));class l{constructor(t){Object.assign(this,{inserted:"",rawInserted:"",skip:!1,tailShift:0},t)}aggregate(t){return this.rawInserted+=t.rawInserted,this.skip=this.skip||t.skip,this.inserted+=t.inserted,this.tailShift+=t.tailShift,this}get offset(){return this.tailShift+this.inserted.length}}function u(t){return"string"==typeof t||t instanceof String}a.ChangeDetails=l;const h="NONE",c="LEFT",d="FORCE_LEFT",p="RIGHT",f="FORCE_RIGHT";function g(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function m(t){return Array.isArray(t)?t:[t,new l]}function _(t,e){if(e===t)return!0;var s,i=Array.isArray(e),n=Array.isArray(t);if(i&&n){if(e.length!=t.length)return!1;for(s=0;s<e.length;s++)if(!_(e[s],t[s]))return!1;return!0}if(i!=n)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){var r=e instanceof Date,o=t instanceof Date;if(r&&o)return e.getTime()==t.getTime();if(r!=o)return!1;var a=e instanceof RegExp,l=t instanceof RegExp;if(a&&l)return e.toString()==t.toString();if(a!=l)return!1;var u=Obje
/*!
* Bootstrap v5.3.1 (https://getbootstrap.com/)
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
const we=new Map,Ee={set(t,e,s){we.has(t)||we.set(t,new Map);const i=we.get(t);i.has(e)||0===i.size?i.set(e,s):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(t,e)=>we.has(t)&&we.get(t).get(e)||null,remove(t,e){if(!we.has(t))return;const s=we.get(t);s.delete(e),0===s.size&&we.delete(t)}},Ce="transitionend",xe=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,((t,e)=>`#${CSS.escape(e)}`))),t),Se=t=>{t.dispatchEvent(new Event(Ce))},Fe=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Te=t=>Fe(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(xe(t)):null,De=t=>{if(!Fe(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),s=t.closest("details:not([open])");if(!s)return e;if(s!==t){const e=t.closest("summary");if(e&&e.parentNode!==s)return!1;if(null===e)return!1}return e},Oe=t=>!t||t.nodeType!==Node.ELEMENT_NODE||(!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))),Ie=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Ie(t.parentNode):null},Be=()=>{},Me=t=>{t.offsetHeight},Pe=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Le=[],Ve=()=>"rtl"===document.documentElement.dir,Ne=t=>{var e;e=()=>{const e=Pe();if(e){const s=t.NAME,i=e.fn[s];e.fn[s]=t.jQueryInterface,e.fn[s].Constructor=t,e.fn[s].noConflict=()=>(e.fn[s]=i,t.jQueryInterface)}},"loading"===document.readyState?(Le.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Le)t()})),Le.push(e)):e()},je=(t,e=[],s=t)=>"function"==typeof t?t(...e):s,$e=(t,e,s=!0)=>{if(!s)return void je(t);const i=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:s}=window.getComputedStyle(t);const i=Number.parseFloat(e),n=Number.parseFloat(s);return i||n?(e=e.split(",")[0],s=s.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(s))):0})(e)+5;let n=!1;const r=({target:s})=>{s===e&&(n=!0,e.removeEventListener(Ce,r),je(t))};e.addEventListener(Ce,r),setTimeout((()=>{n||Se(e)}),i)},Re=(t,e,s,i)=>{const n=t.length;let r=t.indexOf(e);return-1===r?!s&&i?t[n-1]:t[0]:(r+=s?1:-1,i&&(r=(r+n)%n),t[Math.max(0,Math.min(r,n-1))])},ze=/[^.]*(?=\..*)\.|.*/,He=/\..*/,qe=/::\d+$/,We={};let Ue=1;const Ye={mouseenter:"mouseover",mouseleave:"mouseout"},Ke=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Xe(t,e){return e&&`${e}::${Ue++}`||t.uidEvent||Ue++}function Qe(t){const e=Xe(t);return t.uidEvent=e,We[e]=We[e]||{},We[e]}function Ze(t,e,s=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===s))}function Ge(t,e,s){const i="string"==typeof e,n=i?s:e||s;let r=ss(t);return Ke.has(r)||(r=t),[i,n,r]}function Je(t,e,s,i,n){if("string"!=typeof e||!t)return;let[r,o,a]=Ge(e,s,i);if(e in Ye){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};o=t(o)}const l=Qe(t),u=l[a]||(l[a]={}),h=Ze(u,o,r?s:null);if(h)return void(h.oneOff=h.oneOff&&n);const c=Xe(o,e.replace(ze,"")),d=r?function(t,e,s){return function i(n){const r=t.querySelectorAll(e);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return ns(n,{delegateTarget:o}),i.oneOff&&is.off(t,n.type,e,s),s.apply(o,[n])}}(t,s,o)