WordPress/wp-includes/js/plupload/moxie.min.js

1 line
85 KiB
JavaScript
Raw Normal View History

var MXI_DEBUG=!1;!function(o,x){"use strict";var s={};function n(e,t){for(var i,n=[],r=0;r<e.length;++r){if(!(i=s[e[r]]||function(e){for(var t=o,i=e.split(/[.\/]/),n=0;n<i.length;++n){if(!t[i[n]])return;t=t[i[n]]}return t}(e[r])))throw"module definition dependecy not found: "+e[r];n.push(i)}t.apply(null,n)}function e(e,t,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(t===x)throw"invalid module definition, dependencies must be specified";if(i===x)throw"invalid module definition, definition function must be specified";n(t,function(){s[e]=i.apply(null,arguments)})}e("moxie/core/utils/Basic",[],function(){function n(i){return s(arguments,function(e,t){0<t&&s(e,function(e,t){void 0!==e&&(o(i[t])===o(e)&&~r(o(e),["array","object"])?n(i[t],e):i[t]=e)})}),i}function s(e,t){var i,n,r;if(e)if("number"===o(e.length)){for(r=0,i=e.length;r<i;r++)if(!1===t(e[r],r))return}else if("object"===o(e))for(n in e)if(e.hasOwnProperty(n)&&!1===t(e[n],n))return}function r(e,t){if(t){if(Array.prototype.indexOf)return Array.prototype.indexOf.call(t,e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}var o=function(e){return void 0===e?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()};a=0;var a;return{guid:function(e){for(var t=(new Date).getTime().toString(32),i=0;i<5;i++)t+=Math.floor(65535*Math.random()).toString(32);return(e||"o_")+t+(a++).toString(32)},typeOf:o,extend:n,each:s,isEmptyObj:function(e){if(e&&"object"===o(e))for(var t in e)return!1;return!0},inSeries:function(e,n){var r=e.length;"function"!==o(n)&&(n=function(){}),e&&e.length||n(),function t(i){"function"===o(e[i])&&e[i](function(e){++i<r&&!e?t(i):n(e)})}(0)},inParallel:function(e,i){var n=0,r=e.length,o=new Array(r);s(e,function(e,t){e(function(e){if(e)return i(e);e=[].slice.call(arguments);e.shift(),o[t]=e,++n===r&&(o.unshift(null),i.apply(this,o))})})},inArray:r,arrayDiff:function(e,t){var i,n=[];for(i in"array"!==o(e)&&(e=[e]),"array"!==o(t)&&(t=[t]),e)-1===r(e[i],t)&&n.push(e[i]);return!!n.length&&n},arrayIntersect:function(e,t){var i=[];return s(e,function(e){-1!==r(e,t)&&i.push(e)}),i.length?i:null},toArray:function(e){for(var t=[],i=0;i<e.length;i++)t[i]=e[i];return t},trim:function(e){return e&&(String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""))},sprintf:function(e){var t=[].slice.call(arguments,1);return e.replace(/%[a-z]/g,function(){var e=t.shift();return"undefined"!==o(e)?e:""})},parseSizeStr:function(e){var t,i;return"string"!=typeof e?e:(t={t:1099511627776,g:1073741824,m:1048576,k:1024},i=(e=/^([0-9\.]+)([tmgk]?)$/.exec(e.toLowerCase().replace(/[^0-9\.tmkg]/g,"")))[2],e=+e[1],t.hasOwnProperty(i)&&(e*=t[i]),Math.floor(e))}}}),e("moxie/core/utils/Env",["moxie/core/utils/Basic"],function(n){m="function",h="object",r=function(e,t){return-1!==t.toLowerCase().indexOf(e.toLowerCase())},o={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]+).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[a="name",c="version"],[/\s(opr)\/([\w\.]+)/i],[[a,"Opera"],c],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]+)*/i,/(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?([\w\.]*)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]+)*/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi)\/([\w\.-]+)/i],[a,c],[/(trident).+rv[:\s]([\w\.]+).+like\sgecko/i],[[a,"IE"],c],[/(edge)\/((\d+)?[\w\.]+)/i],[a,c],[/(yabrowser)\/([\w\.]+)/i],[[a,"Yandex"],c],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],c],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i,/(uc\s?browser|qqbrowser)[\/\s]?([\w\.]+)/i],[a,c],[/(dolfin)\/([\w\.]+)/i],[[a,"Dolphin"],c],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[a,"Chrome"],c],[/XiaoMi\/MiuiBrowser\/([\w\.]+)/i],[c,[a,"MIUI Browser"]],[/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)/i],[c,[a,"Android Browser"]],[/FBAV\/([\w\.]+);/i],[c,[a,"Facebook"]],[/version\/([\w\.]+).