(function(e){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(window.jQuery)}})(function(f){"use strict";var n=0;f.ajaxTransport("iframe",function(a){if(a.async){var i=a.initialIframeSrc||"javascript:false;",o,p,t;return{send:function(e,r){o=f('<form style="display:none;"></form>');o.attr("accept-charset",a.formAcceptCharset);t=/\?/.test(a.url)?"&":"?";if(a.type==="DELETE"){a.url=a.url+t+"_method=DELETE";a.type="POST"}else if(a.type==="PUT"){a.url=a.url+t+"_method=PUT";a.type="POST"}else if(a.type==="PATCH"){a.url=a.url+t+"_method=PATCH";a.type="POST"}n+=1;p=f('<iframe src="'+i+'" name="iframe-transport-'+n+'"></iframe>').bind("load",function(){var n,t=f.isArray(a.paramName)?a.paramName:[a.paramName];p.unbind("load").bind("load",function(){var t;try{t=p.contents();if(!t.length||!t[0].firstChild){throw new Error}}catch(e){t=undefined}r(200,"success",{iframe:t});f('<iframe src="'+i+'"></iframe>').appendTo(o);window.setTimeout(function(){o.remove()},0)});o.prop("target",p.prop("name")).prop("action",a.url).prop("method",a.type);if(a.formData){f.each(a.formData,function(e,t){f('<input type="hidden"/>').prop("name",t.name).val(t.value).appendTo(o)})}if(a.fileInput&&a.fileInput.length&&a.type==="POST"){n=a.fileInput.clone();a.fileInput.after(function(e){return n[e]});if(a.paramName){a.fileInput.each(function(e){f(this).prop("name",t[e]||a.paramName)})}o.append(a.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data");a.fileInput.removeAttr("form")}o.submit();if(n&&n.length){a.fileInput.each(function(e,t){var r=f(n[e]);f(t).prop("name",r.prop("name")).attr("form",r.attr("form"));r.replaceWith(t)})}});o.append(p).appendTo(document.body)},abort:function(){if(p){p.unbind("load").prop("src",i)}if(o){o.remove()}}}}});f.ajaxSetup({converters:{"iframe text":function(e){return e&&f(e[0].body).text()},"iframe json":function(e){return e&&f.parseJSON(f(e[0].body).text())},"iframe html":function(e){return e&&f(e[0].body).html()},"iframe xml":function(e){var t=e&&e[0];return t&&f.isXMLDoc(t)?t:f.parseXML(t.XMLDocument&&t.XMLDocument.xml||f(t.body).html())},"iframe script":function(e){return e&&f.globalEval(f(e[0].body).text())}}})});