(function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))(((e,t)=>{t.exports={}}));function t(n,r,i,a){if(!(n instanceof Error))throw n;if(!(typeof window>`u`&&r||a))throw n.message+=` on line `+i,n;var o,s,c,l;try{a||=e().readFileSync(r,{encoding:`utf8`}),o=3,s=a.split(`
`),c=Math.max(i-o,0),l=Math.min(s.length,i+o)}catch(e){n.message+=` - could not read from `+r+` (`+e.message+`)`,t(n,null,i);return}o=s.slice(c,l).map(function(e,t){var n=t+c+1;return(n==i?`  > `:`    `)+n+`| `+e}).join(`
`),n.path=r;try{n.message=(r||`Pug`)+`:`+i+`
`+o+`

`+n.message}catch{}throw n}function n(e){var n=``,r,i;try{i=1,r=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/fileListWidgetCreateButton.pug`,n+=`<a class="g-create-thumbnail" title="Create thumbnail of this file">`,i=2,r=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/fileListWidgetCreateButton.pug`,n+=`<i class="icon-picture"></i></a>`}catch(e){t(e,r,i)}return n}var r=girder.models.Model.extend({resourceName:`thumbnail`});function i(e){var t=``+e,n=a.exec(t);if(!n)return e;var r,i,o,s=``;for(r=n.index,i=0;r<t.length;r++){switch(t.charCodeAt(r)){case 34:o=`&quot;`;break;case 38:o=`&amp;`;break;case 60:o=`&lt;`;break;case 62:o=`&gt;`;break;default:continue}i!==r&&(s+=t.substring(i,r)),i=r+1,s+=o}return i===r?s:s+t.substring(i,r)}var a=/["&<>]/;function o(t,n,r,i){if(!(t instanceof Error))throw t;if(!(typeof window>`u`&&n||i))throw t.message+=` on line `+r,t;var a,s,c,l;try{i||=e().readFileSync(n,{encoding:`utf8`}),a=3,s=i.split(`
`),c=Math.max(r-a,0),l=Math.min(s.length,r+a)}catch(e){t.message+=` - could not read from `+n+` (`+e.message+`)`,o(t,null,r);return}a=s.slice(c,l).map(function(e,t){var n=t+c+1;return(n==r?`  > `:`    `)+n+`| `+e}).join(`
`),t.path=n;try{t.message=(n||`Pug`)+`:`+r+`
`+a+`

`+t.message}catch{}throw t}function s(e){var t=``,n,r;try{var a=e||{};(function(e){r=1,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="modal-dialog">`,r=2,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="modal-content">`,r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<form class="modal-form" id="g-create-thumbnail-form" role="form">`,r=4,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="modal-header">`,r=5,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<button class="close" data-dismiss="modal" aria-hidden="true" type="button">`,r=5,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`&times;</button>`,r=6,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<h4 class="modal-title">`,r=6,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Create thumbnail</h4>`,r=7,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-dialog-subtitle">`,r=8,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<i class="icon-doc-inv"></i>`,r=9,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=` `,r=9,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t=t+i(e.get(`name`)??``)+`</div></div>`,r=10,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="modal-body">`,r=11,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<label>`,r=11,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Thumbnail size (px)</label>`,r=12,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-thumbnail-size-form-container">`,r=13,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<input class="g-thumbnail-size-input" id="g-thumbnail-width" placeholder="width"/>`,r=14,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<span class="g-thumbnail-size-between">`,r=14,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`&times;</span>`,r=15,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<input class="g-thumbnail-size-input" id="g-thumbnail-height" placeholder="height"/>`,r=16,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<label class="g-thumbnail-crop-container checkbox-inline">`,r=17,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<input id="g-thumbnail-crop" type="checkbox"/>`,r=18,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Crop</label></div>`,r=19,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<label>`,r=19,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Attach to`,r=20,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-thumbnail-attach-container">`,r=21,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<label class="radio-inline">`,r=22,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<input class="g-thumbnail-attach-this-item" type="radio" name="g-thumbnail-attach-to" checked="on"/>`,r=23,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`This item</label>`,r=24,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<label class="radio-inline">`,r=25,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<input class="g-thumbnail-attach-something-else" type="radio" name="g-thumbnail-attach-to"/>`,r=26,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Something else...</label></div></label>`,r=27,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-thumbnail-custom-target-container hide">`,r=28,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-target-result-container"></div>`,r=29,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-search-field-container"></div></div>`,r=30,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="g-validation-failed-message"></div></div>`,r=31,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<div class="modal-footer">`,r=32,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<a class="btn btn-small btn-default" data-dismiss="modal">`,r=32,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`Close</a>`,r=33,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<button class="g-submit-create-thumbnail btn btn-small btn-primary" type="submit">`,r=34,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=`<i class="icon-picture"></i>`,r=35,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewDialog.pug`,t+=` Create</button></div></form></div></div>`}).call(this,`file`in a?a.file:typeof file<`u`?file:void 0)}catch(e){o(e,n,r)}return t}function c(e,t,n,r){if(!1===t||t==null||!t&&(e===`class`||e===`style`))return``;if(!0===t)return` `+(r?e:e+`="`+e+`"`);var i=typeof t;return i!==`object`&&i!==`function`||typeof t.toJSON!=`function`||(t=t.toJSON()),typeof t==`string`||(t=JSON.stringify(t),n||t.indexOf(`"`)===-1)?(n&&(t=f(t)),` `+e+`="`+t+`"`):` `+e+`='`+t.replace(/'/g,`&#39;`)+`'`}function l(e,t){return Array.isArray(e)?u(e,t):e&&typeof e==`object`?d(e):e||``}function u(e,t){for(var n,r=``,i=``,a=Array.isArray(t),o=0;o<e.length;o++)(n=l(e[o]))&&(a&&t[o]&&(n=f(n)),r=r+i+n,i=` `);return r}function d(e){var t=``,n=``;for(var r in e)r&&e[r]&&p.call(e,r)&&(t=t+n+r,n=` `);return t}function f(e){var t=``+e,n=m.exec(t);if(!n)return e;var r,i,a,o=``;for(r=n.index,i=0;r<t.length;r++){switch(t.charCodeAt(r)){case 34:a=`&quot;`;break;case 38:a=`&amp;`;break;case 60:a=`&lt;`;break;case 62:a=`&gt;`;break;default:continue}i!==r&&(o+=t.substring(i,r)),i=r+1,o+=a}return i===r?o:o+t.substring(i,r)}var p=Object.prototype.hasOwnProperty,m=/["&<>]/;function h(t,n,r,i){if(!(t instanceof Error))throw t;if(!(typeof window>`u`&&n||i))throw t.message+=` on line `+r,t;var a,o,s,c;try{i||=e().readFileSync(n,{encoding:`utf8`}),a=3,o=i.split(`
`),s=Math.max(r-a,0),c=Math.min(o.length,r+a)}catch(e){t.message+=` - could not read from `+n+` (`+e.message+`)`,h(t,null,r);return}a=o.slice(s,c).map(function(e,t){var n=t+s+1;return(n==r?`  > `:`    `)+n+`| `+e}).join(`
`),t.path=n;try{t.message=(n||`Pug`)+`:`+r+`
`+a+`

`+t.message}catch{}throw t}function g(e){var t=``,n,r;try{var i=e||{};(function(e,i){r=1,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewTargetDescription.pug`,t+=`<div class="g-target-result">`,r=2,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewTargetDescription.pug`,t=t+`<i`+c(`class`,l([`icon-${e}`],[!0]),!1,!1)+`></i>`,r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewTargetDescription.pug`,t+=` `,r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/createThumbnailViewTargetDescription.pug`,t=t+f(i??``)+`</div>`}).call(this,`icon`in i?i.icon:typeof icon<`u`?icon:void 0,`text`in i?i.text:typeof text<`u`?text:void 0)}catch(e){h(e,n,r)}return t}var _=girder.views.View,v=girder.views.widgets.SearchFieldWidget,y=_.extend({events:{'change .g-thumbnail-attach-container input[type="radio"]':function(){this.$(`.g-target-result-container`).empty(),this.$(`.g-thumbnail-attach-this-item`).is(`:checked`)?(this.attachToType=`item`,this.attachToId=this.item.id,this.$(`.g-thumbnail-custom-target-container`).addClass(`hide`),this.$(`.g-submit-create-thumbnail`).girderEnable(!0)):(this.attachToType=null,this.attachToId=null,this.$(`.g-thumbnail-custom-target-container`).removeClass(`hide`),this.$(`.g-submit-create-thumbnail`).girderEnable(!1))},"submit #g-create-thumbnail-form":function(e){e.preventDefault(),this.$(`.g-validation-failed-message`).empty(),this.$(`.g-submit-create-thumbnail`).girderEnable(!1),new r({width:Number(this.$(`#g-thumbnail-width`).val())||0,height:Number(this.$(`#g-thumbnail-height`).val())||0,crop:this.$(`#g-thumbnail-crop`).is(`:checked`),fileId:this.file.id,attachToId:this.attachToId,attachToType:this.attachToType}).on(`g:saved`,function(){this.$el.on(`hidden.bs.modal`,()=>{this.trigger(`g:created`,{attachedToType:this.attachToType,attachedToId:this.attachToId})}).modal(`hide`)},this).on(`g:error`,function(e){this.$(`.g-submit-create-thumbnail`).girderEnable(!0),this.$(`.g-validation-failed-message`).text(e.responseJSON.message)},this).save()}},initialize:function(e){this.item=e.item,this.file=e.file,this.attachToType=`item`,this.attachToId=this.item.id,this.searchWidget=new v({placeholder:`Start typing a name...`,types:[`collection`,`folder`,`item`,`user`],parentView:this}).on(`g:resultClicked`,this.pickTarget,this)},render:function(){return this.$el.html(s({file:this.file,item:this.item})).girderModal(this).on(`shown.bs.modal`,()=>{this.$(`#g-thumbnail-width`).trigger(`focus`)}),this.$(`#g-thumbnail-width`).trigger(`focus`),this.searchWidget.setElement(this.$(`.g-search-field-container`)).render(),this},pickTarget:function(e){this.searchWidget.resetState(),this.attachToType=e.type,this.attachToId=e.id,this.$(`.g-submit-create-thumbnail`).girderEnable(!0),this.$(`.g-target-result-container`).html(g({text:e.text,icon:e.icon}))}}),b=girder.$,x=girder.Backbone,S=girder.views.widgets.FileListWidget,{wrap:C}=girder.utilities.PluginUtils,{AccessType:w}=girder.constants,T=girder.router;C(S,`render`,function(e){return e.call(this),this.parentItem.getAccessLevel()>=w.WRITE&&this.$(`.g-file-actions-container`).prepend(n()),this}),S.prototype.events[`click a.g-create-thumbnail`]=function(e){var t=b(e.currentTarget).parent().attr(`file-cid`);new y({el:b(`#g-dialog-container`),parentView:this,item:this.parentItem,file:this.collection.get(t)}).once(`g:created`,function(e){x.history.fragment=null,T.navigate(e.attachedToType+`/`+e.attachedToId,{trigger:!0})},this).render()};function E(t,n,r,i){if(!(t instanceof Error))throw t;if(!(typeof window>`u`&&n||i))throw t.message+=` on line `+r,t;var a,o,s,c;try{i||=e().readFileSync(n,{encoding:`utf8`}),a=3,o=i.split(`
`),s=Math.max(r-a,0),c=Math.min(o.length,r+a)}catch(e){t.message+=` - could not read from `+n+` (`+e.message+`)`,E(t,null,r);return}a=o.slice(s,c).map(function(e,t){var n=t+s+1;return(n==r?`  > `:`    `)+n+`| `+e}).join(`
`),t.path=n;try{t.message=(n||`Pug`)+`:`+r+`
`+a+`

`+t.message}catch{}throw t}function D(e){var t=``,n,r;try{r=1,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/itemView.pug`,t+=`<div class="g-thumbnails-header-container">`,r=2,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/itemView.pug`,t+=`<div class="g-item-info-header">`,r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/itemView.pug`,t+=`<i class="icon-picture"></i>`,r=4,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/itemView.pug`,t+=`Thumbnails</div></div>`}catch(e){E(e,n,r)}return t}function O(e,t,n,r){if(!1===t||t==null||!t&&(e===`class`||e===`style`))return``;if(!0===t)return` `+(r?e:e+`="`+e+`"`);var i=typeof t;return i!==`object`&&i!==`function`||typeof t.toJSON!=`function`||(t=t.toJSON()),typeof t==`string`||(t=JSON.stringify(t),n||t.indexOf(`"`)===-1)?(n&&(t=k(t)),` `+e+`="`+t+`"`):` `+e+`='`+t.replace(/'/g,`&#39;`)+`'`}function k(e){var t=``+e,n=A.exec(t);if(!n)return e;var r,i,a,o=``;for(r=n.index,i=0;r<t.length;r++){switch(t.charCodeAt(r)){case 34:a=`&quot;`;break;case 38:a=`&amp;`;break;case 60:a=`&lt;`;break;case 62:a=`&gt;`;break;default:continue}i!==r&&(o+=t.substring(i,r)),i=r+1,o+=a}return i===r?o:o+t.substring(i,r)}var A=/["&<>]/;function j(t,n,r,i){if(!(t instanceof Error))throw t;if(!(typeof window>`u`&&n||i))throw t.message+=` on line `+r,t;var a,o,s,c;try{i||=e().readFileSync(n,{encoding:`utf8`}),a=3,o=i.split(`
`),s=Math.max(r-a,0),c=Math.min(o.length,r+a)}catch(e){t.message+=` - could not read from `+n+` (`+e.message+`)`,j(t,null,r);return}a=o.slice(s,c).map(function(e,t){var n=t+s+1;return(n==r?`  > `:`    `)+n+`| `+e}).join(`
`),t.path=n;try{t.message=(n||`Pug`)+`:`+r+`
`+a+`

`+t.message}catch{}throw t}function M(e){var t=``,n,r;try{var i=e||{};(function(e,i,a){r=1,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<div class="g-thumbnail-flow-container">`,r=2,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,(function(){var o=a;if(typeof o.length==`number`)for(var s=0,c=o.length;s<c;s++){var l=o[s];r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t=t+`<div`+(` class="g-thumbnail-container"`+O(`g-file-id`,l.id,!0,!1))+`>`,r=4,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,i>=e.WRITE&&(r=5,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<div class="g-thumbnail-actions-container">`,r=6,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<a class="g-thumbnail-delete" title="Delete">`,r=7,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<i class="icon-cancel"></i></a></div>`),r=8,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t=t+`<img`+(` class="g-thumbnail"`+O(`src`,l.downloadUrl(),!0,!1))+`/></div>`}else{var c=0;for(var s in o){c++;var l=o[s];r=3,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t=t+`<div`+(` class="g-thumbnail-container"`+O(`g-file-id`,l.id,!0,!1))+`>`,r=4,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,i>=e.WRITE&&(r=5,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<div class="g-thumbnail-actions-container">`,r=6,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<a class="g-thumbnail-delete" title="Delete">`,r=7,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t+=`<i class="icon-cancel"></i></a></div>`),r=8,n=`/home/circleci/project/girder/plugins/thumbnails/girder_thumbnails/web_client/templates/flowView.pug`,t=t+`<img`+(` class="g-thumbnail"`+O(`src`,l.downloadUrl(),!0,!1))+`/></div>`}}}).call(this),t+=`</div>`}).call(this,`AccessType`in i?i.AccessType:typeof AccessType<`u`?AccessType:void 0,`accessLevel`in i?i.accessLevel:typeof accessLevel<`u`?accessLevel:void 0,`thumbnails`in i?i.thumbnails:typeof thumbnails<`u`?thumbnails:void 0)}catch(e){j(e,n,r)}return t}var N=girder.$,P=girder.views.View,{confirm:F}=girder.dialog,I=girder.events,L=girder.models.FileModel,{AccessType:R}=girder.constants,z=P.extend({events:{"click .g-thumbnail-delete":function(e){var t=N(e.currentTarget).parents(`.g-thumbnail-container`),n=new L({_id:t.attr(`g-file-id`)});F({text:`Are you sure you want to delete this thumbnail?`,yesText:`Delete`,confirmCallback:()=>{n.on(`g:deleted`,function(){t.remove()}).on(`g:error`,function(){I.trigger(`g:alert`,{icon:`cancel`,text:`Failed to delete thumbnail.`,type:`danger`,timeout:4e3})}).destroy()}})},"mouseenter .g-thumbnail-container":function(){this.$(`.g-thumbnail-actions-container`).addClass(`g-show`)},"mouseleave .g-thumbnail-container":function(){this.$(`.g-thumbnail-actions-container`).removeClass(`g-show`)}},initialize:function(e){this.thumbnails=e.thumbnails,this.accessLevel=e.accessLevel||R.READ},render:function(){return this.$el.html(M({thumbnails:this.thumbnails.toArray(),accessLevel:this.accessLevel,AccessType:R})),this}}),B=girder._,V=girder.views.body.ItemView,{wrap:H}=girder.utilities.PluginUtils,U=girder.collections.FileCollection;H(V,`render`,function(e){this.once(`g:rendered`,function(){let e=new U(B.map(this.model.get(`_thumbnails`),e=>({_id:e})));e&&e.length&&(this.$(`.g-item-info`).before(D()),new z({className:`g-thumbnails-flow-view-container`,parentView:this,thumbnails:e,accessLevel:this.model.getAccessLevel()}).render().$el.insertBefore(this.$(`.g-item-info`)))},this),e.call(this)})});