Files
RuoYi/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-fileinput/fileinput.min.js

11 lines
129 KiB
JavaScript
Raw Normal View History

2019-06-03 09:19:57 +08:00
/*!
* bootstrap-fileinput v5.2.4
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD-3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(window.jQuery)}(function(L){"use strict";L.fn.fileinputLocales={},L.fn.fileinputThemes={},L.fn.fileinputBsVersion||(L.fn.fileinputBsVersion=window.Alert&&window.Alert.VERSION||window.bootstrap&&window.bootstrap.Alert&&bootstrap.Alert.VERSION||"3.x.x"),String.prototype.setTokens=function(e){var t,i,a=this.toString();for(t in e)e.hasOwnProperty(t)&&(i=new RegExp("{"+t+"}","g"),a=a.replace(i,e[t]));return a},Array.prototype.flatMap||(Array.prototype.flatMap=function(e){return[].concat(this.map(e))}),document.currentScript||(document.currentScript=(i=document.getElementsByTagName("script"))[i.length-1]);var e,N={FRAMES:".kv-preview-thumb",SORT_CSS:"file-sortable",INIT_FLAG:"init-",ZOOM_VAR:(e=document.currentScript.src).substring(0,e.lastIndexOf("/"))+"/loading.gif?kvTemp__2873389129__=",OBJECT_PARAMS:'<param name="controller" value="true" />\n<param name="allowFullScreen" value="true" />\n<param name="allowScriptAccess" value="always" />\n<param name="autoPlay" value="false" />\n<param name="autoStart" value="false" />\n<param name="quality" value="high" />\n',DEFAULT_PREVIEW:'<div class="file-preview-other">\n<span class="{previewFileIconClass}">{previewFileIcon}</span>\n</div>',MODAL_ID:"kvFileinputModal",MODAL_EVENTS:["show","shown","hide","hidden","loaded"],logMessages:{ajaxError:"{status}: {error}. Error Details: {text}.",badDroppedFiles:"Error scanning dropped files!",badExifParser:"Error loading the piexif.js library. {details}",badInputType:'The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.',exifWarning:'To avoid this warning, either set "autoOrientImage" to "false" OR ensure you have loaded the "piexif.js" library correctly on your page before the "fileinput.js" script.',invalidChunkSize:'Invalid upload chunk size: "{chunkSize}". Resumable uploads are disabled.',invalidThumb:'Invalid thumb frame with id: "{id}".',noResumableSupport:"The browser does not support resumable or chunk uploads.",noUploadUrl:'The "uploadUrl" is not set. Ajax uploads and resumable uploads have been disabled.',retryStatus:"Retrying upload for chunk # {chunk} for {filename}... retry # {retry}.",chunkQueueError:"Could not push task to ajax pool for chunk index # {index}.",resumableMaxRetriesReached:"Maximum resumable ajax retries ({n}) reached.",resumableRetryError:"Could not retry the resumable request (try # {n})... aborting.",resumableAborting:"Aborting / cancelling the resumable request.",resumableRequestError:"Error processing resumable request. {msg}"},objUrl:window.URL||window.webkitURL,isBs:function(e){var t=L.trim((L.fn.fileinputBsVersion||"")+"");return e=parseInt(e,10),t?e===parseInt(t.charAt(0),10):4===e},defaultButtonCss:function(e){return"btn-default btn-"+(e?"":"outline-")+"secondary"},now:function(){return(new Date).getTime()},round:function(e){return e=parseFloat(e),isNaN(e)?0:Math.floor(Math.round(e))},getArray:function(e){for(var t=[],i=e&&e.length||0,a=0;a<i;a++)t.push(e[a]);return t},getFileRelativePath:function(e){return String(e.newPath||e.relativePath||e.webkitRelativePath||N.getFileName(e)||null)},getFileId:function(e,t){var i=N.getFileRelativePath(e);return"function"==typeof t?t(e):e&&i?e.size+"_"+encodeURIComponent(i).replace(/%/g,"_"):null},getFrameSelector:function(e,t){return'[id="'+e+'"]'+(t=t||"")},getZoomSelector:function(e,t){return N.getFrameSelector("zoom-"+e,t)},getFrameElement:function(e,t,i){return e.find(N.getFrameSelector(t,i))},getZoomElement:function(e,t,i){return e.find(N.getZoomSelector(t,i))},getElapsed:function(e){var t=e,i="",a={},r={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60,second:1};return N.getObjectKeys(r).forEach(function(e){a[e]=Math.floor(t/r[e]),t-=a[e]*r[e]}),L.each(a,function(e,t){0<t&&(i+=(i?" ":"")+t+e.substring(0,1))}),i},debounce:function(i,a){var r;return function(){var e=arguments,t=this;clearTimeout(r),r=setTimeout(function(){i.apply(t,e)},a)}},stopEven