summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/build/videopress/js')
-rw-r--r--plugins/jetpack/_inc/build/videopress/js/editor-view.min.js3
-rw-r--r--plugins/jetpack/_inc/build/videopress/js/media-video-widget-extensions.min.js2
-rw-r--r--plugins/jetpack/_inc/build/videopress/js/videopress-plupload.min.js3
-rw-r--r--plugins/jetpack/_inc/build/videopress/js/videopress-uploader.min.js3
4 files changed, 11 insertions, 0 deletions
diff --git a/plugins/jetpack/_inc/build/videopress/js/editor-view.min.js b/plugins/jetpack/_inc/build/videopress/js/editor-view.min.js
new file mode 100644
index 00000000..75f565fc
--- /dev/null
+++ b/plugins/jetpack/_inc/build/videopress/js/editor-view.min.js
@@ -0,0 +1,3 @@
+/* Do not modify this file directly. It is compiled from other files. */
+/* global tinyMCE, vpEditorView */
+!function(e,t,a){t.mce=t.mce||{},void 0!==t.mce.views&&(t.mce.videopress_wp_view_renderer={shortcode_string:"videopress",shortcode_data:{},defaults:{w:"",at:"",permalink:!0,hd:!1,loop:!1,freedom:!1,autoplay:!1,flashonly:!1},coerce:t.media.coerce,template:t.template("videopress_iframe_vnext"),getContent:function(){var e,t,o,s="for="+encodeURIComponent(a.home_url_host),i=this.shortcode.attrs.named;for(t in i)switch(t){case"at":parseInt(i[t],10)&&(s+="&"+t+"="+parseInt(i[t],10));break;case"permalink":"false"===i[t]&&(s+="&"+t+"=0");break;case"hd":case"loop":case"autoplay":"true"===i[t]&&(s+="&"+t+"=1")}return e={width:a.content_width,height:.5625*a.content_width,guid:this.shortcode.attrs.numeric[0],urlargs:s},void 0!==i.w&&(o=parseInt(i.w,10))>=a.min_content_width&&o<a.content_width&&(e.width=o,e.height=parseInt(.5625*o,10)),e.ratio=e.height/e.width*100,this.template(e)},edit:function(o){var s=t.shortcode.next(this.shortcode_string,o),i=s.shortcode.attrs.named,l=tinyMCE.activeEditor,n=this,d=tinyMCE.ui.FormItem.prototype.renderHtml;tinyMCE.ui.TextBox.prototype.renderHtml=function(){var e,t,a=this.settings,o=document.createElement(a.multiline?"textarea":"input"),s=["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"];for(e=0;e<s.length;e++)void 0!==a[t=s[e]]&&o.setAttribute(t,a[t]);return a.multiline?o.innerText=this.state.get("value"):(o.setAttribute("type",a.subtype?a.subtype:"text"),o.setAttribute("value",this.state.get("value"))),o.id=this._id,o.className=this.classes,o.setAttribute("hidefocus",1),this.disabled()&&(o.disabled=!0),o.outerHTML},tinyMCE.ui.FormItem.prototype.renderHtml=function(){return _.each(a.modal_labels,function(e,t){e===this.settings.items.text&&this.classes.add("videopress-field-"+t)},this),_.contains([a.modal_labels.hd,a.modal_labels.permalink,a.modal_labels.autoplay,a.modal_labels.loop,a.modal_labels.freedom,a.modal_labels.flashonly],this.settings.items.text)&&this.classes.add("videopress-checkbox"),d.call(this)},_.each(this.defaults,function(e,t){i[t]=this.coerce(i,t)},this),l.windowManager.open({title:a.modal_labels.title,id:"videopress-shortcode-settings-modal",width:520,height:240,body:[{type:"textbox",disabled:!0,name:"guid",label:a.modal_labels.guid,value:s.shortcode.attrs.numeric[0]},{type:"textbox",subtype:"number",min:a.min_content_width,name:"w",label:a.modal_labels.w,value:i.w},{type:"textbox",subtype:"number",min:0,name:"at",label:a.modal_labels.at,value:i.at},{type:"checkbox",name:"hd",label:a.modal_labels.hd,checked:i.hd},{type:"checkbox",name:"permalink",label:a.modal_labels.permalink,checked:i.permalink},{type:"checkbox",name:"autoplay",label:a.modal_labels.autoplay,checked:i.autoplay},{type:"checkbox",name:"loop",label:a.modal_labels.loop,checked:i.loop},{type:"checkbox",name:"freedom",label:a.modal_labels.freedom,checked:i.freedom},{type:"checkbox",name:"flashonly",label:a.modal_labels.flashonly,checked:i.flashonly}],onsubmit:function(e){var a={tag:n.shortcode_string,type:"single",attrs:{named:_.pick(e.data,_.keys(n.defaults)),numeric:[e.data.guid]}};"0"===a.attrs.named.at&&(a.attrs.named.at=""),_.each(n.defaults,function(e,t){a.attrs.named[t]=this.coerce(a.attrs.named,t),e===a.attrs.named[t]&&delete a.attrs.named[t]},n),l.insertContent(t.shortcode.string(a))},onopen:function(t){var o="mce-videopress-field-";_.each(["w","at"],function(e){t.target.$el.find("."+o+e+" .mce-container-body").append('<span class="'+o+"unit "+o+"unit-"+e+'">'+a.modal_labels[e+"_unit"])}),e("body").addClass("modal-open")},onclose:function(){e("body").removeClass("modal-open")}}),tinyMCE.ui.FormItem.prototype.renderHtml=d}},t.mce.views.register("videopress",t.mce.videopress_wp_view_renderer),t.mce.wpvideo_wp_view_renderer=_.extend({},t.mce.videopress_wp_view_renderer,{shortcode_string:"wpvideo"}),t.mce.views.register("wpvideo",t.mce.wpvideo_wp_view_renderer))}(jQuery,wp,vpEditorView); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/build/videopress/js/media-video-widget-extensions.min.js b/plugins/jetpack/_inc/build/videopress/js/media-video-widget-extensions.min.js
new file mode 100644
index 00000000..46446bc5
--- /dev/null
+++ b/plugins/jetpack/_inc/build/videopress/js/media-video-widget-extensions.min.js
@@ -0,0 +1,2 @@
+/* Do not modify this file directly. It is compiled from other files. */
+window.wp=window.wp||{},function(e){var o,d;e.mediaWidgets&&(e.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps=(d=e.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps,function(e){var o,i,t;return i=d.call(this,e),o=_.extend({},i),e.videopress&&e.videopress.guid&&(t=e.videopress.guid),!t&&e.videopress_guid&&e.videopress_guid.length&&(t=e.videopress_guid[0]),t&&(o=_.extend({},i,{url:"https://videopress.com/v/"+t,attachment_id:0})),o}),e.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo=(o=e.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo,function(e){var d=document.createElement("a");return d.href=e,"videopress.com"===d.hostname||o.call(this,e)}))}(window.wp); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/build/videopress/js/videopress-plupload.min.js b/plugins/jetpack/_inc/build/videopress/js/videopress-plupload.min.js
new file mode 100644
index 00000000..3e605486
--- /dev/null
+++ b/plugins/jetpack/_inc/build/videopress/js/videopress-plupload.min.js
@@ -0,0 +1,3 @@
+/* Do not modify this file directly. It is compiled from other files. */
+/* global pluploadL10n, plupload, _wpPluploadSettings, JSON */
+window.wp=window.wp||{},function(e,t){var r,i;"undefined"!=typeof _wpPluploadSettings&&(r=function(o){var a,n,d=this,p=-1!==navigator.userAgent.indexOf("Trident/")||-1!==navigator.userAgent.indexOf("MSIE "),s={container:"container",browser:"browse_button",dropzone:"drop_element"};if(this.supports={upload:r.browser.supported},this.supported=this.supports.upload,this.supported){for(a in this.plupload=t.extend(!0,{multipart_params:{}},r.defaults),this.container=document.body,t.extend(!0,this,o),this)t.isFunction(this[a])&&(this[a]=t.proxy(this[a],this));for(a in s)this[a]&&(this[a]=t(this[a]).first(),this[a].length?(this[a].prop("id")||this[a].prop("id","__wp-uploader-id-"+r.uuid++),this.plupload[s[a]]=this[a].prop("id")):delete this[a]);(this.browser&&this.browser.length||this.dropzone&&this.dropzone.length)&&(p||"flash"!==plupload.predictRuntime(this.plupload)||this.plupload.required_features&&this.plupload.required_features.hasOwnProperty("send_binary_string")||(this.plupload.required_features=this.plupload.required_features||{},this.plupload.required_features.send_binary_string=!0),this.uploader=new plupload.Uploader(this.plupload),delete this.plupload,this.param(this.params||{}),delete this.params,void 0!==e.VideoPress?i=e.VideoPress:window.console&&window.console.error("The VideoPress object was not loaded. Errors may occur."),n=function(e,t,i){i.attachment&&i.attachment.destroy(),r.errors.unshift({message:e||pluploadL10n.default_error,data:t,file:i}),d.error(e,t,i)},this.uploader.bind("init",function(e){var i,o,a,n=d.dropzone;if(a=d.supports.dragdrop=e.features.dragdrop&&!r.browser.mobile,n){if(n.toggleClass("supports-drag-drop",!!a),!a)return n.unbind(".wp-uploader");n.bind("dragover.wp-uploader",function(){i&&clearTimeout(i),o||(n.trigger("dropzone:enter").addClass("drag-over"),o=!0)}),n.bind("dragleave.wp-uploader, drop.wp-uploader",function(){i=setTimeout(function(){o=!1,n.trigger("dropzone:leave").removeClass("drag-over")},0)}),d.ready=!0,t(d).trigger("uploader:ready")}}),this.uploader.bind("postinit",function(e){e.refresh(),d.init()}),this.uploader.init(),this.browser?this.browser.on("mouseenter",this.refresh):(this.uploader.disableBrowse(!0),t("#"+this.uploader.id+"_html5_container").hide()),this.uploader.bind("FilesAdded",function(e,t){_.each(t,function(e){var t,i;plupload.FAILED!==e.status&&(t=_.extend({file:e,uploading:!0,date:new Date,filename:e.name,menuOrder:0,uploadedTo:wp.media.model.settings.post.id},_.pick(e,"loaded","size","percent")),(i=/(?:jpe?g|png|gif)$/i.exec(e.name))&&(t.type="image",t.subtype="jpg"===i[0]?"jpeg":i[0]),e.attachment=wp.media.model.Attachment.create(t),r.queue.add(e.attachment),d.added(e.attachment))}),e.refresh(),e.start()}),this.uploader.bind("UploadProgress",function(e,t){t.attachment.set(_.pick(t,"loaded","percent")),d.progress(t.attachment)}),this.uploader.bind("FileUploaded",function(e,t,o){try{o=JSON.parse(o.response)}catch(e){return n(pluploadL10n.default_error,e,t)}o=void 0!==o.media?i.handleRestApiResponse(o,t):i.handleStandardResponse(o,t),_.each(["file","loaded","size","percent"],function(e){t.attachment.unset(e)}),t.attachment.set(_.extend(o.data,{uploading:!1})),wp.media.model.Attachment.get(o.data.id,t.attachment),r.queue.all(function(e){return!e.get("uploading")})&&(i&&i.resetToOriginalOptions(e),r.queue.reset()),d.success(t.attachment)}),this.uploader.bind("Error",function(e,t){var o,a=pluploadL10n.default_error;for(o in r.errorMap)if(t.code===plupload[o]){a=r.errorMap[o],_.isFunction(a)&&(a=a(t.file,t));break}n(a,t,t.file),i&&i.resetToOriginalOptions(e),e.refresh()}),this.uploader.bind("UploadComplete",function(e){i&&i.resetToOriginalOptions(e)}),this.uploader.bind("BeforeUpload",function(e,t){void 0!==t.videopress&&(i.originalOptions.url=e.getOption("url"),i.originalOptions.multipart_params=e.getOption("multipart_params"),i.originalOptions.file_data_name=e.getOption("file_data_name"),e.setOption("file_data_name","media[]"),e.setOption("url",t.videopress.upload_action_url),e.setOption("headers",{Authorization:'X_UPLOAD_TOKEN token="'+t.videopress.upload_token+'" blog_id="'+t.videopress.upload_blog_id+'"'}))}))}},t.extend(r,_wpPluploadSettings),r.uuid=0,r.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error,FILE_SIZE_ERROR:function(e){return pluploadL10n.file_exceeds_size_limit.replace("%s",e.name)}},t.extend(r.prototype,{param:function(e,r){if(1===arguments.length&&"string"==typeof e)return this.uploader.settings.multipart_params[e];arguments.length>1?this.uploader.settings.multipart_params[e]=r:t.extend(this.uploader.settings.multipart_params,e)},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){var e,r,i,o;if(this.browser){for(e=this.browser[0];e;){if(e===document.body){r=!0;break}e=e.parentNode}r||(o="wp-uploader-browser-"+this.uploader.id,(i=t("#"+o)).length||(i=t('<div class="wp-uploader-browser" />').css({position:"fixed",top:"-1000px",left:"-1000px",height:0,width:0}).attr("id","wp-uploader-browser-"+this.uploader.id).appendTo("body")),i.append(this.browser))}this.uploader.refresh()}}),r.queue=new wp.media.model.Attachments([],{query:!1}),r.errors=new Backbone.Collection,e.Uploader=r)}(wp,jQuery); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/build/videopress/js/videopress-uploader.min.js b/plugins/jetpack/_inc/build/videopress/js/videopress-uploader.min.js
new file mode 100644
index 00000000..5677cd3f
--- /dev/null
+++ b/plugins/jetpack/_inc/build/videopress/js/videopress-uploader.min.js
@@ -0,0 +1,3 @@
+/* Do not modify this file directly. It is compiled from other files. */
+/* globals plupload, pluploadL10n, error */
+window.wp=window.wp||{},function(e){var i={originalOptions:{},handleStandardResponse:function(e,i){return!_.isObject(e)||_.isUndefined(e.success)?error(pluploadL10n.default_error,null,i):e.success?e:error(e.data&&e.data.message,e.data,i)},handleRestApiResponse:function(e,i){if(1!==e.media.length)return error(pluploadL10n.default_error,null,i);var t=e.media[0],a=t.mime_type.split("/"),o={alt:"",author:t.author_ID||0,authorName:"",caption:"",compat:{item:"",meta:""},date:t.date||"",dateFormatted:t.date||"",description:t.description||"",editLink:"",filename:t.file||"",filesizeHumanReadable:"",filesizeInBytes:"",height:t.height,icon:t.icon||"",id:t.ID||"",link:t.URL||"",menuOrder:0,meta:!1,mime:t.mime_type||"",modified:0,name:"",nonces:{update:"",delete:"",edit:""},orientation:"",sizes:void 0,status:"",subtype:a[1]||"",title:t.title||"",type:a[0]||"",uploadedTo:1,uploadedToLink:"",uploadedToTitle:"",url:t.URL||"",width:t.width,success:"",videopress:{guid:t.videopress_guid||null,processing_done:t.videopress_processing_done||!1}};return e.data=o,e},resetToOriginalOptions:function(e){void 0!==i.originalOptions.url&&(e.setOption("url",i.originalOptions.url),delete i.originalOptions.url),void 0!==i.originalOptions.multipart_params&&(e.setOption("multipart_params",i.originalOptions.multipart_params),delete i.originalOptions.multipart_params),void 0!==i.originalOptions.file_data_name&&(e.setOption("file_data_name",i.originalOptions.file_data_name),delete i.originalOptions.file_data_name)}};if(void 0!==e.Uploader){var t=e.media;plupload.VIDEOPRESS_TOKEN_FAILURE="VP_TOKEN_FAILURE",plupload.addFileFilter("videopress_check_uploads",function(e,i,a){var o=i.type.split("/"),n=this;"video"===o[0]?t.ajax("videopress-get-upload-token",{async:!1,data:{filename:i.name}}).done(function(e){i.videopress=e,a(!0)}).fail(function(e){n.trigger("Error",{code:plupload.VIDEOPRESS_TOKEN_FAILURE,message:plupload.translate("Could not get the VideoPress token needed for uploading"),file:i,response:e}),a(!1)}):void 0!==i.size&&e&&i.size>e?(this.trigger("Error",{code:plupload.FILE_SIZE_ERROR,message:plupload.translate("File size error."),file:i}),a(!1)):a(!0)})}e.VideoPress=i}(window.wp); \ No newline at end of file