Files
LinuxMirrors/docs/assets/js/modules/tdesign.min.js

22 lines
1.1 MiB
JavaScript
Raw Normal View History

2025-03-28 18:43:22 +08:00
/**
2025-05-10 04:55:20 +08:00
* tdesign v1.12.0
2025-03-28 18:43:22 +08:00
* (c) 2025 tdesign
* @license MIT
*/
2025-05-10 04:55:20 +08:00
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TDesign={},e.Vue)}(this,(function(e,t){"use strict";function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(t);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||a(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===u(t)?t:String(t)}function s(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d="object"==("undefined"==typeof global?"undefined":u(global))&&global&&global.Object===Object&&global,v="object"==("undefined"==typeof self?"undefined":u(self))&&self&&self.Object===Object&&self,f=d||v||Function("return this")(),p=f.Symbol,m=Object.prototype,h=m.hasOwnProperty,g=m.toString,y=p?p.toStringTag:void 0;var b=Object.prototype.toString;var w=p?p.toStringTag:void 0;function O(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=h.call(e,y),n=e[y];try{e[y]=void 0;var r=!0}catch(e){}var o=g.call(e);return r&&(t?e[y]=n:delete e[y]),o}(e):function(e){return b.call(e)}(e)}function C(e){return null!=e&&"object"==u(e)}function x(e){return"symbol"==u(e)||C(e)&&"[object Symbol]"==O(e)}function P(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var j=Array.isArray,S=p?p.prototype:void 0,k=S?S.toString:void 0;function N(e){if("string"==typeof e)return e;if(j(e))return P(e,N)+"";if(x(e))return k?k.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var _=/\s/;var V=/^\s+/;function D(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&_.test(e.charAt(t)););return t}(e)+1).replace(V,""):e}function E(e){var t=u(e);return null!=e&&("object"==t||"function"==t)}var F=/^[-+]0x[0-9a-f]+$/i,T=/^0b[01]+$/i,I=/^0o[0-7]+$/i,M=parseInt;function A(e){if("number"==typeof e)return e;if(x(e))return NaN;if(E(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=E(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=D(e);var n=T.test(e);return n||I.test(e)?M(e.slice(2),n?2:8):F.test(e)?NaN:+e}var B=1/0;function L(e){return e?(e=A(e))===B||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function R(e){var t=L(e),n=t%1;return t==t?n?t-n:t:0}function z(e){return e}function H(e){if(!E(e))return!1;var t=O(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var W,K=f["__core-js_shared__"],U=(W=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"";var Y=Function.prototype.toString;function $(e){if(null
2025-03-28 18:43:22 +08:00
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2025-05-10 04:55:20 +08:00
e.exports=n=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var r,o={},a=Object.prototype,l=a.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function v(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch(r){v=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),l=new F(r||[]);return i(a,"_invoke",{value:_(e,n,l)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}o.wrap=f;var m="suspendedStart",h="suspendedYield",g="executing",y="completed",b={};function w(){}function O(){}function C(){}var x={};v(x,c,(function(){return this}));var P=Object.getPrototypeOf,j=P&&P(P(T([])));j&&j!==a&&l.call(j,c)&&(x=j);var S=C.prototype=w.prototype=Object.create(x);function k(e){["next","throw","return"].forEach((function(t){v(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,n){function r(o,a,i,u){var c=p(e[o],e,a);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==t(d)&&l.call(d,"__await")?n.resolve(d.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):n.resolve(d).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(a,a):a()}})}function _(e,t,n){var o=m;return function(a,l){if(o===g)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw l;return{value:r,done:!0}}for(n.method=a,n.arg=l;;){var i=n.delegate;if(i){var u=V(i,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=p(e,t,n);if("normal"===c.type){if(o=n.done?y:h,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=y,n.method="throw",n.arg=c.arg)}}}function V(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,V(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var a=p(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,b;var l=a.arg;return l?l.done?(t[e.resultName]=l.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,b):l:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,b)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function F(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(l.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return O.prototype=C,i(S,"constructor",{value:C,configurable:!0}),i(C,"constructor",{value:O,configurable:!0}),O.displayName=v(C,d,"GeneratorFunction"),o.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,v(e,d,"GeneratorFunction")),e.prototype=Object.create(S),e},o.awrap=function(e){return{__await:e}},k(N.prototype),v(N.prototype,s,(function(){return this})),o.AsyncIterator=N,o.async=function(e,t,n,r,a){void 0===a&&(a=Promise);var l=new N(f(e,t,n,r),a);return o.isGeneratorFunction(t)?l:l.next().then((function(e){return e.done?e.value
2025-03-28 18:43:22 +08:00
/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
2025-05-10 04:55:20 +08:00
!function(e){var t;t=function(){return function(){var e={686:function(e,t,n){n.d(t,{default:function(){return C}});var r=n(279),o=n.n(r),a=n(370),l=n.n(a),i=n(817),u=n.n(i);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var s=function(e){var t=u()(e);return c("cut"),t},d=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=u()(n);return c("copy"),n.remove(),r},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=d(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=d(e.value,t):(n=u()(e),c("copy")),n};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,o=e.target,a=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==f(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return a?v(a,{container:r}):o?"cut"===n?s(o):v(o,{container:r}):void 0};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,n)}}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function w(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(a,e);var t,n,r,o=y(a);function a(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(n=o.call(this)).resolveOptions(t),n.listenClick(e),n}return t=a,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.
2025-03-28 18:43:22 +08:00
/**!
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
2025-05-10 04:55:20 +08:00
*/function ME(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ME(Object(n),!0).forEach((function(t){LE(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ME(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BE(e){return BE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BE(e)}function LE(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RE(){return RE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RE.apply(this,arguments)}function zE(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function HE(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var WE=HE(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),KE=HE(/Edge/i),UE=HE(/firefox/i),YE=HE(/safari/i)&&!HE(/chrome/i)&&!HE(/android/i),$E=HE(/iP(ad|od|hone)/i),ZE=HE(/chrome/i)&&HE(/android/i),qE={capture:!1,passive:!1};function XE(e,t,n){e.addEventListener(t,n,!WE&&qE)}function GE(e,t,n){e.removeEventListener(t,n,!WE&&qE)}function JE(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function QE(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function eF(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&JE(e,t):JE(e,t))||r&&e===n)return e;if(e===n)break}while(e=QE(e))}return null}var tF,nF=/\s+/g;function rF(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(nF," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(nF," ")}}function oF(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function aF(e,t){var n="";if("string"==typeof e)n=e;else do{var r=oF(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function lF(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function iF(){var e=document.scrollingElement;return e||document.documentElement}function uF(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var a,l,i,u,c,s,d;if(e!==window&&e.parentNode&&e!==iF()?(l=(a=e.getBoundingClientRect()).top,i=a.left,u=a.bottom,c=a.right,s=a.height,d=a.width):(l=0,i=0,u=window.innerHeight,c=window.innerWidth,s=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!WE))do{if(o&&o.getBoundingClientRect&&("none"!==oF(o,"transform")||n&&"static"!==oF(o,"position"))){var v=o.getBoundingClientRect();l-=v.top+parseInt(oF(o,"border-top-width")),i-=v.left+parseInt(oF(o,"border-left-width")),u=l+a.height,c=i+a.width;break}}while(o=o.parentNode);if(r&&e!==window){var f=aF(o||e),p=f&&f.a,m=f&&f.d;f&&(u=(l/=m)+(s/=m),c
//# sourceMappingURL=tdesign.min.js.map