芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/fluentformpro/public/js/fluentformproUserUpdate.js
(()=>{function e(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return t(e,n);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?t(e,n):void 0}}(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 t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n
3&&void 0!==arguments[3]?arguments[3]:"img";if(Array.isArray(n)&&n.length>0)t.each(n,(function(t,n){r(e,n,a,i)}));else{var l=o(n),s='
'),c=function(e,n,a){var i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"img";if(!n||Array.isArray(n)&&!n.length)return"";"image"===(null===(i=n)||void 0===i?void 0:i.type)&&(r="img");var l=t("
",{class:"ff-post-update-thumb-wrapper",css:{position:"relative","padding-top":"5px"}}),s=t("
",{text:"X",title:"Remove "+("file"===r?"File":"Image"),"data-attachment-id":o(n),css:{position:"absolute",background:"#f00","border-radius":"50%",color:"#fff",right:"-3px",top:"-3px",width:"15px",height:"15px",display:"flex","align-items":"center","justify-content":"center","font-weight":"700","font-size":"10px",cursor:"pointer","z-index":1},on:{click:function(){t(this).closest(".ff-el-input--content").append(a),l.remove()}}}),c="";if("string"==typeof n&&"file"===r){var f=n.split(/(\\|\/)/g).pop(),d=f.split(".").pop().toLowerCase().trim();if(!["png","jpg","gif","jpeg","webp","bmp"].includes(d)){var p={};p.url=n,p.filename=f,p.filesize=function(e){var t=0,n=new XMLHttpRequest;n.open("HEAD",e,!1),n.send(null),200===n.status&&(t=n.getResponseHeader("content-length"));return parseInt(t)}(n),n=p}}if("file"===r&&"string"!=typeof n)c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:140;return t-=91,e.filesize=(null==e?void 0:e.filesize)||(null==e?void 0:e.filesizeInBytes),'\n
\n
\n
\n \n
\n
\n
\n
').concat(null!=e&&e.filename?e.filename:null==e?void 0:e.name,'
\n
\n
\n
\n
').concat(null!=e&&e.filesize?(e.filesize/1024).toFixed(2):0,' KB
\n
\n
\n
\n
\n ')}(n,parseInt(e.closest(".ff-el-group").width()));else{var u;if("string"!=typeof n)n=null===(u=n)||void 0===u?void 0:u.url;c='
'}return l.append(s),l.append(c),l}(e,n,s,i);l&&e.closest(".ff-el-input--content").append('
')),e.closest(".ff-el-input--content").append(c)}}function o(e){return"string"==typeof e?"":(null==e?void 0:e.ID)||(null==e?void 0:e.id)||""}(i||i.length)&&["acf_mappings","jetengine_mappings"].forEach((function(a){var o=window.fluentformpro_user_update_vars[a];!function(a,i){t.each(a,(function(a,o){!function(a,i){var o=i.name;o.includes(".")&&(o=o.split(".").join("[")+"]");var l=i.value,s=a.find('[data-name="'+o+'"]');s.length||(s=a.find('[name="'+o+'"]'));if(s.length){switch(i.type){case"image":case"image_upload":case"single_image":case"gallery":case"media":r(s,l,o,"img");break;case"file":case"file_upload":case"file_input":case"file_advanced":r(s,l,o,"file");break;case"select":case"image_select":case"checkbox":case"radio":case"button_group":case"checkbox_list":!function(a,i){var r="select"===a.attr("type")||"select"===a.prop("nodeName").toLowerCase();r?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";t||(t="");"string"!=typeof t&&(t=t.length>0?t.map((function(e){return e.value?e.value.toString():e.toString()})):t.toString());e.hasClass("ff_has_multi_select")?e.data("choicesjs")&&(e.data("choicesjs").removeActiveItems(t),e.data("choicesjs").setChoiceByValue(t)):e.val(t)}(a,i):function(a){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=!1;"string"!=typeof r&&"number"!=typeof r||("1"===r&&(o=!0),r=r.includes(",")?r.split(","):[r]);"object"!==n(r)||Array.isArray(r)||(r=Object.keys(r));r=(i=[]).concat.apply(i,e(r));var l=r.map((function(e){return e.value?e.value.toString().trim():e.toString().trim()}));a.each((function(e,n){var a=t(n);-1!==t.inArray(a.val(),l)||"on"===a.val()&&o?(a.closest(".ff-el-form-check").addClass("ff_item_selected"),a.prop("checked",!0)):a.prop("checked",!1)}))}(a,i)}(s,l);break;case"date_picker":case"date_time_picker":case"time_picker":case"jetengine_date_type":!function(e,t,n){var a;"date_picker"===n?a="Ymd":"date_time_picker"===n?a="Y-m-d H:i:s":"time_picker"===n&&(a="H:i:s");if(e.length>0&&e[0]._flatpickr){var i=e[0]._flatpickr,r=i.parseDate(t,a)||t;i.setDate(r)}else e.val(t)}(s,l,i.type);break;case"repeater":!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t||null==t||!t.length)return;var n=e.find("table"),a=n.find("tbody tr"),i=parseInt(n.attr("data-max_repeat"));t.forEach((function(e){var t=n.find("tbody tr").length-1;if(i&&t===i)n.addClass("repeat-maxed");else{var r=a.clone(),o=Object.values(e);r.find("td").each((function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),a=n.attr("data-mask");a&&n.mask(a);var i="ffrpt-"+(new Date).getTime()+e,r={value:o[e]||"",id:i};n.prop(r)})),r.insertBefore(a)}})),a.remove();var r=n.attr("data-root_name"),o=0;n.find("tbody tr").each((function(e,t){jQuery(this).find(".ff-el-form-control").each((function(t,n){var a=jQuery(n);0===e&&(o=a.attr("tabindex")),a.prop({name:r+"["+e+"][]"}),a.attr("data-name",r+"_"+t+"_"+e),o&&a.attr("tabindex",o)}))})),n.trigger("repeat_change")}(s,l);break;case"wysiwyg":if(s.hasClass("fluentform-post-content")){var c,f=s.attr("id")||"";null===(c=tinyMCE.get(f))||void 0===c||c.setContent(l)}else s.val(l);break;default:"string"==typeof l&&s.val(l)}s.change()}}(i,o)}))}(o||[],i)}))}(jQuery)})();