Beruflich Dokumente
Kultur Dokumente
top="0px",
ke("#flash-upload-container > .moxie-shim")[0].style.left="0px",ke("#flash-uploa
d-container > .moxie-shim")[0].style.width="100%",ke("#flash-upload-container >
.moxie-shim")[0].style.height="100%"):(ke("#choose-button").click(function(e){re
turn function(){return ke("#"+e.PLU.id+"_html5").click()}}(this)),ke("#add-butto
n").click(function(){return function(){return ke("#choose-button").click()}}(thi
s)))}},ni=ut.FileQueue={init:function(){return ni._listen()},_listen:function(){
return document.observe(oi.QUEUE_EVT,ni._file_queued.bind(this)),document.observ
e(oi.QUEUE_ERROR_EVT,ni._file_queue_errored.bind(this)),document.observe(oi.UPDA
TE_EVT,ni._file_updated.bind(this)),document.observe(oi.COMPLETE_EVT,ni._file_co
mpleted.bind(this)),document.observe(oi.ERROR_EVT,ni._file_errored.bind(this)),d
ocument.observe(oi.CANCEL_EVT,ni._file_cancelled.bind(this))},_file_queued:funct
ion(e){var t,n,i,r,o;for(r=e.memo.files,o=[],n=0,i=r.length;i>n;n++)t=r[n],this.
files[t.id]=t,ni.uploading||this._start_uploading(),this.current_file=t,o.push(V
t("File queued:",t.name));return o},_file_queue_errored:function(e){return this.
_file_queued(e),setTimeout(function(t){return function(){return t._file_errored(
e)}}(this),250)},_file_updated:function(e){var t,n,i,r,o,s,a,_,l;return r=e.memo
.file,s=e.memo.percent_complete,o=s*r.size,l=o+this.completed_size(),i=(new Date
).getTime(),this.last_update_time&&(a=(i-this.last_update_time)/1e3,oi.PLU.total
.bytesPerSec?this.average_bps=oi.PLU.total.bytesPerSec:(n=o-this.last_update_siz
e,t=n/a,this.average_bps=((l-n)*this.average_bps+n*t)/l),_=(this.queue_size()-l)
/this.average_bps,this.formatted_time=re.format_time(_+this.num_left())),this.cu
rrent_file=r,this.last_update_time=(new Date).getTime(),this.last_update_size=o}
,_file_completed:function(e){var t;return t=e.memo.file,this.completed_files[t.i
d]=!0,Vt("File completed:",t.name),this._check_if_finished(t)},_file_errored:fun
ction(e){var t;return t=e.memo.file,this.errored_files[t.id]=!0,ti.update_errors
(),ii.update_errors(),Vt("File errored:",t.name),this._check_if_finished(t)},_fi
le_cancelled:function(e){var t;return t=e.memo.file,this.cancelled_files[t.id]=!
0,t.status===H.UPLOADING?(oi.PLU.stop(),oi.PLU.removeFile(t),oi.PLU.start()):oi.
PLU.removeFile(t),Vt("File cancelled:",t.name),this._check_if_finished(t)},_star
t_uploading:function(){var e;return this.uploading=oi.uploadNext(),this.uploadin
g?(this.all_cancelled=!1,window.onbeforeunload=e=function(){return function(){re
turn Pt("Leaving this page will cancel your uploads.")}}(this)):void 0},finished
:function(){return this._finished_uploading()},_check_if_finished:function(){ret
urn this.empty()?this.uploading?this._finished_uploading():void 0:oi.uploadNext(
)},_finished_uploading:function(){var e,t,n,i;if(this.uploading=!1,this.num_file
s()?this.errors()?(ti.errored(),ii.errored()):(ti.completed(),ii.completed()):ti
.cancelled(),i=$("inline-upload-status").visible(),Nr.select_fq_paths=[],Nr.insi
de_dir){for(n in this.completed_files)t=this.files[n],e=rt.normalize(t.dest),Nr.
select_fq_paths.push(e+"/"+t.name);Nr.force_reload()}else Nr.in_search_mode()&&c
r.force_reload();return i&&ii.show(),pi.onHide=null,window.onbeforeunload=null},
empty:function(){return!this.num_left()},num_files:function(){return this.file_i
ds().length},num_non_cancelled_files:function(){return this.file_ids().length-th
is.cancels()},next:function(){return v(this.files).filter(function(e){return fun
ction(t){return!(e.cancelled_files[t.id]||e.errored_files[t.id]||e.completed_fil
es[t.id])}}(this))[0]},cancels:function(){return v(this.cancelled_files).keys().
length},errors:function(){return v(this.errored_files).keys().length},queue_size
:function(){var e,t,n,i,r,o;for(o=0,r=this.file_ids(),n=0,i=r.length;i>n;n++)t=r
[n],e=this.files[t],this.errored_files[t]||this.cancelled_files[t]||"undefined"=
=typeof e.size||(o+=e.size);return o},completed_size:function(){var e,t,n,i,r;fo
r(r=0,i=v(this.completed_files).keys(),t=0,n=i.length;n>t;t++)e=i[t],"undefined"
!=typeof this.files[e].size&&(r+=this.files[e].size);return r},file_ids:function
(){return v(this.files).map(function(){return function(e,t){return t}}(this))},t
otalPercentage:function(){return this.completed_size()/this.queue_size()},num_le
ft:function(){return v(this.file_ids()).filter(function(e){return function(t){re
turn!(e.cancelled_files[t]||e.errored_files[t]||e.completed_files[t])}}(this)).l
ength},clear:function(){return this.files={},this.cancelled_files={},this.all_ca
ncelled=!1,this.errored_files={},this.completed_files={},this.last_update_time=0
,this.last_update_size=0,this.average_bps=0,this.formatted_time="",this.uploadin
g=!1,window.onbeforeunload=null,"undefined"!=typeof pi&&null!==pi?pi.onHide=null
:void 0}},ni.clear(),si=ut.UploadFile={FILENAME_SNIPPET_LENGTH:15,DEST_SNIPPET_L
ENGTH:13,_tmpl:null,init:function(){return si._tmpl=ot.tmpl("upload_list_item_tm
pl"),si._listen()},_listen:function(){return document.observe(oi.QUEUE_EVT,si._f
ile_queued),document.observe(oi.QUEUE_ERROR_EVT,si._file_queue_errored),document
.observe(oi.UPDATE_EVT,si._file_updated),document.observe(oi.COMPLETE_EVT,si._fi
le_completed),document.observe(oi.ERROR_EVT,si._file_errored),document.observe(o
i.CANCEL_EVT,si._file_cancelled)},_file_queued:function(e){var t,n,i,r,o;for(r=e
.memo.files,o=[],n=0,i=r.length;i>n;n++)t=r[n],o.push(function(e){var t,n,i,r,o,
s,a,l;return t=e.dest,Jn.is_quicksend_dest(t)?void Jn.add_external_file(e):(s=q.
format_bytes(e.size||0),n=si._tmpl({file:e,icon:rt.file_icon(e.name),filename_sn
ippet:_.em_snippet(e.name,si.FILENAME_SNIPPET_LENGTH),size:s,dest:t,dest_snippet
:_.em_snippet(Pt("Dropbox")+t,si.DEST_SNIPPET_LENGTH,0),Sprite:Q}),$("upload-fil
es-list").__sert(n),r=$(e.id),o=ni.num_files(),qn.show_share_button_in_file_uplo
ader&&(i=ke("#"+e.id),i.find(".dest-col").hide()),a=$("upload-files-list"),6>=o?
a.removeClassName("scroll"):a.addClassName("scroll"),a.scrollTop=a.scrollHeight,
r.down(".dest").observe("click",function(){return Nr.reload_fqpath(r.readAttribu
te("data-dest"),!0),pi.hide()}),l=r.down(".status-col").down("a.small-x-button")
,l.stopObserving("click"),l.observe("click",function(){return document.fire(oi.C
ANCEL_EVT,{file:e}),ke(document).trigger(oi.CANCEL_EVT,{file:e})}),r.down(".uplo
ad-progress-bar").setStyle({width:"0"}))}(t));return o},_file_queue_errored:func
tion(e){return si._file_queued(e),si._file_errored(e)},_file_updated:function(e)
{var t,n,i,r;return t=e.memo.file,n=$(t.id),1===ni.num_files()&&(r=Pt("%(time_le
ft)s left").format({time_left:ni.formatted_time}),n.down(".time-col").__date(r))
,i=parseInt(t.percent,10)+"%","100%"===i&&(n.down(".time-col").__date(),n.down("
.status-col").__date(new Element("img",{src:"/static/images/icons/ajax-loading-s
mall-vfl3Wt7C_.gif"}))),n.down(".upload-progress-bar").setStyle({width:i})},_fil
e_completed:function(e){var t,n,i;return t=e.memo.file,t.completed=!0,i=$(t.id),
i.addClassName("complete"),qn.show_share_button_in_file_uploader&&!Jn.is_quickse
nd_dest(t.dest)&&(n=ke("#"+t.id),n.find(".share-link").show(),et.SharedFolderAct
ivityLogger.log("web","share_button_in_uploader_impression",Nr.active_user,{}),n
.on("click",function(){var e,n;return pi.hide(),et.SharedFolderActivityLogger.lo
g("web","share_button_in_uploader_click",Nr.active_user,{}),e=t.dest+"/"+t.name,
n="file_uploader",qn.shmodel(e,n)})),setTimeout(function(){return i.down(".statu
s-col").__date(Q.make("web","s_check"))},0),i.down(".upload-progress-bar").setSt
yle({width:"100%"})},_file_errored:function(e){var t,n;return t=e.memo.file,n=$(
t.id),n?si._actual_file_errored(e):setTimeout(function(){return function(){retur
n si._actual_file_errored(e)}}(this),0)},_actual_file_errored:function(e){var t,
n,i,r,o;return i=e.memo.file,r=$(i.id),r.addClassName("error"),r.down(".dest-col
").hide(),r.down(".time-col").__date(),r.down(".status-col").__date(Element("img
",{src:"/static/images/nosync-vfl18cuTS.png",srcset:"/static/images/nosync@2x.pn
g 2x"})),r.down(".upload-progress-bar").setStyle({width:"100%"}),Jn.is_quicksend
_dest(i.dest)?void 0:(n=e.memo.message||Pt("Upload Error"),t=void 0,e.memo.toolt
ip_text?t=e.memo.tooltip_text:(t=Pt('Something went wrong with the advanced uplo
ader. If the problem persists, please use the <a id="basic_link">basic uploader<
/a> to upload via the website.'),ke(document).on("click","a#basic_link",function
(){return _i.show_basic_upload(),!1})),r.down(".error-msg").__date(n),o=r.down("
.error-details"),o.observe("mouseover",function(){return wi.show(o,t)}),r.down("
.error-col").show())},_file_cancelled:function(e){var t,n;return t=e.memo.file,n
=$(t.id),n.addClassName("cancelled"),n.down(".dest-col").__date(Pt(e.memo.messag
e||"Canceled")),n.down(".time-col").__date(),n.down(".status-col").__date(Elemen
t("img",{src:"/static/images/cancelsync-vflGFIEUK.png",srcset:"/static/images/ca
ncelsync@2x.png 2x"})),n.down(".upload-progress-bar").setStyle({width:"100%"})}}
,ti=ut.BulkUpload={init:function(){return this.elem=$("bulk-upload-status"),ti._
listen()},_listen:function(){return document.observe(oi.QUEUE_EVT,ti._file_queue
d.bind(this)),document.observe(oi.UPDATE_EVT,ti._file_updated.bind(this))},_file
_queued:function(){var e;return e=new Element("a",{"class":"small-x-button"}),e.
observe("click",function(){var e,t,n,i,r;for(ni.all_cancelled=!0,e=ni.file_ids()
.slice(0),r=[],n=0,i=e.length;i>n;n++)t=e[n],ni.completed_files[t]||ni.errored_f
iles[t]?r.push(void 0):(document.fire(oi.CANCEL_EVT,{file:ni.files[t]}),r.push(k
e(document).trigger(oi.CANCEL_EVT,{file:ni.files[t]})));return r}),this.elem.dow
s)d files").format({num_completed:ni.num_non_cancelled_files()-ni.errors(),num_f
iles:ni.num_non_cancelled_files()}),e.down(".file-desc").__date(t),i=Ft("- %d er
ror","- %d errors",ni.errors()).format(ni.errors()),e.down(".num-errors").__date
(i)):(null!=ni.current_file&&(n=_.em_snippet(ni.current_file.name,this.FILENAME_
SNIPPET_LENGTH)),t=n?Pt("Unable to upload %(filename)s").format({filename:n}):Pt
("Unable to upload file"),e.down(".file-desc").__date(t),e.down(".num-errors")._
_date()),e.down(".view-details").__date(Pt("View details")),this.add_x_button(),
e.down(".inline-upload-progress").style.width="100%"},show:function(){return $("
inline-upload-status").show()},hide:function(){return $("inline-upload-status").
hide()}},ai=ut.UploadPrep={_drop_indicators:!1,_drop_dest_folder:null,file_count
er:0,current_req:null,_notifications_cleared:!1,supported:function(){return Prot
otype.BrowserFeatures.DB_CORS},enabled:function(){return ai.supported()&&Nr.insi
de_dir&&!(Nr.in_search_mode()&&cr.fulltext_search_enabled)},browse_indicators_en
abled:function(){var e,t,n,i;if(!ai.enabled())return!1;for(i=["modal-overlay"],t
=0,n=i.length;n>t;t++)if(e=i[t],$(e).visible())return!1;return!0},modal_indicato
rs_enabled:function(){var e;return ai.enabled()&&ke("#modal #upload-modal-dropzo
ne").length&&ke("#modal").visible()&&(null!=(e=ke("#modal").offset())?e.left:voi
d 0)>0},_show_border_drop_indicators:function(){return $$(".external-drop-indica
tor").each(function(e){return ke(e).css("opacity",0).fadeTo(500,.6)})},_hide_bor
der_drop_indicators:function(){return $$(".external-drop-indicator").invoke("hid
e")},show_drop_indicators:function(e){var t;if(!ai._drop_indicators){if(ai.modal
_indicators_enabled())t=$("upload-modal-dropzone"),Fe.clone_position(ke(t),ke("#
modal"),{setLeft:!1,setTop:!1}),ke(t).fadeIn(500),ai._show_border_drop_indicator
s();else{if(!ai.browse_indicators_enabled())return;Tr._add_drop_indicators(e)}re
turn $("drag-status").removeClassName("active"),ai._drop_indicators=!0}},hide_dr
op_indicators:function(){return ai._drop_indicators&&(ai._hide_border_drop_indic
ators(),Tr._remove_drop_indicators(),ai._notifications_cleared||b.clear(),$("upl
oad-modal-dropzone").hide(),$("drag-status").addClassName("active"),setTimeout(f
unction(){return ai._drop_indicators=!1,ai._drop_dest_folder=null,ai._notificati
ons_cleared=!1},500)),ai._notifications_cleared=!0},folder_dragover:function(e){
var t;return ai.browse_indicators_enabled()&&ai._drop_indicators?(ri.disabled?nu
ll==ai._drop_dest_folder&&(t=Pt("You can't upload files because you're out of sp
ace."),b.error(t,60),ai._notifications_cleared=!1,ai._show_border_drop_indicator
s()):e!==ai._drop_dest_folder&&(e===Nr.containing_fq_path()?(Nr.inside_read_only
_shared_folder?(t=Pt("You don't have permission to add to this folder."),b.error
(t,60)):(t=Pt("Drop your file to %(upload_action)s",{comment:"upload_action is a
phrase like 'upload to folder 'XYZ'"}).format({upload_action:_i.upload_plain_sn
ippet()}),b.success(new ot(t),60),ai._show_border_drop_indicators()),ai._notific
ations_cleared=!1):(b.clear(),ai._hide_border_drop_indicators())),ai._drop_dest_
folder=e):void 0},supports_recursive_upload:function(e){var t;return window.File
&&window.FileReader&&window.FileList&&window.Blob&&(null!=e&&null!=(t=e[0])?t.we
bkitGetAsEntry:void 0)},upload:function(e,t,n){var i,r,o,s;if(null==n&&(n=null),
!Nr.inside_read_only_shared_folder){if(ri.disabled)return s=Pt("You can't upload
files because you're out of space."),b.error(s);if(ai.supports_recursive_upload
(n))return ai._recursive_upload(e,n);for(r=0,o=t.length;o>r;r++)i=t[r],i.dest=e;
return ai._upload(t,n)}},_recursive_upload:function(e,t){var n,i,r,o,s,a,_,l,u,d
,c,h,f;for(u=[],f=[],i=function(t,n){return t.dest=e+rt.parent_dir(n.fullPath),u
.push(t)},c=0,h=t.length;h>c;c++)d=t[c],a=d.webkitGetAsEntry(),null!==a&&(a.isDi
rectory?Jn.is_quicksend_dest(e)?b.error(Pt("Please select files instead of folde
rs.")):f.push(a):i(d.getAsFile(),a));return s=0,l=0,r=function(e,t){var n;return
n=Pt('The drag and drop uploader can\'t upload %(name)s because it contains Uni
code characters. Use the <a id="use-advanced-uploader"> advanced uploader</a> in
stead.').format({name:t.name}),b.error(new ot(n)),ke("#use-advanced-uploader").o
n("click",function(e){return e.preventDefault(),_i.show_upload()})},n=3e3,_=0,(o
=function(){for(var e;f.length;)a=f.pop(),null!==a&&(a.isDirectory?!function(e){
var t;return t=e.createReader(),s+=1,t.readEntries(function(e){var n,i,r;if(0!==
e.length){for(i=0,r=e.length;r>i;i++)n=e[i],f.push(n);return t.readEntries(argum
ents.callee)}return s-=1},function(t){return s-=1,r(t,e)})}(a):(l+=1,e=function(
e){return function(t){return i(t,e),l-=1}},a.file(e(a),function(e){return l-=1,r
(e,a)})));return u.length>n&&!_?(_=1,void b.error(Pt("The Dropbox website can't
peHTML()})):s=Pt("Are you sure you want to delete the shared folder <strong>%(ite
ms)s</strong>? This shared folder will stay shared with other members and you can
rejoin it later.").format({items:rt.filename(t).escapeHTML()}):s=r?Pt("Are you
sure you want to delete <strong>%(items)s</strong> from the shared folder %(sf_na
me)s?").format({items:rt.filename(t).escapeHTML(),sf_name:r.escapeHTML()}):Pt("Ar
e you sure you want to delete <strong>%(items)s</strong> from your Dropbox?").fo
rmat({items:rt.filename(t).escapeHTML()}),Lt.show({title_text:Pt(n?"Delete folde
r?":"Delete file?"),body_html: <div class="simple-modal-word-wrap-content"> +s+"
</div>",confirm_text:Pt("Delete"),cancel_text:Pt("Cancel"),confirm_callback:func
tion(){return i?_i.do_nonbrowse_delete(e,[t]):_i.do_delete(e,t)}})},show_bulk_de
lete:function(e,t,n){var i;return null==n&&(n=null),i=n?Ft("Are you sure you wan
t to delete %(item_count)s item from the shared folder %(sf_name)s?","Are you sure
you want to delete %(item_count)s items from the shared folder %(sf_name)s?",t.le
ngth).format({item_count:t.length,sf_name:n.escapeHTML()}):Ft("Are you sure you
want to delete %(item_count)s item from your Dropbox?","Are you sure you want to
delete %(item_count)s items from your Dropbox?",t.length).format({item_count:t.
length}),Lt.show({title_text:Ft("Delete %(item_count)s item?","Delete %(item_cou
nt)s items?",t.length).format({item_count:t.length}),body_html:i,confirm_text:Pt
("Delete"),cancel_text:Pt("Cancel"),confirm_callback:function(){return _i.do_bul
k_delete(e,t)}})},show_purge:function(e,t){return Lt.show({title_text:Pt(t?"Perm
anently delete folder?":"Permanently delete file?"),body_html:Pt("Are you sure y
ou want to permanently delete <strong>%(items)s</strong> from your Dropbox?").fo
rmat({items:rt.filename(e).escapeHTML()}),confirm_text:Pt("Permanently delete"),
cancel_text:Pt("Cancel"),confirm_callback:function(){return _i.do_purge(Nr.find_
file(e))}})},show_bulk_purge:function(e){return Lt.show({title_text:Ft("Permanen
tly delete %d item?","Permanently delete %d items?",e.length).format(e.length),b
ody_html:Ft("Are you sure you want to permanently delete %(item_count)s item fro
m your Dropbox?","Are you sure you want to permanently delete %(item_count)s ite
ms from your Dropbox?",e.length).format({item_count:e.length}),confirm_text:Pt("
Permanently delete"),cancel_text:Pt("Cancel"),confirm_callback:function(){return
_i.do_bulk_purge(e)}})},show_bulk_restore:function(e){return Lt.show({title_tex
t:Ft("Restore %d item...","Restore %d items...",e.length).format(e.length),body_
html:Ft("Are you sure you want to restore %(item_count)s item?","Are you sure yo
u want to restore %(item_count)s items?",e.length).format({item_count:e.length})
,confirm_text:Pt("Restore"),cancel_text:Pt("Cancel"),confirm_callback:function()
{return _i.do_bulk_restore(e)}})},wrap_strong:function(e){return""===Nr.containi
ng_fq_path()?e.escapeHTML():"<strong>"+e.escapeHTML()+"</strong>"},upload_snippe
t:function(e){var t,n;return null==e&&(e=1e3),K.get_viewer().is_paired&&Nr.activ
e_user.is_team&&(n=_.em_snippet(K.get_viewer().team_name,e).escapeHTML()),""===N
r.containing_fq_path()?K.get_viewer().is_paired?Nr.active_user.is_team?Pt(" uplo
ad to your %(team_name)s Dropbox",{comment:"Used after the string drop your fil
e to... or choose a file to... "}).format({team_name:n}):Pt(" upload to your p
ersonal Dropbox",{comment:"Used after the string drop your file to... or choo
se a file to... "}):Pt(" upload to your Dropbox"):(t=_.em_snippet(rt.filename(Nr
.containing_fq_path()),e).escapeHTML(),K.get_viewer().is_paired?Nr.active_user.i
s_team?Pt(" upload to the folder <strong>%(folder)s</strong> in your %(team_name
)s Dropbox",{comment:"Used after the string drop your file to... or choose a
file to... "}).format({folder:t,team_name:n}):Pt(" upload to the folder <strong>
%(folder)s</strong> in your personal Dropbox",{comment:"Used after the string d
rop your file to... or choose a file to... "}).format({folder:t}):Pt(" upload
to the folder <strong>%(folder)s</strong>",{comment:"Used after the string drop
your file to... or choose a file to... "}).format({folder:t}))},upload_short_
snippet:function(e){var t,n;return null==e&&(e=1e3),(n=Nr.containing_fq_path())?
(t=_.em_snippet(rt.filename(n),e),Pt("Upload to %(folder_name)s ",{comment:"Upl
oad a file to some folder on the website"}).format({folder_name:t})):Pt("Upload
to Dropbox",{comment:"Upload a file to the root Dropbox folder"})},upload_plain_
snippet:function(e){return null==e&&(e=1e3),this.upload_snippet(e).replace("<str
ong>"," ").replace("</strong>"," ")},show_upload:function(e,t,n){var i,r,o,s,a,_
;if(i=Nr.containing_fq_path(),ri.disabled)return Gt.fillVal(this.wrap_strong(rt.
filename(i)),"disabled-upload-foldername"),a=this.upload_short_snippet(20),void
pi.show(a,$("disabled-upload-modal"),{},!1);if(!FlashDetect.versionAtLeast(9)&&"
flash"===oi.runtimes)return _i.show_basic_upload(),void $("enhanced-upload-toggl
e").hide();for(Gt.fillVal(this.upload_snippet(20),"upload-foldername"),Gt.fillVa
l(this.upload_plain_snippet(10),"dnd-upload-foldername"),$("upload-desc").visibl
e()&&ai.supported()&&($("upload-desc").hide(),$("dnd-upload-desc").show()),a=thi
s.upload_short_snippet(20),pi.show(a,Gt.fromElm("advanced-upload-modal"),{wit_gr
oup:"advanced-uploader"},!1,!1,ni.num_files()),_=[$("modal").down(".basic-link-s
tart"),$("modal").down(".basic-link-running")],r=0,o=_.length;o>r;r++)s=_[r],nul
l!=s&&s.observe("click",function(){return _i.show_basic_upload(),!1});return ni.
num_files()?oi.set_dest(rt.normalize(i)):oi.init(rt.normalize(i),!0,e,n),ii.hide
()},show_basic_upload:function(){return Gt.fillVal(this.upload_snippet(20),"basi
c-upload-foldername"),pi.show(this.upload_short_snippet(20),$("basic-upload-moda
l"),{},!1),$("modal").down(".enhanced-link").observe("click",function(){return _
i.show_upload(),!1}),oi.set_dest(rt.normalize(Nr.containing_fq_path())),oi.init_
basic()},show_undelete:function(e){var t,n,i;return Gt.fillVal(e.filename.escape
HTML(),"undelete_filename"),t=Q.make("web",e.icon,{}),t.addClassName("link-img")
,t.style.backgroundColor="transparent",n=_i.build_revisions_uri(e.fq_path,Nr.act
ive_user,{undelete:1}),$$(".undelete-icon").invoke("update",t),$$(".undelete-oth
er-versions")[0].href=n,$$(".undelete-link")[0].href=n,i=Pt("Restore file?"),pi.
show(i,$("undelete-modal"),{file:e})},do_undelete:function(){var e,t;return e=pi
.vars.file,t=Pt("Restored %(file_name)s ").format({file_name:e.filename}),new A
jax.DBRequest("/cmd/restore",{parameters:{files:[e.fq_path]},subject_user:Nr.act
ive_user,job:!0,html_in_error_msg:!0,progress_text:Pt("Restoring..."),onSuccess:
function(){return pi.hide(),b.success(t),document.fire(s.RESTORE,{files:[e]})}})
,!1},do_copy:function(e,t){var n;return e=e||pi.vars.fq_path,t=t||pi.vars.select
ed_path,n=Nr.find_file(e),ft(n,"Trying to copy a file we couldn t find."),_i.do_
bulk_copy([n],t)},do_bulk_copy:function(e,t){var n,i,r,o,a;if(Nr.pre_action_sele
ction=xr.get_selected_fq_paths(),e=e||pi.vars.files,ft(e.length>0,"Tried to copy
0 files"),"undefined"==typeof t){if("undefined"==typeof pi.vars.selected_path)r
eturn void b.error(Pt("You need to select a destination for the file."));t=pi.va
rs.selected_path}for(t=rt.normalize(t),r=0,o=0,a=e.length;a>o;o++)if(n=e[o],n.di
r&&0===(t+"/").indexOf(n.fq_path+"/"))return void b.error(Pt("You cannot copy a
folder into itself."));return i=e.pluck("fq_path"),b.clear(),new Ajax.DBRequest(
"/cmd/copy",{parameters:{files:i,to_path:t},subject_user:Nr.active_user,job:!0,h
tml_in_error_msg:!0,progress_text:Pt("Copying..."),onSuccess:function(r){var o,a
,l,u,d,c,h,f;for(o=r.responseText.evalJSON().changesets,a=i.length,c=_.em_snippe
t(rt.filename(t),_i.NOTIFICATION_SNIPPET_LEN).escapeHTML(),h=Ft("Copied %(count)
d item to <a id=\"reload-link\">%(location)s</a> .","Copied %(count)d items to
<a id=\"reload-link\">%(location)s</a> .",a),h=h.format({count:a,location:c}),e
e.notifyWithUndo(new ot(h),o,_i.do_rollback),l=[],f=r.responseText.evalJSON().ne
w_browse_files,u=0,d=f.length;d>u;u++)n=f[u],l.push(n.fq_path);return Nr.select_
fq_paths=l,$("reload-link").observe("click",function(){return pr.set_path_url(nu
ll,t)}),bi.schedule_reset(),document.fire(s.COPY,{files:e,to_fq_path:t})}})},bul
k_move_error:function(e,t){var n,i,r,o,s,a,_,l,u;if(r=Nr.find_file(t),o=lr.profi
le_files(e),l=void 0,a=void 0,u=void 0,r?(a=r.dir,l=r.fq_path,u=r.target_ns||r.n
s_id):Nr.inside_dir&&Nr.can_get_details_from_fq_path(t)?(i=Nr.details_from_fq_pa
th(t),a=!0,l=i.fq_path,u=i.ns_id):(a=!0,l=t,u=void 0),s=e.pluck("fq_path").colle
ct(rt.normalize),-1!==s.indexOf(rt.normalize(l)))return Pt("You cannot copy a fo
lder into itself.");if(n=_=function(e){var t;return t=rt.parent_dir(e.fq_path),t
===(l||"/")},e.all(n))return Ft("That file already exists in that folder.","Thos
e files already exist in that folder.",e.length);if(!a)return Pt("You cannot put
files inside one another.");if(o.target_namespaces>0&&u&&u!==c.root_ns&&r){if(o
.sandboxes>0){if(r.is_sandbox())return Pt("You re not allowed to put an applicat
ion folder inside another application folder.");if(r.is_shared_folder())return P
t("You re not allowed to put an application folder inside a shared folder.")}els
e if(o.shared_folders>0){if(r.is_sandbox())return Pt("You re not allowed to put
a shared folder inside an application folder.");if(r.can_hold_shared_folders&&0=
==o.team_shared_folders)return;if(r.is_shared_folder())return Pt("You re not all
owed to put a shared folder inside another shared folder.")}return Pt("You re no
t allowed to nest special folders.")}return Nr.public_folder_enabled&&"/Public"=
%(folder_name)s ").format({folder_name:rt.filename(e)}),i=t.responseText,i.sta
rtsWith("err:")?(i=i.substring(4),ke("#async-result").html(i),b.error(new ot(i),
60)):(n=Pt("Restored %(folder_name)s ").format({folder_name:rt.filename(e)}),ke
("#status-of-files").text(Pt("Restored files")),b.success(n,60)),ke("#restore-do
ne-heading").text(n),ke(".pre-restore").hide(),ke(".post-restore").show()},new A
jax.DBRequest("/cmd/restore",{parameters:{files:[e]},job:!0,html_in_error_msg:!0
,progress_text:Pt("Restoring..."),onSuccess:n,onFailure:n,subject_user:t})},do_b
ulk_download:function(e){var t,n,i,r;for(t=new Element("form",{action:o({scheme:
"https",authority:be.BLOCK_CLUSTER,path:"/zip_batch"}).updateQuery(D.UID_PARAM_N
AME,Nr.active_user.id).toString(),method:"post"}),i=0,r=e.length;r>i;i++)n=e[i],
li.add_vars(t,{files:n.fq_path});return li.add_vars(t,{parent_path:Nr.block_hash
_param||"/",w:Nr.block_hash}),$(document.body).__sert(t),t.submit()},do_bulk_pho
to_view:function(e,t){var n,i,r,s;return s={},s[D.UID_PARAM_NAME]=e.id,n=String(
o({scheme:"https",authority:be.WEBSERVER,path:"/app/view_in_timeline",query:s}))
,i=new Element("form",{action:n,method:"post"}),li.add_vars(i,{t:Be.read(Re.JS_C
SRF_COOKIE),ns_ids:JSON.stringify(function(){var e,n,i;for(i=[],e=0,n=t.length;n
>e;e++)r=t[e],i.push(r.ns_id);return i}()),ns_paths:JSON.stringify(function(){va
r e,n,i;for(i=[],e=0,n=t.length;n>e;e++)r=t[e],i.push(r.ns_path);return i}())}),
$(document.body).__sert(i),i.submit()},build_revisions_uri:function(e,t,n){retur
n null==n&&(n={}),n[D.UID_PARAM_NAME]=String(t),ne.getGandalfRule("revision-hist
ory-web")?o({path:"/history"+e}).updateQuery(n):o({path:"/revisions"+e}).updateQ
uery(n)}};var li,yn={}.hasOwnProperty;li=__CONDITIONAL_JS__.Forms=INLINE_JS.Form
s=ut.Forms={submitOnlyOnce:function(){var e;return e=li.submitted!==!0,li.submit
ted=!0,e},disable:function(e){return e?setTimeout(function(){return e.disabled=!
0},0):void 0},enable:function(e){return e?setTimeout(function(){return e.disable
d=!1},0):void 0},_button_on_change:function(e,t,n,i){var r,o,s,a;return r=ke(e),
r[t](),null==i&&(i=r.closest("form")),o=i[0],null==this.next_id&&(this.next_id=0
),s=this.next_id++,null==this.initial_vars&&(this.initial_vars={}),this.initial_
vars[s]=this.collect_form_vars(o),r.attr("data-id",s),i.data("button-id",s),a=fu
nction(e){return function(){var i,a,_;r[t](),a=e.collect_form_vars(o),Object.key
s(a).length!==Object.keys(e.initial_vars[s]).length&&r[n](),_=[];for(i in a)_.pu
sh(a[i]!==e.initial_vars[s][i]?r[n]():void 0);return _}}(this),i.change(a),i.fin
d("input").filter(":text").on("input",a),i.find("textarea").on("input",a)},show_
button_on_change:function(e,t){return this._button_on_change(e,"hide","show",t)}
,hide_button_on_change:function(e,t){return this._button_on_change(e,"show","hid
e",t)},add_vars:function(e,t){var n,i,r;e=$(e),r=[];for(i in t)yn.call(t,i)&&(n=
new Element("input",{type:"hidden",name:i}),n.setValue(t[i]),r.push(e.__sert(n))
);return r},collect_form_vars:function(e,t){var n,i,r,o,s,a;for(null==t&&(t=!1),
e=e||$(document.body),i=e.select("input").concat(e.select("textarea")).concat(e.
select("select")),s={},r=0,o=i.length;o>r;r++)n=i[r],n.name&&"t"!==n.name&&!ke(n
).attr("data-ignore-var")&&(a=n.getValue(),(a||t)&&("string"!=typeof a&&(a=a.joi
n(",")),null!=s[n.name]?"string"==typeof s[n.name]?s[n.name]=[s[n.name],a]:s[n.n
ame].push(a):s[n.name]=a));return s},add_loading:function(e,t){var n;return e?(e
=$(e),n=new Element("img",{src:"/static/images/icons/ajax-loading-small-vfl3Wt7C
_.gif"}),n.addClassName("text-img ajax_submit_loading"),"after"===t?ke(e).after(
n):ke(e).before(n)):void 0},remove_loading:function(){return ke(".ajax_submit_lo
ading").remove()},ui_form_submit:function(e,t){return t=t||e.action,e.ajax_submi
tted?!1:(e.ajax_submitted=!0,new h(ke(e),t,{data:li.collect_form_vars(e),success
:function(t){return function(){var n,i;return i=ke(e).data("button-id"),null!=i?
(n=ke(e).find("*[type= submit ][data-id= "+i+" ]"),t.initial_vars[i]=t.collect_f
orm_vars(e),n.hide()):void 0}}(this),complete:function(){return function(){retur
n e.ajax_submitted=!1}}(this)}))},ajax_submit_obj:function(e){var t,n,i,r,o,s,a,
_,l,u,d;return r=e.form,d=e.url,u=e.success_callback,i=e.fail_callback,t=e.butto
n,a=e.more_vars,_=e.position,s=e.job,o=e.html_response,n=e.complete_callback,l=e
.progress_text,li.ajax_submit(r,d,u,i,t,a,_,s,o,n,l)},ajax_submit:function(e,t,n
,i,r,o,s,a,_,l,u){var d,c,h,f,p;if(null==_&&(_=!1),e.ajax_submitted)return!1;for
(e.ajax_submitted=!0,p=ke(e).find(".suggestion-input"),c=0,h=p.length;h>c;c++)d=
p[c],vi.blank(d.identify())();return r&&li.add_loading(r,s),f=li.collect_form_va
rs(e),o&&Object.extend(f,o),new Ajax.DBRequest(t||e.action,{noAutonotify:!0,para
meters:f,job:a,progress_text:u,evalJSON:!1,onSuccess:function(e){return li.remov
+"_arrow_top.png"}),g.addClassName("tarrow"),"titled"===r.style?(g.addClassName(
"arrow-"+n),s=new Element("div"),s.addClassName("arrow-container"),i&&(s.style.w
idth=i-42+"px"),s.__sert(g),p.__sert(s)):(p.style.textAlign=n,p.__sert(g))),k.__
sert(b),k.__sert(p),k.__sert(y),w.__sert(k),E=new Element("tr"),c=new Element("t
d"),c.addClassName("l"),"left"===t&&(o="titled"===r.style?new Element("img",{src
:"/static/images/bluebubble_arrow_left-vfl8zzy_-.png"}):new Element("img",{src:"
/static/images/bubble_arrow-vfl8m7tk-.png"}),o.addClassName("arrow"),c.__sert(o)
,c.vAlign=n),d=new Element("td"),d.addClassName("c"),d.update(e),h=new Element("
td"),h.addClassName("r"),"right"===t&&(f=new Element("img",{src:"/static/images/
bubble_arrow_right-vflmW3_2s.png"}),f.addClassName("rarrow"),h.__sert(f),h.vAlig
n=n),E.__sert(c),E.__sert(d),E.__sert(h),w.__sert(E),x=new Element("tr"),l=new E
lement("td"),l.addClassName("bl"),a=new Element("td"),a.addClassName("b"),"botto
m"===t&&(_=new Element("img",{src:"/static/images/"+v+"_arrow_bottom.png"}),_.ad
dClassName("barrow"),"titled"===r.style?(_.addClassName("arrow-"+n),s=new Elemen
t("div"),s.addClassName("arrow-container"),i&&(s.style.width=i-42+"px"),s.__sert
(_),a.__sert(s)):(a.style.textAlign=n,a.__sert(_))),u=new Element("td"),u.addCla
ssName("br"),x.__sert(l),x.__sert(a),x.__sert(u),w.__sert(x),m.__sert(w),m}};var
hi;hi=INLINE_JS.FreshDropdown=ut.FreshDropdown={show:function(e,t,n,i){var r,o,
s,a;return null==i&&(i=!1),ke(document).trigger("dropdownOpened",[1]),r=ke(t),n|
|(n=r[0].offsetHeight+10),this.hide_all(),o=ke(e).show(),a=o[0].offsetWidth,s=r[
0].offsetWidth,Fe.clone_position(o,r,{setHeight:!1,setWidth:!1,offsetLeft:-1*(as)+22,offsetTop:n}),i&&o.width(a),r.addClass("pressed"),function(){return functi
on(){return document.observe("click",hi.hide_all)}}(this).defer()},hide_all:func
tion(){var e,t;return t=ke(".freshdropdown-menu"),e=0,t.each(function(){return k
e(this).is(":visible")?e+=1:void 0}),t.hide(),ke(document).trigger("dropdownClos
ed",[e]),$$(".freshdropdown-button").invoke("removeClassName","pressed"),documen
t.stopObserving("click",hi.hide_all)}};var fi;fi=ut.JumpWatcher={inverval:null,l
ast_hash:null,last_page_offset:0,check:function(){return window.location.href.en
dsWith("#")&&0===window.pageYOffset&&0!==fi.last_page_offset?this.report():(this
.last_page_offset=window.pageYOffset,this.last_hash=o.parse(window.location.href
).fragment)},report:function(){return clearInterval(fi.interval),pt("Hash jump d
etected, last hash = "+this.last_hash+". You may have an onclick handler that is
n t firing, or you are not preventing the default action (eg. by returning false
in your handler)")}};var pi;pi=__CONDITIONAL_JS__.Modal=INLINE_JS.Modal=ut.Moda
l={KEY_SCOPE:"modal",width:640,vertical_offset:90,show:function(e,t,n,i,r,o,s,a,
_){var l,u,d,c,h,f;return null==n&&(n=!1),null==i&&(i=!1),null==r&&(r=!1),null==
o&&(o=!1),null==s&&(s=""),null==a&&(a=!0),null==_&&(_=!1),pi.shown()&&pi._cleanu
p(),r=r||this.width,u="#modal-content .error-message, #modal-content .error-remo
vable, #modal-content .error-bubble",$$(u).invoke("hide"),ni.uploading&&!o?(ht(P
t("You can t do this while uploading.")),!1):(ft(t,"Missing modal content!"),h=t
his.vars._prev_scope,this.vars=n||{},this.vars._prev_scope=h,$("modal").setStyle
({width:r+"px",margin:"0 0 0 "+Math.floor(-r/2).toString()+"px"}),this.vars.extr
a_class="",s&&($("modal").addClassName(s),this.vars.extra_class=s),o||(ni.num_fi
les()&&(oi.reset(),ni.clear()),c=Kt.childElement($("modal-content"),0),c&&c!==t&
&$("grave-yard").__sert(c),l=new Element("div"),l.update(t),$("modal-content")._
_sert(l),
t.show&&t.show(),Element.show("modal")),ke("#modal-overlay").off("click"),a?ke("
#modal-overlay").on("click",function(e){return pi.hide(null,!1,!0),e.preventDefa
ult(),e.stopPropagation()}):ke("#modal-overlay").on("click",function(e){return e
.preventDefault(),e.stopPropagation()}),this.fix_position(),$("modal-overlay").s
how(),$("modal-behind").setStyle({width:r+20+"px",margin:"0 0 0 "+Math.floor(-r/
2-10).toString()+"px"}),ke("#modal-behind").css("opacity",.2),$("modal-behind").
show(),i?$("modal-content").select("#"+i.id).first().focus():Kt.ie||(d=$("modal"
).down("input[type=submit]")||$("modal").down("input[type=button]"),d&&d.focus()
),this.track_id||this.track_resizes(),e?(Kt.isElm(e)?ke("#modal-title").html(e):
ke("#modal-title").text(e),ke("#modal-title").show(),f=ke("#modal-title").text()
,Vt("Modal.show:",f)):(ke("#modal-title").hide(),Vt("Modal.show")),ui.register(!
1,"modal"),this.keydownHandler=this.keydown.bind(this),document.observe("keydown
",this.keydownHandler),$("modal-content").style.height="auto",key.getScope()!==t
his.KEY_SCOPE&&(this.vars._prev_scope=key.getScope()),key.setScope(this.KEY_SCOP
E),this.prevent_hide_if_loading=_,ke("#modal").find("input").filter(":visible:fi
rst").focus(),this.in_viewport()&&(this.scroll_locked=!0,Fe.scroll_lock_document
()),ke(document).trigger("modalOpened",[1]),!1)},in_viewport:function(){var e,t,
n,i,r;return e=ke("#modal"),t=e.height(),r=e.width(),n=Fe.viewport_dimensions(),
i=Fe.viewport_offset(e),i.left>0&&i.top>0&&i.left+r<n.width&&i.top+t<n.height},f
ix_position:function(){var e,t;return t=document.viewport.getScrollOffsets().top
+this.vertical_offset,e=parseInt($("modal").getStyle("height"),10),e+this.vertic
al_offset<document.viewport.getHeight()?($("modal").setStyle({position:"fixed",t
op:this.vertical_offset+"px"}),$("modal-behind").setStyle({position:"fixed",heig
ht:e+20+"px",top:this.vertical_offset-10+"px"})):($("modal").setStyle({position:
"absolute",top:t+"px"}),$("modal-behind").setStyle({position:"absolute",height:e
+20+"px",top:t-10+"px"}))},keydown:function(e){var t,n,i,r;if(i=e.keyCode||e.whi
ch||e.charCode,(27===i||8===i&&!Fe.focus_in_input())&&(e.preventDefault(),this.h
ide(null,!1,!0)),9===i&&!Fe.focus_in_input()){for(n=$("modal").down("input[type=
text], input[type=email]"),r=$("modal").down(".modal-tabs"),t=r;t&&t.next();)if(
t=t.next(),t.visible()){n=t.down("input[type=text], input[type=email]");break}if
(n)return e.preventDefault(),n.focus()}},shown:function(){return $("modal").visi
ble()},hide:function(e,t,n){return e&&Event.stop(e),this.should_prevent_hide()?!
1:(this.prevent_hide_if_loading=!1,this.onHide?void this.onHide(n):(this.onHide=
null,Element.hide("modal-behind"),Element.hide("modal-overlay"),$("modal").remov
eClassName(this.vars.extra_class),t||ni.num_files()?($("modal").style.marginLeft
="-10000000px",ni.uploading&&ii.show()):Element.hide("modal"),pi._cleanup(),this
.track_id&&(clearInterval(this.track_id),this.track_id=!1),document.stopObservin
g("keydown",this.keydownHandler),document.activeElement&&-1===[document,window,d
ocument.body].indexOf(document.activeElement)&&$(document.activeElement).blur(),
key.setScope(this.vars._prev_scope),Vt("Modal.hide")))},_cleanup:function(){retu
rn ke(document).trigger("modalClosed",[1]),this.scroll_locked?Fe.scroll_unlock_d
ocument():void 0},should_prevent_hide:function(){return this.prevent_hide_if_loa
ding&&v.some(ke("#modal form"),function(e){return e.ajax_submitted})},track_resi
zes:function(){return this.track_id=setInterval(this.on_resize.bind(this),150)},
on_resize:function(){var e;return e=$("modal").getHeight(),this.old_height!==e||
$("modal-behind").getHeight()<e?(this.old_height=e,this.fix_position()):void 0},
vars:{}};var mi;mi=ut.SickInput={init:function(){var e,t,n,i,r;for(i=$$(".sick-i
nput"),r=[],t=0,n=i.length;n>t;t++)e=i[t],e.hasClassName("sickified")||r.push(th
is._create(e));return r},_create:function(e){var t,n,i;if(null!=e)return n=e.ide
ntify(),i=e.down("input")||e.down("textarea")||e.down("select"),i.observe("focus
",function(){return e.addClassName("focused")}),i.observe("blur",function(){retu
rn e.removeClassName("focused")}),t=function(){return e.hasClassName("populated"
)&&""===i.getValue()?e.removeClassName("populated"):e.hasClassName("populated")|
|""===i.getValue()||e.addClassName("populated"),n in mi._handler_map?mi._handler
_map[n]():void 0},li.show_errors(),t(),setInterval(t,100)},_handler_map:{},add_i
nterval_handler:function(e,t){var n;return n=e.identify(),this._handler_map[n]=t
},remove_interval_handler:function(e,t){var n;return n=e.identify(),this._handle
r_map[n]===t?delete this._handler_map[n]:void 0}};var vi;vi=ut.SuggestionInput={
register:function(e){var t;return e=$(e),t=e.up("form"),vi.defaulted(e)||""===e.
getValue()?e.setValue(e.title):e.addClassName("suggestion-input-unfaded"),e.obse
rve("blur",this.blur.bind(this)),e.observe("focus",this.focus.bind(this)),e.obse
rve("db:value_change",this.focus.bind(this)),t?(e.id||(e.id="r_elm_id_"+Math.ran
dom().toString()),t.observe("submit",vi.blank(e.id).bind(this))):void 0},registe
r_all:function(){var e,t,n,i,r;for(i=$$(".suggestion-input"),r=[],e=0,n=i.length
;n>e;e++)t=i[e],r.push(this.register(t));return r},blank:function(e){return func
tion(t){return function(){var n;return(n=$(e))&&t.defaulted(n)?n.setValue(""):vo
id 0}}(this)},defaulted:function(e){return e=$(e),e.getValue()===e.title},do_bla
nk:function(e){return this.blank(e)()},clear:function(e){var t;return t={target:
e},this.focus(t)},focus:function(e){var t;return(t=$(e.target))&&this.defaulted(
t)?(t.addClassName("suggestion-input-unfaded"),t.setValue("")):void 0},blur_elm:
function(e){return""===e.getValue()&&(e.removeClassName("suggestion-input-unfade
d"),e.setValue(e.title)),e.blur()},blur:function(e){var t;return(t=$(e.target))?
this.blur_elm(t):void 0},reset:function(e){var t;return(t=$(e))?(t.removeClassNa
me("suggestion-input-unfaded"),t.setValue(t.title),t.defaulted=!0,t.blur()):void
0},setValue:function(e,t){var n;return(n=$(e))?(n.addClassName("suggestion-inpu
t-unfaded"),n.setValue(t),n.defaulted=!1):void 0}};var gi;gi=ut.TitleBubble=func
tion(){var e,t,n,i,r,o,s;return s=0,e=0,o=function(e){return s=e},r=function(i){
var r,o,a,_,l,u,d,c,h,f,p;return o=ke(i.currentTarget),p=o.attr("title"),(null!=
p?p.length:void 0)&&(o.attr("data-title",p),o.removeAttr("title")),l=parseInt(o.
data("title-delay")),_="title-bubble-"+e++,o.data("bubble-id",_),r=ke("<div/>",{
id:_,"class":"title_bubble_container"}),l||(r.css({opacity:0}),r.addClass("has-t
ransition")),o.hasClass("white")&&r.addClass("white"),o.hasClass("black")&&r.add
Class("black"),r.text(o.attr("data-title")),c=o.attr("data-title-html"),r.html(c
),f="yes"!==o.attr("data-title-hide-tail"),f&&(a=ke("<div/>",{"class":"tail"}),r
.append(a)),ke(document.body).append(r),d=n(o[0],r[0]),u=t(d,r[0],o[0]),Fe.clone
_position(r,o,{setWidth:!1,setHeight:!1,offsetTop:u.top-s,offsetLeft:u.left}),r.
addClass("position-"+d),f&&Fe.clone_position(a,o,{setWidth:!1,setHeight:!1,setTo
p:!1,offsetLeft:u.left+u.tail_offset_left+ke(r).outerWidth()/2}),h=function(){va
r e;if(r.data("pending-delay")&&o.data("bubble-id")===_)return e=parseInt(o.data
("title-fade-time"))||400,r.fadeIn(e)},l?(r.hide(),r.data("pending-delay",!0),se
tTimeout(h,l)):r.css({opacity:""})},n=function(e,t){var n,i,r;if(e=$(e),r=e.getA
ttribute("data-title-position"),n=document.viewport.getDimensions(),i=e.viewport
Offset(),"above"!==r&&"below"!==r&&"right"!==r&&"left"!==r&&(r="above"),"left"==
=r){if(i.left<t.width)return"right"}else if("right"===r){if(n.width-(i.left+e.ge
tWidth())<t.width)return"left"}else if("below"===r){if(n.height-(i.top+e.getHeig
ht())<t.height)return"above"}else if("above"===r&&i.top<t.height)return"below";r
eturn r},t=function(e,t,n){var i,r,o,s,a,_,l,u,d,c;return t=$(t),n=$(n),o=docume
nt.viewport.getDimensions(),i=t.getDimensions(),s=n.viewportOffset(),r=6,a=0,_=0
,d=0,c=0,("below"===e||"above"===e)&&(_="below"===e?n.getHeight()+r:-1*i.heightr,l=n.getWidth()/2-i.width/2,s.left+l+i.width>o.width?(a=o.width-s.left-i.width,
d=l-a-5):(a=l,d=-5)),("left"===e||"right"===e)&&(a="right"===e?n.getWidth()+r:-1
*i.width-r,u=n.getHeight()/2-i.height/2,s.top+u+i.height>o.height?(_=o.height-s.
top-i.height,c=u-_-5):(_=u,c=-5)),{left:a,top:_,tail_offset_left:d,tail_offset_t
op:c}},i=function(e){var t,n,i;return n=ke(null!=e?e.currentTarget:void 0),t=ke(
"#"+n.data("bubble-id")),t.data("pending-delay")?(t.removeData("pending-delay"),
i=parseInt(n.data("title-fade-time"))||400,t.fadeOut(i,function(){return t.remov
e()})):t.remove()},{init:function(){return ke(document).on("mouseenter",".title_
bubble",r),ke(document).on("mouseleave",".title_bubble",i).on("mouseup",".title_
bubble",i),ke(document).on("mouseenter",".title_bubble_sticky",r),ke(document).o
n("mouseleave",".title_bubble_sticky",i)},set_vertical_space:o,hide_all:function
(){return ke(".title_bubble_container").remove()}}}();var wi;wi=INLINE_JS.Toolti
p=ut.Tooltip={attach:function(e,t,n,i){var r,o;return null==i&&(i={}),e=$(e),n=n
?$(n):null,r=ci.make(t,e.tail_position,i.tail_position,i.width,i),r.setStyle({di
splay:"none",position:"absolute"}),$("floaters").__sert(r),r.style.zIndex=e.matc
h("#modal-content *")||e.match(".db-modal-content *")?"13001":"","right"===e.tai
l_position&&(o=Kt.ie?32:12,r.style.marginLeft=-(r.getWidth()+e.getWidth()+o)+"px
"),e.tooltip=r,e.out_target=n?!0:!1,e.observe("mouseout",this.mouseout("target",
e)),e.observe("mouseover",this.mouseover("target",e)),e.out_trigger=n?!1:!0,n&&(
n.observe("mouseout",this.mouseout("trigger",e)),n.observe("mouseover",this.mous
eover("trigger",e))),e.out_tooltip=!0,r.observe("mouseout",this.mouseout("toolti
p",e)),r.observe("mouseover",this.mouseover("tooltip",e))},update:function(e,t){
return e.tooltip?$(e.tooltip).update(t):void 0},mouseover:function(e,t){return f
unction(){return t["out_"+e]=!1}},mouseout:function(e,t){return function(){retur
n t["out_"+e]=!0,wi.hide_if_out.defer(t)}},show_by:function(e){var t,n;return t=
ke(e.tooltip),e=ke(e),t.show(),n=Math.floor(t[0].offsetHeight/2),Fe.clone_positi
on(t,e,{setWidth:!1,setHeight:!1,offsetTop:Math.floor(e[0].offsetHeight/2)-n,off
setLeft:e[0].offsetWidth+1})},hide_if_out:function(e){var t;if(e.out_target&&e.o
ut_trigger&&e.out_tooltip)return t=$(e.tooltip),t.hide()},show:function(e,t,n,i,
r){return null==i&&(i="left"),e=$(e),e.tail_position||(e.tail_position=i),n=n?$(
n):null,e.tooltip||this.attach(e,t,n,r),this.show_by(e)}};var bi;bi=INLINE_JS.Tr
eeView=ut.TreeView={tv:{},loaded:!1,user:null,role_icon:"",set_params:function(e
){return this.ajax_params=e},init:function(e,t,n){var i;return null==n&&(n="tree
view"),this.tv[n]={},i=this.tv[n],i.autohide=null===t?!0:t,i.handler=e,i.viewdiv
=$(n),i.hidefunc=this.hide.bindAsEventListener(this),this.ajax_params={},documen
is)),$(document.body).observe("click",this.hide_cal.bind(this)),this.onDateChang
e(o)},show_cal:function(e){var t;return e&&Event.stop(e),t=$(e.target),t.match("
.cal-container")||t.up(".cal-container")?void 0:(ke(".cal-container").hide(),thi
s.cal_container.show())},hide_cal:function(){return this.cal_container.hide()},o
nDateChange:function(e){return this.input.value=Kt.to_mysql_date(e,!1),this.disp
lay.update(jr.localize(e)),this.hide_cal()}});var xi;xi=ut.TextInputDatePicker=C
lass.create({initialize:function(e,t){var n,i,r,o;return this.options={include_s
econds:!0,include_microseconds:!0,choose_eod:!1},Object.extend(this.options,t||{
}),this.input=$(e),ft(this.input,"Couldn t find the element "+e.toString()),r=ne
w Date,o=this.input.value?Kt.from_mysql_date(this.input.value):!1,i=new Date(r.g
etUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),this.cal_icon=Q.make("web","cale
ndar_view_month",{align:"absmiddle"}),this.cal_container=new Element("div",{id:"
cal_container_"+e,style:"display: none; position: absolute; z-index: 1"}),this.c
alendar=new ki(this.cal_container,{onDateChange:this.onDateChange.bind(this),las
t_day:i,selected_date:o}),this.input.__sert({after:this.cal_icon}),this.cal_icon
.observe("click",this.toggle_cal.bindAsEventListener(this)),n=ke(this.input),Fe.
clone_position(ke(this.cal_container),n,{setWidth:!1,setHeight:!1,offsetTop:n[0]
.offsetHeight}),this.cal_icon.__sert({after:this.cal_container})},toggle_cal:fun
ction(e){return e&&Event.stop(e),this.cal_container.toggle()},hide_cal:function(
e){return e&&Event.stop(e),this.cal_container.hide()},onDateChange:function(e){r
eturn this.options.choose_eod&&e.setTime(Kt.start_of_day(e).getTime()+86399999),
this.input.value=Kt.to_mysql_date(e,this.options.include_seconds,this.options.in
clude_microseconds),this.hide_cal()}}),U.window_load(ui.register.bind(ui)),ke(mi
.init.bind(mi)),ke(vi.register_all.bind(vi)),Event.observe(window,"scroll",funct
ion(){return gi.hide_all()}),ke(function(){return fi.interval=setInterval(fi.che
ck.bind(fi),500),gi.init()});var Si,bn=function(e,t){function n(){this.construct
or=e}for(var i in t)yn.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.p
rototype=new n,e.__super__=t.prototype,e},yn={}.hasOwnProperty;Si=INLINE_JS.Chan
geNameModal=ut.ChangeNameModal=function(e){function t(){t.__super__.constructor.
call(this,{element_id:"change-name-modal"}),this.on_confirm_button_click=functio
n(e){return function(t){var n,i,r;return t.preventDefault(),n=ke(t.target),i=n.c
losest("form"),r=function(){return e.hide(),location.reload()},li.ajax_submit(i[
0],!1,r,null,n[0])}}(this)}return bn(t,e),t}(xt);var Ci,Ti,kn=function(e,t){retu
rn function(){return e.apply(t,arguments)}},bn=function(e,t){function n(){this.c
onstructor=e}for(var i in t)yn.call(t,i)&&(e[i]=t[i]);return n.prototype=t.proto
type,e.prototype=new n,e.__super__=t.prototype,e},yn={}.hasOwnProperty;Ti=ut.Man
ageAliasModal=function(e){function t(e){this.options=e,this._poll_until_verified
=kn(this._poll_until_verified,this),this._get_params_from_target=kn(this._get_pa
rams_from_target,this),this._on_load=kn(this._on_load,this),this._show_action_pa
nel=kn(this._show_action_panel,this),this._input_enter_handler=kn(this._input_en
ter_handler,this),this.resend_verify=kn(this.resend_verify,this),this.remove_ali
as=kn(this.remove_alias,this),this.add_alias=kn(this.add_alias,this),this.refres
h_alias=kn(this.refresh_alias,this),this.on_show=kn(this.on_show,this),t.__super
__.constructor.call(this,this.options)}return bn(t,e),t.prototype.before_show=fu
nction(e){return t.__super__.before_show.call(this,e),this.polling=0,e.find(".al
ias-action").on("click",this._show_action_panel),e.find(".alias-action-submit").
on("click",this.add_alias),e.find("form").submit(function(){return!1}),e.find(".
alias-action-inputs input").on("keyup",this._input_enter_handler)},t.prototype.o
n_show=function(){return this.refresh_alias(!0,this._poll_until_verified)},t.pro
totype.refresh_alias=function(e,t){return null==e&&(e=!0),e&&li.clear_errors(),n
ew Ajax.DBRequest("/account/alias/get",{subject_user:this.options.subject_user,o
nSuccess:function(e){return function(n){return e.$modal_window.find(".dynamic-co
ntent").html(n.responseText),e._on_load(n),"function"==typeof t?t():void 0}}(thi
s),onFailure:function(e){return function(){return e.hide()}}(this)})},t.prototyp
e.add_alias=function(e){var t,n,i,r;return e.preventDefault(),n=ke(e.currentTarg
et).closest("form"),t=n.find(".alias-action-submit"),r={},r[D.UID_PARAM_NAME]=th
is.options.subject_user.id,i=function(e){return function(){var t;return e.$modal
_window.find(".alias-action-inputs input").val(""),e.polling=0,t=e.polling?null:
e._poll_until_verified,e.refresh_alias(!0,t)}}(this),li.ajax_submit(n[0],!1,i,!1
,t[0],r,"before")},t.prototype.remove_alias=function(e){var t;return e.preventDe
fault(),t=this._get_params_from_target(e.currentTarget),new Ajax.DBRequest("/acc
ount/alias/remove",{subject_user:this.options.subject_user,parameters:t,onSucces
s:function(e){return function(){return e.refresh_alias()}}(this)})},t.prototype.
resend_verify=function(e){var t;return e.preventDefault(),t=this._get_params_fro
m_target(e.currentTarget),new Ajax.DBRequest("/account/alias/send_verify",{subje
ct_user:this.options.subject_user,parameters:t,onSuccess:function(e){return func
tion(){return e.refresh_alias()}}(this)})},t.prototype._input_enter_handler=func
tion(e){return e.preventDefault(),e.stopPropagation(),13===e.which?this.add_alia
s(e):void 0},t.prototype._show_action_panel=function(e){var t,n;return e.prevent
Default(),n=ke(e.currentTarget).data("target"),this.$modal_window.find(".alias-a
ction-panel").hide(),t=this.$modal_window.find("#"+n).show(),t.find("input:visib
le:enabled:first").focus()},t.prototype._on_load=function(){return di.register_a
ll(),this.$dynamic=this.$modal_window.find("#alias-list-container"),this.$dynami
c.on("click",".alias-remove",function(e){return function(t){return e.remove_alia
s(t)}}(this)),this.$dynamic.on("click",".alias-verify",function(e){return functi
on(t){return e.resend_verify(t)}}(this))},t.prototype._get_params_from_target=fu
nction(e){var t,n,i;return t=ke(e),i=t.data("alias-type"),n=t.closest(".alias-ro
w").find(".alias-text").text(),{alias:n,alias_type:i}},t.prototype._poll_until_v
erified=function(){var e,t,n,i;return t=5,e=60,n=function(e){return function(){r
eturn e.refresh_alias(!1,e._poll_until_verified)}}(this),i=this.$dynamic.find(".
alias-verify").length,i&&this.polling<e?(this.polling++,setTimeout(n,1e3*t)):thi
s.polling=0},t}(xt),Ci=INLINE_JS.AliasManager=ut.AliasManager={show:function(e){
var t,n,i,r;if(r=K.get_viewer().get_user_by_role(e),null!=r){if(!r.is_email_veri
fied)return void(e===D.ROLE_PERSONAL?personal_email_verification.verified_or_sho
w():work_email_verification.verified_or_show());i=K.get_viewer().is_paired?e:"",
n=Pt("Manage your %(role_show)s contact methods").format({role_show:i}),t=new Ti
({element_id:"manage-alias",title:n,subject_user:r,role:r.role}),t.show()}}};var
Ai;Ai=INLINE_JS.BonusTable=ut.BonusTable={_tmpl:null,_inited:null,_next_page:0,
_fetching_page:!1,init:function(e){return this.user_id=e,Ai._inited?void 0:(Ai._
inited=!0,$("bonus-loading").show(),Ai._tmpl=ot.tmpl("bonus_row_tmpl"),Ai.listen
(),Ai.get_next_page())},_render:function(e){var t,n,i,r;for(t=[],n=0,i=e.length;
i>n;n++)r=e[n],t.push(Ai._tmpl({row:r,Sprite:Q}));return $("bonus-table").__sert
(t)},get_next_page:function(){return Ai._fetching_page?void 0:(Ai._fetching_page
=!0,new Ajax.DBRequest("/account/bonus_page/"+Ai._next_page,{onSuccess:function(
e){var t,n,i;return t=e.responseText.evalJSON(),i=t.rows,n=t.has_more,Ai._render
(i),$("bonus-loading").hide(),n?(Ai._next_page+=1,$("load-more-bonus").show()):$
("load-more-bonus").hide(),Ai._fetching_page=!1},subject_user:this.user_id}))},_
max_referral_over:function(e){var t,n,i;return n=ke(e.currentTarget),i=Pt("You v
e earned the maximum amount of referral space. Thanks for inviting people to Dro
pbox!"),t=ke(ci.make(i,"right","middle")),Element.absolutize(t[0]),n.append(t),F
e.clone_position(t,n,{setWidth:!1,setHeight:!1}),t.css({width:"200px",left:parse
Int(t.css("left"),10)-210+"px",top:parseInt(t.css("top"),10)-55+"px"})},_max_ref
erral_out:function(){var e,t,n,i,r;for(i=ke(".reached-max-referral-bonus .bubble
"),r=[],t=0,n=i.length;n>t;t++)e=i[t],r.push(e.remove());return r},listen:functi
on(){return ke("#load-more-bonus").on("click",Ai.get_next_page.bind(Ai)),ke(docu
ment).on("mouseenter",".reached-max-referral-bonus",Ai._max_referral_over),ke(do
cument).on("mouseleave",".reached-max-referral-bonus",Ai._max_referral_out)},tog
gle:function(){return ke("#bonus-list").is(":visible")?(this.hide(),ke("#space-e
arned-link").text(Pt("View all space earned"))):(this.show(),ke("#space-earned-l
ink").text(Pt("Hide space earned")))},show:function(){return ke("#bonus-list").s
lideDown(150)},hide:function(){return ke("#bonus-list").slideUp(150)}};var Di,Oi
,Ni;Di=INLINE_JS.DowngradeReasons=ut.DowngradeReasons={reasons:{},addReason:func
tion(e){return this.reasons[e]=!0},addReasons:function(e){var t,n,i,r;for(r=[],t
=0,i=e.length;i>t;t++)n=e[t],r.push(this.addReason(n));return r},change:function
(e,t,n){var i,r,o,s,a,_;e=parseInt(e,10),r=$(t),ft(r,"Couldn t find container fo
r DowngradeReason"),i=!1,a=this.reasons;for(s in a)o=a[s],_=$(n+s),ft(_,"Couldn
t find container for ",n+s),o&&parseInt(s,10)===e?(_.show(),i=!0):_.hide();retur
n i?r.show():r.hide()}},Oi=ut.DowngradeReasons2={init:function(){var e,t,n,i;for
(i=["input[name=downgrade_reason_id]","input[name=other_reason_id]"],e=0,t=i.len
gth;t>e;e++)n=i[e],ke(n).change(function(e){var t;return t=e.target.id.indexOf("
other")>=0,Oi.change(t,e.target.getValue())});return ke(".shared-additional-info
").attr("name","shared_additional_info")},change:function(e,t){var n;return ke("
.downgrade-other-reason .error-message").hide(),e?void 0:(n="#downgrade-info-"+t
,ke(".downgrade-info").hide(),ke(n).show(),ke(".downgrade-info textarea").remove
Attr("name"),ke(n+" textarea").attr("name","additional_info"),ke("input[name=oth
er_reason_id]").removeAttr("checked"))}},Ni=ut.DowngradeSurvey={init:function(){
var e;return e="#downgrade-survey-form",ke(""+e).on("submit",function(){return f
unction(t){var n,i;return i=ke(e+" input[name=other_reason_id]:checked").length,
n=ke(e+" input[id=downgrade-radio-8]"),n.is(":checked")&&0===i?(ke(".downgrade-o
ther-reason .error-message").show(),t.preventDefault()):void 0}}(this))}};var $i
;$i=INLINE_JS.GetSpace=ut.GetSpace={_current_space:null,_why_msg:null,_twitter_u
rl:null,offer_highlight_color:"#ffa",init:function(e,t,n){var i;return $i._curre
nt_space=e,$i._why_msg=t,$i._twitter_url=n,$("space-actions").on("click",".space
-action",$i.perform_action),i=o.parse(window.location.href).fragment,i?$i.highli
ght_offer(i):void 0},highlight_offer:function(e){var t,n;return t=ke("#"+e),n=t.
css("background-color"),t.css("background-color",$i.offer_highlight_color).delay
(2e3).animate({"background-color":n}).queue(function(){return t.css("backgroundcolor","")})},perform_action:function(e){var t,n;return n={contact_sales:$i._con
tact_sales,contact_support:$i._contact_support,teams:$i._teams,upgrade:$i._upgra
de,plans:$i._plans,refer:$i._refer,get_started:$i._get_started,fb_link:$i._fb_li
nk,twitter_link:$i._twitter_link,twitter_follow:$i._twitter_follow,why_like:$i._
why_like,mailbox_link:$i._mailbox_link},t=$(e.target),t.hasClassName("space-acti
on")||(t=t.up(".space-action")),n[t.id]()},_teams:function(){return window.locat
ion.href="/business?tk=dropbox&ag=getspace&ad=v1"},_contact_sales:function(){ret
urn window.location.href="mailto:sales@dropbox.com"},_contact_support:function()
{return window.location.href="/support"},_plans:function(){return window.locatio
n.href="/plans"},_upgrade:function(){
return window.location.href="/upgrade"},_refer:function(){return window.location
.href="/referrals"},_get_started:function(){return window.location.href="/gs"},_
fb_link:function(){return B.do_auth(function(){return $i._refresh_link_bonuses()
,$i._completed($("fb_link"))},K.get_viewer().personal_user.id)},_twitter_link:fu
nction(){return Vr.do_auth(function(){return $i._refresh_link_bonuses(),Vr.set_i
s_authed(K.get_viewer().personal_user.id,!0),$i._completed($("twitter_link"))},K
.get_viewer().personal_user.id)},_twitter_follow:function(){return Vr.is_authed(
K.get_viewer().personal_user.id)?$i.follow_dropbox():Vr.do_auth($i.follow_dropbo
x,K.get_viewer().personal_user.id)},_why_like:function(){return pi.show(Pt("Tell
us why you love Dropbox"),$("why-i-like-modal")),$("why-i-like-input").focus(),
Kt._track_twitter_chars_left("why-i-like-input",90)},_mailbox_link:function(){re
turn window.location.href="http://www.mailboxapp.com/"},follow_dropbox:function(
){return Vr.is_authed(K.get_viewer().personal_user.id)||($i._refresh_link_bonuse
s(),Vr.set_is_authed(K.get_viewer().personal_user.id,!0)),Vr.follow_dropbox({sho
wWorking:function(){return $("twitter_follow").down(".title").__date(Pt("Followi
ng Dropbox on Twitter..."))},onFailure:function(){return $("twitter_follow").dow
n(".title").__date(Pt("Follow Dropbox on Twitter"))},onSuccess:function(){return
$("twitter_link")&&$("twitter_link").visible()&&$i._completed($("twitter_link")
),$i._completed($("twitter_follow"))}},K.get_viewer().personal_user.id)},submit_
why:function(){return $i._why_msg=$F("why-i-like-input"),li.ajax_submit($("why-i
-like-form"),!1,function(){return pi.hide(),$i._completed($("why_like"))},!1,$("
why-i-like-submit"))},_completed:function(e){var t;return e.addClassName("comple
ted"),e.down(".icon-col").__date(Element("img",{src:"/static/images/check_36-vfl
imxFPn.png"})),ke(e).css("opacity",.5).fadeTo(500,1),setTimeout(function(){retur
n ke(e).css("opacity",1).slideUp().animate({opacity:0},{queue:!1,duration:"norma
l"})},1500),t=parseInt(e.down(".space").readAttribute("data-space"),10),$i._curr
ent_space+=t,$("current-space").__date(q.format_bytes($i._current_space)),$("cur
rent-space").addClassName("updated"),setTimeout(function(){return $("current-spa
ce").removeClassName("updated")},5e3)},_refresh_link_bonuses:function(){return n
ew Ajax.DBRequest("/social_recheck")}};var Ii;Ii=ut.Help={toggle_more_help:!1,sh
ow_os:function(e,t,n){return t=$(t),$$(".os-filter").invoke("removeClassName","s
elected"),t.addClassName("selected"),$$(".help-os-section").invoke("hide"),$$(".
help-os-"+n).invoke("show"),Event.stop(e)},vote:function(e,t){return new Ajax.DB
Request("/help/"+e+"/vote/"+t),ke("#help-vote-cont").fadeOut(),b.success(Pt("Tha
nks for your feedback!"))}};var Li,Ri,Mi,Fi,kn=function(e,t){return function(){r
eturn e.apply(t,arguments)}},bn=function(e,t){function n(){this.constructor=e}fo
r(var i in t)yn.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototyp
e=new n,e.__super__=t.prototype,e},yn={}.hasOwnProperty;Ri=INLINE_JS.Hosts=ut.Ho
sts={attach_host_listener:function(e,t){var n,i,r,o;return n=ke("#"+e),r=n.data(
"host-ids"),i=n.data("display-name"),o=function(){return new Mi(r,i,t,null,null)
.show()},ke(".unlink-host-link",n).on("click",o),n.on("dblclick",function(){retu
rn Ri.edit(r,e)})},edit:function(e,t){var n,i,r,o,s,a;return r=ke("#"+t+" .hostitem .sprite-text"),"true"===r.data("editing")?!1:(r.data("editing","true"),i=r.
text(),r.data("previous",i),e=v.values(e),o=ke( <input type="text" class="name-i
nput skinny-input" size="20" maxlength="256" style="word-wrap: break-word;" /> )
.val(i),a=ke( <input type="button" class="button"> ).val(Pt("Save")),a.on("click
",function(){return Ri.doneEditing(e,t)}),n=ke( <input type="button" class="butt
on grayed"> ).val(Pt("Cancel")),n.on("click",function(){return Ri.cancelEditing(
t)}),r.empty(),r.append(o," ",a," ",n),s=ke("input",r),s.on("keydown",
function(){return Ri.checkKey(e,t)}),s.focus(),!1)},doneEditing:function(e,t){va
r n,i;return n=ke("#"+t+" .host-item .sprite-text"),i=ke("input",n).val(),ke.aja
x({url:"/account/change_host_name",data:{host_ids:JSON.stringify(e),name:i},type
:"POST"}).success(function(e){return Ri.unedit(n,JSON.parse(e).display_name)})},
cancelEditing:function(e){var t;return t=ke("#"+e+" .host-item .sprite-text"),Ri
.unedit(t,t.data("previous"))},unedit:function(e,t){return e.data("editing","fal
se"),e.text(t)},dismiss:function(e,t,n,i,r){return new ke.ajax("/account/dismiss
_unlink",{type:"POST",data:{host_id:e,user_id:t,team_id:n},subject_user:r,succes
s:function(){return i.remove()}}),!1},checkKey:function(e,t){return function(n){
return n=n||window.event,n.keyCode===Event.KEY_RETURN&&Ri.doneEditing(e,t),n.key
Code===Event.KEY_ESC?Ri.cancelEditing(t):void 0}},show_device_unlink_modal:funct
ion(e,t,n,i,r,o){var s,a;return s=ke("#unlink-device-modal-"+r),a={both:v.values
(i),personal:[i[D.ROLE_PERSONAL]],work:[i[D.ROLE_WORK]]},pi.show(n,s[0]),v.value
s(i).length>1&&s.addClass("show-selector"),ke("form input[type=submit]",s).on("c
lick",function(n){return n.preventDefault(),i=a[ke(".unlink-select select",s).va
l()],li.add_vars(ke("form",s)[0],{user_ids:JSON.stringify(i),app_id:t,device_id:
JSON.stringify(e),device_name:o}),ke("form",s).submit()})}},Li=ut.DeleteFailures
Modal=function(e){function t(){return this.on_show=kn(this.on_show,this),this.on
_confirm_button_click=kn(this.on_confirm_button_click,this),t.__super__.construc
tor.apply(this,arguments)}return bn(t,e),t.prototype.on_confirm_button_click=fun
ction(e){return e.preventDefault(),window.location.href="/delete_failures?host_i
d="+this.host_id,this.hide()},t.prototype.on_show=function(){var e;return e=Ft("
Dropbox couldn t delete %(num_failures)d file from the computer <strong>%(host_n
ame)s</strong>. You can download the name of this file and the reason why it cou
ldn t be deleted.","Dropbox couldn t delete %(num_failures)d files from the comp
uter <strong>%(host_name)s</strong>. You can download the names of these files a
nd the reasons why they couldn t be deleted.",this.num_failures).format({host_na
me:this.name.escapeHTML(),num_failures:this.num_failures}),this.$modal_window.fi
nd(".failures_message").html(e)},t}(xt),Fi=INLINE_JS.show_delete_failures_modal=
ut.show_delete_failures_modal=function(e,t,n){var i;return i=new Li({element_id:
"delete-failures-modal"}),i.host_id=e,i.name=t,i.num_failures=n,i.show(),!1},Mi=
INLINE_JS.UnlinkHostModal=ut.UnlinkHostModal=function(e){function t(e,n,i,r,o){t
his.host_ids=e,this.name=n,this.delete_support_type=i,this.owner_id=r,this.team_
id=o,this.on_show=kn(this.on_show,this),this._set_delete_text=kn(this._set_delet
e_text,this),this.fail_callback=kn(this.fail_callback,this),this.success_callbac
k=kn(this.success_callback,this),this.on_confirm_button_click=kn(this.on_confirm
_button_click,this),t.__super__.constructor.call(this,{element_id:"unlink-host-m
odal"}),this.show_host_selector=v(this.host_ids).values().length>1}return bn(t,e
),t.prototype.on_confirm_button_click=function(e){var t,n,i;return e.preventDefa
ult(),n=this.$modal_window.find(".unlink_host_form")[0],t=$(this.$modal_window.f
ind(".confirm-button")[0]),this.$modal_window.find("[type=button]").attr("disabl
ed",""),i={host_ids:JSON.stringify(this.get_selected_hosts())},li.ajax_submit(n,
!1,this.success_callback,this.fail_callback,t,i)},t.prototype.success_callback=f
unction(){return window.location.reload()},t.prototype.fail_callback=function(){
return this.$modal_window.find("[type=button]").removeAttr("disabled")},t.protot
ype._set_delete_text=function(e){return this.$modal_window.find(".delete_data_la
bel").text(e)},t.prototype._get_unlink_select=function(){return this.$modal_wind
ow.find(".unlink-select select").val()},t.prototype._clear_delete_checkbox=funct
ion(){return this.$modal_window.find(".delete_data").prop("checked",!1)},t.proto
type.on_show=function(){var e;return this._clear_delete_checkbox(),this.delete_s
upport_type===c.DELETE_ON_UNLINK_OLD_CLIENT?this.$modal_window.find(".unlink_hos
t_modal_content").addClass("show_old_client_modal"):this.delete_support_type===c
.DELETE_ON_UNLINK_UNSUPPORTED?this.$modal_window.find(".unlink_host_modal_conten
t .unlink_host_form").addClass("hidden"):this.delete_support_type===c.DELETE_ON_
UNLINK_SUPPORTED_TEAM_ONLY?(this.$modal_window.find(".unlink-choice").change(fun
ction(e){return function(){return e._get_unlink_select()===D.ROLE_PERSONAL?e.$mo
dal_window.find(".new_client").hide():e.$modal_window.find(".new_client").show()
}}(this)),this._set_delete_text(Pt("Delete files from %(team_name)s Dropbox the
next time this computer comes online.").format({team_name:K.get_viewer().team_na
me}))):this.delete_support_type===c.DELETE_ON_UNLINK_SUPPORTED_PERSONAL_ONLY?(th
is.$modal_window.find(".unlink-choice").change(function(e){return function(){ret
urn e._get_unlink_select()===D.ROLE_WORK?e.$modal_window.find(".new_client").hid
e():e.$modal_window.find(".new_client").show()}}(this)),this._set_delete_text(Pt
("Delete files from my personal Dropbox the next time this computer comes online
."))):this.delete_support_type===c.DELETE_ON_UNLINK_SUPPORTED&&(this._set_delete
_text(Pt("Delete files from these Dropboxes the next time this computer comes on
line.")),this.$modal_window.find(".unlink-choice").change(function(e){return fun
ction(){return e._set_delete_text(e._get_unlink_select()===D.ROLE_PERSONAL?Pt("D
elete files from my personal Dropbox the next time this computer comes online.")
:e._get_unlink_select()===D.ROLE_WORK?Pt("Delete files from %(team_name)s Dropbo
x the next time this computer comes online.").format({team_name:K.get_viewer().t
eam_name}):Pt("Delete files from these Dropboxes the next time this computer com
es online."))}}(this))),this.show_host_selector&&(e="<span class= host_name ></s
pan>",this.$modal_window.find(".unlink-select").removeClass("hidden"),this.$moda
l_window.find(".unlink-modal-text").html(Pt("Which Dropboxes do you want to unli
nk from %(host_name)s? Any Dropbox you unlink will immediately stop syncing.").f
ormat({host_name:e}))),this.$modal_window.find("[name=host_id]").attr("value",th
is.host_id),this.$modal_window.find("[name=team_id]").attr("value",this.team_id)
,this.$modal_window.find("[name=user_id]").attr("value",this.owner_id),this.$mod
al_window.find(".host_name").text(this.name)},t.prototype.get_selected_hosts=fun
ction(){var e;return 1===v.values(this.host_ids).length?v.values(this.host_ids):
(e=ke(".unlink-choice").val(),"both"===e?v.values(this.host_ids):[this.host_ids[
e]])},t}(xt);var Pi;Pi=ut.News={DEFAULT_TAB:"recent-news",init:function(){return
$("news-home").on("click","#nav a",function(e,t){var n;return t.hasAttribute("d
ata-div")?(e.preventDefault(),n=t.readAttribute("data-div"),p.push_state("/news/
"+n)):void 0}),p.add_callback("/news",Pi.history_change)},change_tab:function(e)
{var t;return t=$$("#nav a[data-div="+e+"]").first(),$(t)?($$(".section").invoke
("removeClassName","selected"),$$("#nav a").invoke("removeClassName","selected")
,$(t).addClassName("selected"),$(e).addClassName("selected")):void 0},history_ch
ange:function(e){return e=e||Pi.DEFAULT_TAB,Pi.change_tab(e)}};var qi;qi=ut.Reco
ver={init:function(){var e;return e=$("recover-form"),e.observe("submit",this.fo
rm_submit.bind(this))},form_submit:function(e){return this.clear_error(),e.preve
ntDefault(),li.ajax_submit($("recover-form"),null,this.submit_response.bind(this
))},submit_response:function(e){var t;return t=JSON.parse(e.responseText),"error
"===t.status&&this.show_error(t.msg),"ok"===t.status&&this.show_hosts(t),"redire
ct"===t.status?window.location.href=t.url:void 0},show_hosts:function(e){var t,n
,i,r,o,s,a;for(li.add_vars($("recover-form"),{check_file:"true"}),$("filename-to
-create").update(e.filename),n=$("trusted-hosts"),n.update(),a=e.hosts,i=0,o=a.l
ength;o>i;i++)t=a[i],s=new Element("li"),r="lnx","mac"===t.platform&&(r="osx"),"
win"===t.platform&&(r="win"),s.__sert(Q.make("web",r)),s.__sert(new ot(t.display
_name.escapeHTML())),n.appendChild(s);return $("login-step").hide(),$("hosts-ste
p").show()},show_error:function(e){return $("error-messages").update(e),$("error
-messages").show()},clear_error:function(){return $("error-messages").update()}}
;var Ui;Ui=ut.Restore={next:function(){var e,t;return t=ke("ul.selected"),e=t.ne
xt("ul"),e.addClass("selected"),t.removeClass("selected"),e.next("ul").length?ke
("#next-page").show():ke("#next-page").hide(),ke("#prev-page").show(),Ui.inc_pag
e(1)},prev:function(){var e,t;return t=ke("ul.selected"),e=t.prev("ul"),e.addCla
ss("selected"),t.removeClass("selected"),e.prev("ul").length?ke("#prev-page").sh
ow():ke("#prev-page").hide(),ke("#next-page").show(),Ui.inc_page(-1)},inc_page:f
unction(e){var t,n;return t=parseInt(ke("#page_num").text(),10),n=t+e,ke("#page_
num").text(n)},init:function(e,t,n){var i;return i=K.get_viewer().get_user_by_id
(n),ke("#next-page").on("click",function(e){return Ui.next(e),!1}),ke("#prev-pag
e").on("click",function(e){return Ui.prev(e),!1}),ke("#restore-submit-button").o
n("click",function(){return _i.do_folder_restore(e,i),!1}),ke("#restore-cancel-b
utton").on("click",function(){return nt.redirect(t)}),ke("#restore-back-button")
.on("click",function(){return nt.redirect(t)})}};var ji,Bi,zi,Hi,Vi,kn=function(
e,t){return function(){return e.apply(t,arguments)}},bn=function(e,t){function n
(){this.constructor=e}for(var i in t)yn.call(t,i)&&(e[i]=t[i]);return n.prototyp
e=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},yn={}.hasOwnProperty;
ji=ut.SelectRoleModal=function(e){function t(){return this.on_show=kn(this.on_sh
ow,this),t.__super__.constructor.apply(this,arguments)}return bn(t,e),t.prototyp
e.on_select_role=null,t.prototype.on_show=function(){return ke(".role-options li
").click(function(e){return function(t){var n,i;return n=ke(t.target).closest("l
i"),i=n.data("role"),ft(e.on_select_role,"missing on_select_role implementation"
),e.on_select_role(i),e.hide()}}(this))},t}(xt),zi=ut.SharedFolderSelectRoleModa
l=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}
return bn(t,e),t.prototype.on_select_role=function(e){var t;return t=function(){
return Un.role_picker.ensure_role_is_visible(e),tn.start_wizard_for_user(K.get_v
iewer().get_user_by_role(e))},e===ie.logged_out_role?ie.show_modal({role:e,on_su
ccess:t}):t()},t}(ji),Hi=ut.ShmodelC2DSelectRoleModal=function(e){function t(){r
eturn t.__super__.constructor.apply(this,arguments)}return bn(t,e),t.prototype.o
n_select_role=function(e){var t;return t=function(){return Wn.show_c2d_modal(e)}
,K.get_viewer().is_role_signed_in(e)?t():ie.show_modal({role:e,on_success:t})},t
}(ji),Vi=ut.ShmodelSyncSelectRoleModal=function(e){function t(){return t.__super
__.constructor.apply(this,arguments)}return bn(t,e),t.prototype.on_select_role=f
unction(e){var t;return t=function(){return Wn.request_shared_folder_sync(e)},K.
get_viewer().is_role_signed_in(e)?t():ie.show_modal({role:e,on_success:t})},t}(j
i),Bi=ut.ShareShmodelSelectRoleModal=function(e){function t(){return this.on_sel
ect_role=kn(this.on_select_role,this),t.__super__.constructor.apply(this,argumen
ts)}return bn(t,e),t.prototype.on_select_role=function(e){return Wn.prompt_login
_then_share(this.options.link_url,this.options.short_url,this.options.tokenizer_
type,e)},t}(ji);var Yi;Yi=ut.TabController=Class.create({initialize:function(e,t
){var n;return n=$(e),ft(n,e+" is missing."),this.container=n,this.options={kill
Event:!0},Object.extend(this.options,t),this.listen()},listen:function(){var e,t
,n,i,r,o;for(o=this,i=this.container.select("a"),r=[],t=0,n=i.length;n>t;t++)e=i
[t],ft(e.id&&e.id.length>0,"Element is missing an id"),r.push(e.observe("click",
function(e){return this.click(e)}.bindAsEventListener(o)));return r},click:funct
ion(e){return this.options.killEvent&&Event.stop(e),this.toggle($(e.target))},to
ggle:function(e){var t,n,i,r,o;return o=this.container.down("a.selected"),o&&(r=
$(o.id+"-content"),r&&r.hide()),this.container.select(".selected").invoke("remov
eClassName","selected"),n=!1,e||(e=this.container.down("a"),n=!0),e.addClassName
("selected"),t=$(e.id+"-content"),t&&t.show(),this.options.onTabChange&&this.opt
ions.onTabChange(e,o),this.options.url_prefix?(i=this.options.url_prefix,n||(i+=
"/"+e.id),p.push_state(i)):void 0}});var Wi;Wi=ut.InviteForm={initialized:!1,ini
t:function(){return this.initialized?void 0:ke(function(e){return function(){ret
urn e.add_auto_completer=new Autocompleter.ContactsTokenizer(K.get_viewer().get_
user_by_role(D.ROLE_WORK),"team-invite-new-collab-input","team-invite-new-whobul
k","team-invite-hidden-input",{tokens:[",",";"],hide_import_contacts:!0,suggesti
ons_disabled:!0,contact_filter:function(e){return e.excludeTeamMembers().exclude
Facebook().excludeNewStyleGroups().excludeMe()}}),e.add_auto_completer.clearToke
ns(),e.tokenAdd=ke.proxy(e._tokenAdd,e),e.tokenRemove=ke.proxy(e._tokenRemove,e)
,ke("#team-invite-new-collab-input")[0].on("token:add",e.tokenAdd),ke("#team-inv
ite-new-collab-input")[0].on("token:remove",e.tokenRemove),e.reset_licenses(),e.
update_free_licenses_message(),e.initialized=!0,e.setup_tab_support(ke),mi.init(
},yn={}.hasOwnProperty;Ki=ut.InviteModal=function(e){function t(e,n){this.transi
tion_view_model=e,this.is_trial=n,this._reset=kn(this._reset,this),this._update_
form_pricing_information=kn(this._update_form_pricing_information,this),this._up
date_remaining_licenses_message=kn(this._update_remaining_licenses_message,this)
,this._make_transition_info_request=kn(this._make_transition_info_request,this),
this._handle_token_change=kn(this._handle_token_change,this),this._licenses_tota
l=kn(this._licenses_total,this),this.is_making_transition_info_request=kn(this.i
s_making_transition_info_request,this),this.on_hide=kn(this.on_hide,this),this.o
n_show=kn(this.on_show,this),t.__super__.constructor.call(this,{element_id:"team
-invite-wizard",focus:".new-collab-input",title:Pt("Invite team members")}),this
.inline_add_license=null!=this.transition_view_model,this.inline_add_license&&(t
his.transition_info_fetcher=new Bt([this.transition_view_model]),this.probabilit
y=Math.random()),this.skip_reset=!1,this.making_transition_info_request=!1,this.
transition_info_callback=null}return bn(t,e),t.prototype.on_confirm_button_click
=function(e){var t;return t=Wi.invite_as_limited()?0:this.add_qty,ir.add_users(e
,t)},t.prototype.on_show=function(){var e,t;return this._reset(),t=ke( input[nam
e="membership_type"] ),null!=t&&t.attr("checked",!1),null!=t&&t.click(function(e
){return function(){return Wi.update_free_licenses_message(),e._updated_charges_
messages(Wi.invite_as_limited())}}(this)),e=ke("#team-invite-wizard .team-invite
-add-licenses"),e.on("click",ke.proxy(Wi.on_add_licenses_click,Wi)),ke(window).o
n("token:changed",this._handle_token_change),Wi.initialized&&(li.clear_errors(),
Wi.update_license_count(),Wi.update_free_licenses_message()),St.register(St.CLEA
R,function(){return Wi.reset_modal()})},t.prototype.on_hide=function(){return ke
(window).off("token:changed",this._handle_token_change)},t.prototype.is_making_t
ransition_info_request=function(){return this.making_transition_info_request},t.
prototype._licenses_to_add=function(){return-1*Wi.available_licenses},t.prototyp
e._licenses_total=function(){return Wi.total_licenses+this._licenses_to_add()},t
.prototype._getInvitesCount=function(){return Wi.total_licenses-Wi.used_licenses
-Wi.available_licenses},t.prototype._handle_token_change=function(e,t){return th
is.remaining_licenses=t.remaining_licenses,this._updateConfirmButton(),this._upd
ate_remaining_licenses_message(),this.inline_add_license?(clearTimeout(this.fetc
h_transition_timeout_id),this.fetch_transition_timeout_id=setTimeout(function(e)
{return function(){return e._make_transition_info_request(),e.fetch_transition_t
imeout_id=null}}(this),100)):void 0},t.prototype._make_transition_info_request=f
unction(){var e,t,n,i;return this.making_transition_info_request=!0,t=Math.floor
(1e6*Math.random()),this.current_callback_token=t,e=this._licenses_to_add(),n=th
is._licenses_total(),i=function(i){return function(r){return i._update_form_pric
ing_information(t,e,n,null!=r?r[0]:void 0)}}(this),e>0?this.transition_info_fetc
her.get(i,{total_users:this._licenses_total()}):i(null)},t.prototype._update_rem
aining_licenses_message=function(){var e;return e=this._get_remaining_licenses_m
essage(this.remaining_licenses),this.$modal_window.find("#license-count-message"
).text(e)},t.prototype._get_remaining_licenses_message=function(e){var t;return
t=0>e?Pt("You need more licenses for this invitation."):0===e?Pt("After this inv
itation, you ll have no remaining licenses."):Ft("After this invitation, you ll
have %(count)d remaining license.","After this invitation, you ll have %(count)d
remaining licenses.",e).format({count:e})},t.prototype._update_form_pricing_inf
ormation=function(e,t,n,i){var r,o,s,a,_;if(e===this.current_callback_token)retu
rn i&&t>0?(this.add_qty=t,r=this.transition_view_model.state.currency,a=i.curren
t_total.amount,s=Ut.formatCurrency(a,r),_=Ut.formatCurrency(i.recurring_total.am
ount,r),o=this.is_trial?0:a,ke(".new-amount").text(s),ke(".add-qty").text(t),ke(
".recurring-amount").text(_),ke(".total-qty").text(n),ke("#expected_price").val(
o),this._updated_charges_messages(Wi.invite_as_limited())):this._reset(),this.ma
king_transition_info_request=!1},t.prototype._updateConfirmButton=function(e){va
r t,n;return null==e&&(e=!1),t=ke(".team-invite-buttons .confirm-button"),n=e?Pt
(this.is_trial?"Invite and add":"Invite and buy"):Ft("Send invite","Send invites
",this._getInvitesCount()),t.val(n)},t.prototype._reset=function(){return this.a
dd_qty=0,ke(".charges-section").hide(),ke("#expected_price").val(0),this._update
ConfirmButton()},t.prototype._updated_charges_messages=function(e){var t;return
t=this.inline_add_license&&this.add_qty>0&&!e,ke(".charges-section").toggle(t),t
his._updateConfirmButton(t)},t}(xt);var Ji,Gi,Qi,Xi,Zi,er,tr,nr,ir,rr,or,sr,ar,k
(this,arguments)}return bn(t,e),t.prototype.on_confirm_button_click=function(e){
var t,n,i,r,o,s,a,_,l,u,d,c;return e.preventDefault(),d=$("demo-signup-form"),_=
$("1210"),s=ke(d).find("input[name= first_name ]").val(),ke(_).find("input[name=
FirstName ]").attr("value",s),a=ke(d).find("input[name= last_name ]").val(),ke(
_).find("input[name= LastName ]").attr("value",a),o=ke(d).find("input[name= emai
l ]").val(),ke(_).find("input[name= Email ]").attr("value",o),u=ke(d).find("inpu
t[name= phone_number ]").val(),ke(_).find("input[name= Phone ]").attr("value",u)
,t=ke(d).find("input[name= company_name ]").val(),ke(_).find("input[name= Compan
y ]").attr("value",t),i=ke(d).find("select[name= company_size ]"),n=i.find("opti
on:selected").val(),ke(_).find("input[name= Company_size__c ]").attr("value",n),
r=$(this.$modal_window.find(".confirm-button")[0]),c=function(e){return function
(){return e.$modal_window.hide(),_.submit()}}(this),l=li.collect_form_vars(d,!0)
,li.ajax_submit(d,!1,c,!1,r,l,!0)},t.prototype.on_show=function(){return this.$m
odal_window.find(".db-modal-content").css({"overflow-y":""}),mi.init()},t}(xt),J
i=ut.AccountTransferBaseModal=function(e){function t(e,n,i){this.file_action_sel
ector=n,this.transfer_choice_selector=i,this._clearInput=kn(this._clearInput,thi
s),this._markInputInvalid=kn(this._markInputInvalid,this),this._markInputValid=k
n(this._markInputValid,this),this._tokenRemove=kn(this._tokenRemove,this),this._
tokenAdd=kn(this._tokenAdd,this),this._selectChange=kn(this._selectChange,this),
this._isTransferSelected=kn(this._isTransferSelected,this),this.checkAndApproveM
emberRemoval=kn(this.checkAndApproveMemberRemoval,this),this.on_cancel_button_cl
ick=kn(this.on_cancel_button_click,this),this.execute_form=kn(this.execute_form,
this),this.get_cancel_button=kn(this.get_cancel_button,this),this.get_confirm_bu
tton=kn(this.get_confirm_button,this),this.get_button_class=kn(this.get_button_c
lass,this),this.set_modal_class=kn(this.set_modal_class,this),this.handleAjaxFai
lure=kn(this.handleAjaxFailure,this),this.on_show=kn(this.on_show,this),t.__supe
r__.constructor.call(this,e,this.file_action_selector,this.transfer_choice_selec
tor)}return bn(t,e),t.prototype.on_show=function(){return 0!==this.$modal_window
.find("#manage-files-new-collab-input").length?(this.auto_completer=new Autocomp
leter.TeamTokenizer(K.get_viewer().get_user_by_role(D.ROLE_WORK),"manage-files-n
ew-collab-input","manage-files-new-whobulk","manage-files-hidden-input",{hide_im
port_contacts:!0,suggestions_disabled:!0,wrap_name:!0,single_token:!0,contact_fi
lter:function(e){return function(t){return t.excludeNonTeam().excludeNewStyleGro
ups().excludeByEmail(e.email)}}(this)}),this.tokenAdd=ke.proxy(this._tokenAdd,th
is),this.tokenRemove=ke.proxy(this._tokenRemove,this),this.$collab_input=this.$m
odal_window.find("#manage-files-new-collab-input")[0],this.$collab_input.on("tok
en:add",this.tokenAdd),this.$collab_input.on("token:remove",this.tokenRemove),th
is.$textinput=this.$modal_window.find(".tokenized_autocompleter_container .texti
nput"),this.selectChange=ke.proxy(this._selectChange,this),this.$modal_window.fi
nd(this.file_action_selector).on("change",this.selectChange)):void 0},t.prototyp
e.handleAjaxFailure=function(e){return 200===e.status&&this._isTransferSelected(
)?this._markInputInvalid():void 0},t.prototype.set_modal_class=function(e){var t
,n,i,r,o,s;return i="suspending deleting approve_transfer_to_suspended",r=this.g
et_form(),r.removeClass(i),null!=e&&r.addClass(e),null!=(o=ke(".suspend_option_c
ontent"))&&o.removeClass("title_bubble no_suspend"),n=null!=this.limited&&this.l
imited,t=null!=this.invited&&this.invited,n||t?(ke(".suspend_option_content").ad
dClass("title_bubble no_suspend"),s="",s=Pt(t?"Invited members can not be suspen
ded":"Limited members can not be suspended"),ke(".suspend_option_content").attr(
"data-title",s)):void 0},t.prototype.get_button_class=function(){var e;return e=
this.get_form(),e.hasClass("suspending")?".confirm_deactivate_button":e.hasClass
("deleting")?".confirm_delete_button":e.hasClass("approve_transfer_to_suspended"
)?".confirm_transfer_to_suspended_button":void 0},t.prototype.get_confirm_button
=function(){var e;return e=this.get_button_class(),$(null!=e?this.$modal_window.
find(e+" .confirm-button"):this.$modal_window.find(".confirm-button"))},t.protot
ype.get_cancel_button=function(){var e;return e=this.get_button_class(),$(null!=
e?this.$modal_window.find(e+" .cancel-button"):this.$modal_window.find(".cancelbutton"))},t.prototype.execute_form=function(){var e,t;return t=this.get_form()[
0],e=this.get_confirm_button(),li.ajax_submit(t,!1,this.success_callback,this.ha
ndleAjaxFailure,e)},t.prototype.on_cancel_button_click=function(e){var n;return
e.preventDefault(),n=this.get_form(),n.hasClass("approve_transfer_to_suspended")
?(this.reset_button_click(this.$confirm_button,this.on_confirm_button_click),thi
s.reset_button_click(this.$cancel_button,this.on_cancel_button_click)):t.__super
__.on_cancel_button_click.apply(this,arguments)},t.prototype.reset_button_click=
function(e,t){return e.off("click"),null!=t?e.on("click",t):void 0},t.prototype.
checkAndApproveMemberRemoval=function(e){var t,n;return!ke("#deactivate_option")
.is(":checked")&&ke("#transfer_files_on").is(":checked")&&!this.invited&&(t=ke("
.tokenized_autocompleter_container .token-display-text"),n=ke(".tokenized_autoco
mpleter_container .token-suspended"),t.length&&n.length)?(this.set_modal_class("
approve_transfer_to_suspended"),this.$modal_window.find(".target_user_name").tex
t(t.text()),this.$confirm_button=this.get_confirm_button(),this.reset_button_cli
ck(this.$confirm_button,function(e){return function(){return e.execute_form()}}(
this)),this.$cancel_button=this.get_cancel_button(),void this.$cancel_button.on(
"click",e)):this.execute_form()},t.prototype._isTransferSelected=function(){retu
rn ke(this.transfer_choice_selector).prop("checked")},t.prototype._selectChange=
function(){return this._isTransferSelected()?this.$textinput.removeClass("unsele
cted"):this.$textinput.addClass("unselected")},t.prototype._tokenAdd=function(e)
{return this.$collab_input.hide(),e.memo.valid?this._markInputValid():this._mark
InputInvalid()},t.prototype._tokenRemove=function(){return this.$collab_input.sh
ow(),this._clearInput()},t.prototype._markInputValid=function(){return this._cle
arInput(),this.$textinput.addClass("valid")},t.prototype._markInputInvalid=funct
ion(){return this._clearInput(),this.$textinput.addClass("invalid")},t.prototype
._clearInput=function(){return this.$textinput.removeClass("valid"),this.$textin
put.removeClass("invalid")},t}(xt),rr=ut.TwoFactorMessageModal=function(e){funct
ion t(){t.__super__.constructor.call(this,{element_id:"team-security-message-mod
al",focus:"#team-security-message"})}return bn(t,e),t.prototype.on_confirm_butto
n_click=function(e){return ir.send_team_security_message(e),this.hide()},t}(xt),
tr=ut.DfeUnsuspendUserModal=function(e){function t(e){this.on_confirm_button_cli
ck=kn(this.on_confirm_button_click,this),this.success_callback=kn(this.success_c
allback,this),t.__super__.constructor.call(this,e)}return bn(t,e),t.prototype.be
fore_show=function(){var e;return t.__super__.before_show.call(this),e=Pt("Unsus
pend %(user_name)s").format({user_name:this.user_name}),this.$modal_window.find(
".db-modal-title-text").text(e),this.$modal_window.find("[name=user_id]").attr("
value",this.user_id),this.$modal_window.find("[name=team_id]").attr("value",this
.team_id),this.$modal_window.find("[name=email]").attr("value",this.email),this.
$modal_window.find(".unsuspended_name").text(this.user_name),this.$modal_window.
find(".unsuspended_email").text(this.email)},t.prototype.success_callback=functi
on(){var e;return null!=(e=__CIRCULAR_DEPENDENCY__.MembersReact)&&e.refresh_memb
er_stats(),this.hide(),"function"==typeof this.refresh_cb?this.refresh_cb("unsus
pended"):void 0},t.prototype.on_confirm_button_click=function(e){var t,n;return
e.preventDefault(),n=this.$modal_window.find(".dfe-unsuspend-modal")[0],t=$(this
.$modal_window.find(".confirm-button")[0]),li.ajax_submit(n,!1,this.success_call
back,!1,t)},t}(xt),Zi=ut.DfeRemoveOrDeactivateUserModal=function(e){function t(e
){this.on_confirm_button_click=kn(this.on_confirm_button_click,this),this.succes
s_callback=kn(this.success_callback,this),this.on_show=kn(this.on_show,this),thi
s.handle_change_action=kn(this.handle_change_action,this),this.switch_to_removal
_mode=kn(this.switch_to_removal_mode,this),this.switch_to_deactivation_mode=kn(t
his.switch_to_deactivation_mode,this),this.show_removal_content=kn(this.show_rem
oval_content,this),this.show_deactivation_content=kn(this.show_deactivation_cont
ent,this),t.__super__.constructor.call(this,e,"input[name=transfer_files]","#tra
nsfer_files_on")}return bn(t,e),t.prototype.get_form=function(){return this.$mod
al_window.find(".dfe-remove-or-deactivate-user-modal")},t.prototype.set_form_act
ion_to_deactivate=function(){return ke(".dfe-remove-or-deactivate-user-modal").a
ttr("action","/account/team/suspend_user")},t.prototype.set_form_action_to_remov
e=function(){return ke(".dfe-remove-or-deactivate-user-modal").attr("action","/a
ccount/team/remove_user")},t.prototype.show_deactivation_content=function(){retu
rn this.set_modal_class("suspending")},t.prototype.show_removal_content=function
(){return this.set_modal_class("deleting")},t.prototype.switch_to_deactivation_m
ode=function(){return this.show_deactivation_content(),this.set_form_action_to_d
eactivate()},t.prototype.switch_to_removal_mode=function(){return this.show_remo
val_content(),this.set_form_action_to_remove(),this.invited?this.$modal_window.f
ind(".remote_wipe_setting").remove():void 0},t.prototype.handle_change_action=fu
nction(e){return e.preventDefault(),ke("#deactivate_option").is(":checked")?this
.switch_to_deactivation_mode():this.switch_to_removal_mode()},t.prototype.on_sho
w=function(){var e;return t.__super__.on_show.call(this),ke("input[name=deactiva
te_or_remove]").on("change",this.handle_change_action),this.$modal_window.find("
.deleted_user_name").text(this.user_name),e=Pt("Suspend or delete %(user_name)s"
).format({user_name:this.user_name}),this.limited||this.invited?(ke("#deactivate
_option").prop("disabled",!0),ke("#delete_option").attr("checked","checked"),thi
s.switch_to_removal_mode()):(ke("#deactivate_option").attr("checked","checked"),
this.switch_to_deactivation_mode()),this.$modal_window.find(".db-modal-title-tex
t").text(e),this.$modal_window.find("[name=user_id]").attr("value",this.user_id)
,this.$modal_window.find("[name=team_id]").attr("value",this.team_id),this.hide_
transfer_wipe?(this.$modal_window.find(".transfer_data_on_remove_setting").remov
e(),this.$modal_window.find(".remote_wipe_setting").remove()):void 0},t.prototyp
e.success_callback=function(){var e;return null!=__CIRCULAR_DEPENDENCY__.Members
React&&__CIRCULAR_DEPENDENCY__.MembersReact.refresh_member_stats(),e="",e=ke("#d
eactivate_option").is(":checked")?"suspended":"deleted",this.hide(),"function"==
typeof this.refresh_cb?this.refresh_cb(e):void 0},t.prototype.on_confirm_button_
click=function(e){return e.preventDefault(),this.checkAndApproveMemberRemoval(th
is.switch_to_removal_mode)},t}(Ji),er=ut.DfeRemoveUserModal=function(e){function
t(e){this.on_confirm_button_click=kn(this.on_confirm_button_click,this),this.sw
itch_to_removal_mode=kn(this.switch_to_removal_mode,this),this.success_callback=
kn(this.success_callback,this),this.on_show=kn(this.on_show,this),t.__super__.co
nstructor.call(this,e,"input[name=transfer_files]","#transfer_files_on")}return
bn(t,e),t.prototype.get_form=function(){return this.$modal_window.find(".dfe-rem
ove-user-modal")},t.prototype.on_show=function(){var e,n;return t.__super__.on_s
how.call(this),this.$modal_window.find(".remove_user_name").text(this.user_name)
,n=this.invited?Pt("Uninvite %(user_name)s").format({user_name:this.user_name}):
Pt("Delete %(user_name)s").format({user_name:this.user_name}),this.$modal_window
.find(".db-modal-title-text").text(n),this.num_api_apps?(e=Ft("%(num)s API app",
"%(num)s API apps",this.num_api_apps).format({num:this.num_api_apps}),this.$moda
l_window.find(".num_api_app").text(e)):this.$modal_window.find(".api_app_warning
").hide(),this.$modal_window.find("[name=user_id]").attr("value",this.user_id),t
his.$modal_window.find("[name=team_id]").attr("value",this.team_id),this.user_is
_managed?this.$modal_window.find(".remove-content-limited-member").remove():(thi
s.$modal_window.find(".remove_content").remove(),this.$modal_window.find(".remot
e_wipe_setting").remove()),this.invited&&(this.$modal_window.find(".transfer_fil
es_option").remove(),this.$modal_window.find(".remote_wipe_setting").remove(),th
is.get_form().addClass("invited")),this.hide_transfer_setting&&this.$modal_windo
w.find(".transfer_files_option").remove(),this.hide_remote_wipe_setting?this.$mo
dal_window.find(".remote_wipe_setting").remove():void 0},t.prototype.success_cal
lback=function(e){var t,n,i,r;return r=JSON.parse(e.responseText),null!=__CIRCUL
AR_DEPENDENCY__.MembersReact?__CIRCULAR_DEPENDENCY__.MembersReact.refresh_member
_stats():(null!=(n=window.active_team_member_table)&&n.remove_user(this.user_id)
,null!=(i=window.removed_team_member_table)&&i.add_users(r)),t="",t=this.invited
?"uninvited":"deleted",ir.decrement_used_licenses(),this.hide(),"function"==type
of this.refresh_cb?this.refresh_cb(t):void 0},t.prototype.switch_to_removal_mode
=function(){return this.set_modal_class()},t.prototype.on_confirm_button_click=f
unction(e){return e.preventDefault(),this.checkAndApproveMemberRemoval(this.swit
ch_to_removal_mode)},t}(Ji),nr=ut.ManageFilesModal=function(e){function t(e,n,i)
{this.source_user_id=e,this.source_user_name=n,this.options=i,this.on_confirm_bu
tton_click=kn(this.on_confirm_button_click,this),this.switch_to_manage_files=kn(
this.switch_to_manage_files,this),this.success_callback=kn(this.success_callback
,this),t.__super__.constructor.call(this,this.options,"input[name=file_action]",
"#transfer_files_on")}return bn(t,e),t.prototype.get_form=function(){return this
.$modal_window.find(".manage-files-modal")},t.prototype.on_show=function(){var e
;return t.__super__.on_show.call(this),this.$modal_window.find("[name= source_us
er_id ]").attr("value",this.source_user_id),this.$modal_window.find(".source-use
r-name").text(this.source_user_name),e=Pt("Manage %(team_member)s s files").form
at({team_member:this.source_user_name}),this.$modal_window.find(".db-modal-title
,s=_.length;s>o;o++)a=_[o],a!==e&&(t.removeClass(a),i.removeClass(a),r.removeCla
ss(a),n.removeClass(a));return t.addClass(e),i.addClass(e),r.addClass(e),n.addCl
ass(e),e===this.SEARCH_MODE?(t.addClass("fulltext_search"),i.addClass("fulltext_
search"),r.addClass("fulltext_search"),n.addClass("fulltext_search")):void 0},ge
t_mode:function(){var e,t,n,i,r;for(r=this.BROWSE_MODE,i=this.SPECIAL_MODES,e=0,
t=i.length;t>e;e++)n=i[e],ke("#browse").hasClass(n)&&(r=n);return r},load_visibl
e_thumbs:function(){var e,t,n,i,r,o,s,a,_,l,u,d,c,h,f,p;for(a=this.get_files_in_
view(),t=a[1]-a[0],s=[Math.max(a[0]-t,0),a[0]],o=[Math.min(a[1],Nr.files.length)
,Math.min(a[1]+t,Nr.files.length)],e=[],f=[a,o,s],l=0,d=f.length;d>l;l++)for(r=f
[l],i=r[0],_=r[1],p=Nr.files.slice(i,+_+1||9e9),u=0,c=p.length;c>u;u++)n=p[u],n.
get_div()&&e.push(n.get_div().down("img"));return h=function(e){return e.src.end
sWith(Q.SPACER)?void 0:(e.addClassName("thumbnail"),e.__sert({before:new Element
("div",{"class":"thumbnail-border"})}))},tt.batch_load_thumbs(e,this.THUMBS_BATC
H_SIZE,h)},get_files_in_view:function(){var e,t,n,i,r,o,s,a,_,l,u;return s=[0,Nr
.files.length-1],l=Fe.viewport_dimensions().height,u=Fe.scroll_offsets().top,(o=
this._get_elm_height())?(e=ke("#browse-files"),i=parseInt(e.css("padding-top"),1
0),!e.length||isNaN(i)?s:("absolute"===ke("#browse-header").css("position")?(t=e
.offset().top+i,n=t-u,n>0?(a=0,r=l-n,_=r/o):(a=Math.abs(n/o),_=Math.abs(l-n)/o))
:(a=u/o,r=l-i,_=(r+u)/o),a=Math.max(Math.floor(a),0),_=Math.min(Math.floor(_),Nr
.files.length-1),[a,_])):s},_get_elm_height:function(){var e,t;return Nr.files.l
ength>=3&&Nr.files[1].get_div()?(e=ke(Nr.files[1].get_div()),t=e.outerHeight()+p
arseInt(e.css("margin-bottom"))+parseInt(e.css("margin-top"))):null},append_elli
psis:function(e){return Pt("%(action_text)s","web","action which requires further
user interaction").format({action_text:e})},getIndexOfFileInArray:function(e,t)
{var n,i,r,o,s;for(s=-1,i=r=0,o=e.length;o>r;i=++r)n=e[i],n.sjid===t.sjid&&(s=i)
;return s}};var ur;ur=ut.Sort=function(){var e,t,n,i,r,o,s;return n=function(e){
var t;return t=e?1:-1,function(e,n){return t*Kt.sort_by_rank_or_key(e,n)}},i=fun
ction(e){var t;return t=e?1:-1,function(e,n){return e.bytes>n.bytes?t:e.bytes<n.
bytes?-t:t*ur.FILES_BY_NAME(e,n)}},e=function(e){var t;return t=e?1:-1,function(
e,n){return t*(e.fq_path.toLowerCase()>n.fq_path.toLowerCase()?1:-1)}},t=functio
n(e){var t;return t=e?1:-1,function(e,n){var i;return i=e.ts===n.ts?0:e.ts>n.ts?
1:-1,t*i}},o=function(e){return function(t){var i,r;return r=e(t),i=n(!0),functi
on(e,t){return e.dir^t.dir?(e.dir?1:0)-(t.dir?1:0):r(e,t)||i(e,t)}}},r=function(
e){return function(t){var n,i;return ur.FOLDERS_FIRST?(i=e(t),n=t?1:-1,function(
e,t){var r;return e.dir^t.dir?(r=(e.dir?0:1)-(t.dir?0:1),n*r):i(e,t)}):e(t)}},s=
function(e){return function(t){var n,i;return i=ur.FILES_BY_NAME(t),n=t?1:-1,fun
ction(t,r){var o;return t.is_deleted^r.is_deleted?(t.is_deleted?1:0)-(r.is_delet
ed?1:0):(o=0,e?t.get_category()!==r.get_category()?o=t.get_category()<r.get_cate
gory()?-1:1:t.get_extension()!==r.get_extension()&&(o=t.get_extension()<r.get_ex
tension()?-1:1):t.get_extension()!==r.get_extension()?o=t.get_extension()<r.get_
extension()?-1:1:t.get_category()!==r.get_category()&&(o=t.get_category()<r.get_
category()?-1:1),n*o||i(t,r))}}},{FILES_BY_NAME:r(n),SHARED_WITH:r(n),FILES_BY_S
IZE:o(i),FILES_BY_LOCATION:o(e),FILES_BY_KIND:o(s(!0)),FILES_BY_EXTENSION:o(s(!1
)),FILES_BY_MODIFIED:o(t),FOLDERS_FIRST:!Kt.is_mac(),ALL_BY_MODIFIED:t}}();var d
r,Vn=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&thi
s[t]===e)return t;return-1};dr=ut.FlexColumn=function(){var e,t,n,i,r,o,s,a;for(
e=[{label:"SHARED_WITH",func:ur.FILES_BY_NAME,display:Pt("Shared With"),is_asc:!
0},{label:"FILES_BY_KIND",func:ur.FILES_BY_KIND,display:Pt("Kind"),is_asc:!0},{l
abel:"FILES_BY_EXTENSION",func:ur.FILES_BY_EXTENSION,display:Pt("Extension"),is_
asc:!0},{label:"FILES_BY_SIZE",func:ur.FILES_BY_SIZE,display:Pt("Size"),is_asc:!
1}],t={},n={},r=[],i=[],s=0,a=e.length;a>s;s++)o=e[s],r.push(o.func),t[o.label]=
o.display,n[o.label]=o.is_asc,i.push(o.label);return{SORT_FUNCTIONS:r,DISPLAY:t,
IS_ASC:n,LABELS:i,has_label:function(e){return Vn.call(this.LABELS,e)>=0},has_so
rt:function(e){return Vn.call(this.SORT_FUNCTIONS,e)>=0},next:function(t){var n;
return n=dr.LABELS.indexOf(t)+1,n===dr.LABELS.length&&(n=0),e[n]},set_column_dis
play:function(n,i){return e[dr.LABELS.indexOf(n)].display=i,t[n]=i}}}();var cr;c
r=ut.FileSearch={MAX_RESULTS:100,last_state:!1,last_fq_path:null,scoped_search:!
0,last_new_search_ts:{},is_loaded:!1,init:function(e,t){return this.firefly_enab
led=e,this.fulltext_search_enabled=t,ke(document).on("db:searchbar:submit",funct
ion(e){return function(t){return Nr.is_initialized?(t.preventDefault(),ke(t.targ
et).blur(),e.search(!0)):void 0}}(this)),ke(document).on("db:searchbar:preview",
function(e,t){return Nr.is_initialized?(e.preventDefault(),Nr.open_file(t.file,t
.force_new_window,!0,G.OREF_CONSTANTS.BROWSE_SEARCHBOX)):void 0})},get_state:fun
ction(){return x.queryParams(this.get_basic_query(),this.last_fq_path)},set_stat
e:function(e){return this.last_fq_path=null!=e.last_fq_path?e.last_fq_path:"",th
is.scoped_search=""!==this.last_fq_path,Nr.inside_dir=this.scoped_search,this.se
t_basic_query(e.query_unnormalized),this.do_search(!1,!0)},state_changed:functio
n(){var e,t;return e=this.get_state(),t=this.last_state,t===!1?!!e.query:e.query
!==t.query||e.last_fq_path!==t.last_fq_path},get_basic_query:function(){return t
his._get_browse_search_input().val()},set_basic_query:function(e){return e!==thi
s.get_basic_query()?this._get_browse_search_input().val(e):void 0},set_title:fun
ction(){var e,t;return e=this.get_state(),t=Pt("Search - Dropbox"),e.query_unnor
malized&&(t=e.query_unnormalized+" - "+t),document.title=t},_set_scope_path_to_b
rowse_location:function(){return this.last_fq_path=Nr.inside_dir?Nr.containing_f
q_path():""},do_search:function(e,t){var n,i,r,o;return null==t&&(t=!1),"functio
n"==typeof Nr.entered_search&&Nr.entered_search(),o=!t&&!Nr.in_search_mode(),o&&
this._set_scope_path_to_browse_location(),r=this.get_state(),(i=""===this.get_ba
sic_query())?void(Nr.in_search_mode()&&(this._clear_on_reload=!1,this.exit_searc
h())):(this.last_state=r,this._clear_on_reload=!0,xr.deselect_all(),Nr.clear(),l
r.set_special_mode("search"),this.scoped_search=""!==this.last_fq_path,t||(n=nul
l,p.push_state("/search/"+Nr.active_user.role,r)),this.set_title(),this.reset_fu
lltext_search(this.scoped_search),this.last_new_search_ts=new Date,ke("#fulltext
-search-loading").show(),this.ask_server("/ajax_fulltext_search",e,0,this.MAX_RE
SULTS,!1),Vt("search"))},search:function(e){return null==e&&(e=!1),e!==this.scop
ed_search&&(this.last_state=!1),this.scoped_search=this.scoped_search&&e,this.sc
oped_search||(this.last_fq_path=""),this.do_search(!1)},load_more_results:functi
on(){var e;return this.end_of_results?void 0:(e=this.search_pos,this.end_of_acti
ve_results&&(e=this.deleted_search_pos),this.ask_server("/ajax_fulltext_search",
!1,e,this.MAX_RESULTS,this.end_of_active_results))},firefly_filename_search:func
tion(){return this.do_search(!0)},update_empty:function(){var e;return e=Pt("No
results found"),this.scoped_search&&(e=Pt("No results found in %(path)s ").form
at({path:rt.filename(this.last_fq_path)})),ke("#noresults-header").text(e),ke("#
fulltext-search-all-link").hide(),ke("#noresults-directions").toggle(!this.scope
d_search),ke("#noresults-search-all-link").toggle(this.scoped_search)},show_empt
y:function(){return this.update_empty(),$("search-empty").show()},hide_empty:fun
ction(){return $("search-empty").hide()},reset_fulltext_search:function(e){retur
n xr.deselect_all(),Nr.clear(),Nr.reset_state(),Nr.update_header_status(""),this
.search_pos=0,this.deleted_search_pos=0,this.end_of_active_results=!1,this.end_o
f_results=!1,this.scoped_search=e,ke("#fulltext-search-all-link").hide()},exit_s
earch:function(){var e;return Nr.in_search_mode()&&(e=[Nr.inside_deleted_dir,Nr.
inside_deleted_sandbox,Nr.inside_deleted_shared_folder],v.any(e)||(Nr.deleted_sh
own=!1)),$("browse").removeClassName("pending-search"),this.hide_empty(),pr.set_
path_url(null,this.last_fq_path,Nr.deleted_shown)},force_reload:function(){retur
n this.search()},ask_server:function(e,t,n,i,r){var o,s,a,_,l,u;return u=this.ge
t_state(),l=null,_=new Date,l=r?Ge.DELETED:t?Ge.COMPLETION:Ge.FULLTEXT,o={firefl
y:this.firefly_enabled,infinite_scroll:n>0?!0:!1,path_scoped:!1,search_type:l,qu
ery_string:u.query},et.SearchClientActivityLogger.log("query_started",Nr.active_
user.id,o),n||ke("#web-search-results").html(Pt("Searching...")),ke("#browse").a
ddClass("pending-search"),s={query:u.query},n&&(s.start=n),i&&(s.max_results=i),
r&&(s.deleted=r),this.scoped_search&&(s.fq_path=this.last_fq_path),t||(this.last
_fulltext_query=u.query),t&&(s.filename_only=!0),a=!1,new Ajax.DBRequest(e,{no_w
atch:!0,evalJSON:!1,parameters:s,log_timing:!0,onSuccess:function(e){return func
tion(t){var n,i,r,s,l;if(Nr.in_search_mode())return s=t.request.parameters.paren
t_request_id,n=JSON.parse(t.responseText),l=n.file_info.length,u.query===e.last_
fulltext_query&&_>=e.last_new_search_ts&&(e.search_pos=e.search_pos+l,e.end_of_a
ctive_results&&(e.deleted_search_pos=e.deleted_search_pos+l),l<e.MAX_RESULTS&&(e
.end_of_results=!0&&e.end_of_active_results,e.end_of_active_results=!0,e.end_of_
results?ke("#fulltext-search-loading").hide():a=!0),e.update_results(n,a,s)),i=n
.file_info.length>0?n.file_info[0]:null,o=et.SearchClientActivityLogger.create_c
ompletion_log_dict(o,s,t.request.start_time,u.query,u.query===(null!=(r=e.last_s
tate)?r.query:void 0),l,null,i),et.SearchClientActivityLogger.log("query_complet
ed",Nr.active_user.id,o)}}(this),onFailure:function(e){return function(t){var n;
return o=et.SearchClientActivityLogger.create_completion_log_dict(o,t.request.pa
rameters.parent_request_id,t.request.start_time,u.query,u.query===(null!=(n=e.la
st_state)?n.query:void 0),null,t.status),et.SearchClientActivityLogger.log("quer
y_failed",Nr.active_user.id,o)}}(this),cleanUp:function(e){return function(){ret
urn a?e.load_more_results():ke("#browse").removeClass("pending-search")}}(this),
subject_user:Nr.active_user})},update_results:function(e,t,n){var i;return null=
=t&&(t=!1),null==n&&(n=null),i=this.get_state(),Nr.update(e,n),Nr.set_selection_
from_fq_paths_or_index(cr),t?void 0:(this._update_number_results(this.search_pos
),Nr.files.length?this.hide_empty():this.show_empty())},_update_number_results:f
unction(e){var t,n;return t=0===e?"":this.end_of_results?this.fulltext_search_en
abled?Ft("%(num_results)s result in files, folders, and content.","%(num_results
)s results in files, folders, and content.",e).format({num_results:e}):Ft("%(num
_results)s result in files and folders.","%(num_results)s results in files and f
olders.",e).format({num_results:e}):this.fulltext_search_enabled?Ft("Over %(num_
results)s result in files, folders, and content.","Over %(num_results)s results
in files, folders, and content.",e).format({num_results:e}):Ft("Over %(num_resul
ts)s result in files and folders.","Over %(num_results)s results in files and fo
lders.",e).format({num_results:e}),n=Pt("Search")+" - "+t,Nr.update_header_statu
s(t),n=Pt("Results for %(query)s ").format({query:this.get_state().query}),this
.scoped_search&&(n=Pt("Results for %(query)s in %(path)s ").format({query:thi
s.get_state().query,path:rt.filename(this.last_fq_path+" ")})),ke("#web-search-r
esults").text(n),this.scoped_search?ke("#fulltext-search-all-link").show():void
0},history_change_handler:function(e,t){var n,i,r;return i="string"==typeof this
._get_browse_search_input().find("input").attr("value"),r=i&&!this.is_loaded,t&&
(this.last_state=t),this.last_state?((this.state_changed()||r)&&this.set_state(t
his.last_state),io.shown()||key.setScope(Nr.KEY_SCOPE),xr.get_selected_files().l
ength&&(n=xr.get_selected_files()[0].get_div(),Nr.scrollToWithPadding(n,2*n.getH
eight())),this.is_loaded=!0):void pr.set_path_url(c.root_ns,"")},clear_searchbox
:function(){return this._get_browse_search_input().val("")},_get_browse_search_i
nput:function(){return ke("#browse-search-input")}};var hr;hr=ut.BrowseKeys={_ha
ndlers:{},init:function(){},init_advanced:function(){var e,t,n;n=this.advanced_d
ict;for(t in n)e=n[t],key(e.key,Nr.KEY_SCOPE,e.onPress);return this.customize_ch
art(),Kt.is_mac()&&Prototype.Browser.Gecko?document.observe("keypress",function(
e){return function(t){return 63!==t.charCode||Fe.focus_in_input()?void 0:e.advan
ced_dict.help.onPress()}}(this)):void 0},customize_chart:function(){var e,t,n,i;
for(e=Kt.is_mac()?".key-windows":".key-macos",n=0,t=void 0,i=[];;){if(t=$("keyschart").down(e,n++),!t)break;i.push(t.hide())}return i},toggle_chart:function(){
return"none"===$("keys-chart").style.display?this.show_chart():this.hide_chart()
},show_chart:function(){var e,t;return e=$("keys-chart"),e.style.position="fixed
",t=$("browse-sort"),Nr.in_search_mode()?t=$("browse-header-wrapper"):"none"===t
.getStyle("display")&&(t=$("browse-root-actions")),Fe.clone_position(ke(e),ke(t)
,{setHeight:!1}),e.style.top=t.cumulativeOffset()[1]+t.getHeight()+"px",e.setOpa
city(.9),e.show()},hide_chart:function(){return $("keys-chart").hide()},advanced
_dict:{rename:{title:Pt("Rename selected files",{comment:" selected means files
that have been highlighted by the user to be acted upon"}),key:"f2",onPress:fun
ction(){var e;return e=xr.get_selected_files(),e.length?e.first().edit():void 0}
},"delete":{title:Pt("Delete selected files",{comment:" selected means files th
at have been highlighted by the user to be acted upon"}),key:"delete, command+ba
ckspace, backspace",onPress:function(e){var t,n,i,r;if(Event.stop(e),Nr.inside_r
ead_only_shared_folder&&b.warning(Pt("You don t have permission to delete files
in this folder.")),r=xr.get_selected_files(),1===r.length)return n=r.first(),n.i
s_deleted?_i.show_purge(n.fq_path,n.dir):(t=n.mount_point?rt.filename(n.mount_po
int):null,_i.show_delete(Nr.active_user,n.fq_path,n.dir,void 0,t,n.is_shared_fol
der()));if(r.length>1){if(i=lr.profile_files(r),i.deleted===r.length)return _i.s
how_bulk_purge(r);if(0===i.deleted)return _i.show_bulk_delete(Nr.active_user,r)}
}},help:{title:Pt("Show/hide keyboard shorcuts"),key:"shift+/, "+key.main_modifi
er()+"+/",onPress:function(){return hr.toggle_chart()}},close_help:{title:Pt("Hi
de keyboard shorcuts"),key:"escape",onPress:function(){return hr.hide_chart()}},
files,i),we.open(Nr.files,s,Nr.active_user,"react-file-viewer",{fileViewTarget:G
.FileViewTargetType.PRIVATE,fileViewOrigin:G.FileViewOriginType.BROWSE,fileViewA
ction:G.FileViewActionType.CLICK});if(!io.shown()||io.file!==i)return Nr.open_pr
eview(i,G.OREF_CONSTANTS.BROWSE_UNKNOWN,!0)}else{if(!ne.getGandalfRule("file-vie
wer-react")&&io.shown())return io.hide();if(ne.getGandalfRule("file-viewer-react
")&&we.isShown())return we.close()}},parse_b2_hash:function(e){var t,n,i,r,o;ret
urn r=e.split(":"),4!==r.length?!1:(i=r[0],t="1"===r[2],n=r[3],(o=!n||Kt.isNumbe
r(n))?(n=parseInt(n,10)||c.root_ns,{ns_id:n,ns_path:i,deleted:t}):!1)}};var mr;m
r=ut.BrowseFile=Class.create({initialize:function(e){var t,n,i,r;return t=rt.fil
ename(e.fq_path),this.can_hold_shared_folders=e.can_hold_shared_folders,this.all
ows_shared_link=e.allows_shared_link?1:0,this.icon=e.icon,this.filename=t,this.f
ilename_highlights=null!=(n=e.filename_highlights)?n:[],this.unresolved_comment_
count=e.unresolved_comment_count,this.unseen_comment_count=e.unseen_comment_coun
t,this.update_caption(),this.ns_id=e.ns_id,this.ns_path=e.ns_path,this.fq_path=e
.fq_path,this.mount_point=e.mount_point,this.hash=e.hash,this.href=e.href,this.s
ize="None"!==e.size?e.size:"",this.bytes=e.bytes,this.is_deleted=-1===this.bytes
,this.ago=e.ago,this.ts=e.ts,this.dir=e.is_dir?1:0,this.target_ns=e.target_ns,th
is.sort_rank=e.sort_rank,this.sort_key=e.sort_key||[""],this.sjid=e.sjid,this.tk
ey=void 0,this.thumbnail_url_tmpl=e.thumbnail_url_tmpl,this.large_thumbnail_url_
tmpl=e.large_thumbnail_url_tmpl,this.type=e.type,this.preview_type=e.preview_typ
e,e.last_modified_fname&&(this.last_modified_fname=_.em_snippet(e.last_modified_
fname,Rr),this.last_modified_name=e.last_modified_name),this.event_type=e.event_
type,this.htmlified_link=e.htmlified_link,this.linkfile_link=e.linkfile_link,thi
s.direct_blockserver_link=e.direct_blockserver_link,this.doc_preview_status=e.do
c_preview_status,this.in_root_coll=e.in_root_coll,this.compressible=e.compressib
le,this.user_id=e.user_id,this.sf_perm_role=e.sf_perm_role,this.fulltext_search=
e.fulltext_search,this.read_only=e.read_only?!0:!1,this.is_read_only_mount=e.is_
read_only_mount?!0:!1,this.request_id=null!=(i=e.request_id)?i:null,this.match_t
ype=null!=(r=e.match_type)?r:"UNKNOWN_MATCH",this.video_transcode_url=e.video_tr
anscode_url},track_in_browse:function(){return this.to_key()in mr._file_index?vo
id 0:(Nr.add_file(this),mr._file_index[this.to_key()]=this)},is_shared_folder:fu
nction(){return this.type===Tt.SHARED_FOLDER||this.type===Tt.TEAM_SHARED_FOLDER}
,is_team_shared_folder:function(){return this.type===Tt.TEAM_SHARED_FOLDER},coul
d_be_shared_link:function(){return this.allows_shared_link},could_be_shared_fold
er:function(){var e,t,n,i;return t=Nr.public_folder_enabled&&this.fq_path.toLowe
rCase().startsWith("/public/"),i=Nr.public_folder_enabled&&"/public"===this.fq_p
ath.toLowerCase(),n=this.target_ns,e=this.ns_id!==c.root_ns,!(this.type!==Tt.FOL
DER||n||t||i||this.is_sandbox()||e&&(!this.can_hold_shared_folders||Nr.inside_re
ad_only_shared_folder))},is_sandbox:function(){return this.type===Tt.SANDBOX},ge
t_div:function(){return $("f_"+this.to_key())},rename:function(e,t,n,i,r,o){var
a,_,l;return _=this.fq_path,Nr.pre_action_selection=[_],a=Nr.find_file(e),a&&Nr.
remove_file(a),this.filename=rt.filename(e),this.update_caption(),this.fq_path=e
,this.ns_path=t,this.htmlified_link=o,this.hash=n,this.sort_key=i,this.sort_rank
=null,this.last_modified_fname=null,this.dir?(this.href="/home"+Kt.urlquote(e),t
his.target_ns&&(Nr.ns_id_to_mount_point[this.target_ns]=e)):(l=this.href.split("
/"),l[l.length-1]=Kt.urlquote(this.filename)+("?w="+n),this.href=l.join("/"),thi
s.icon=r),Nr.in_search_mode()&&(this.filename_highlights=[]),mr._file_index[this
.to_key()]=this,Nr.update_file_pos(this),ke(document).trigger(s.RENAME,{old_fq_p
ath:_,file:this})},edit:function(){var e,t,n,i,r;return this.editing=!0,Nr.selec
table(),r=function(e){return function(t){var n,i,r,o,s,a,_,l,u,d;return d=t.resp
onseText.evalJSON(!0),ft(1===d.new_browse_files.length,"No new file data returne
d."),r=d.new_browse_files.first(),o=r.fq_path,s=r.hash,u=Kt.decode_sort_key(r.so
rt_key),_=r.icon,l=r.ns_path,a=r.htmlified_link,n=d.changesets,i=Pt("Rename comp
lete."),ee.notifyWithUndo(i,n,_i.do_rollback),e.rename(o,l,s,u,_,a),xr.set_selec
ted_files([e]),e.get_div().smoothScrollIntoView(),lr.load_visible_thumbs(),Nr.fi
re_visible_change_callbacks()}}(this),t=o({path:"/cmd/rename"+this.fq_path}).upd
ateQuery(D.UID_PARAM_NAME,Nr.active_user).toString(),n=Nr.in_search_mode()?".fil
ename-col":".filename-col a",e=new Ajax.InPlaceEditor(this.get_div().down(n),t,{
htmlResponse:!1,okControl:!1,cancelControl:!1,highlightColor:"transparent",highl
ightEndColor:"transparent",clickToEditText:"",cols:25,ajaxClass:Ajax.DBRequest,s
ubmitOnBlur:!0,initialText:this.filename,cancelIfSame:!0,clickToEdit:!1,onComple
te:function(e){return function(){return e.editing=!1}}(this),onFailure:function(
){},savingText:Pt("Saving..."),ajaxOptions:{job:!0,subject_user:Nr.active_user,h
tml_in_error_msg:!0,progress_text:Pt("Renaming..."),method:"POST",onCreate:b.cle
ar,onSuccess:r,onUninitialized:Nr.unselectable},callback:function(e){return func
tion(t,n){return{to_path:n||"",folder:e.dir?"yes":""}}}(this)}),e.enterEditMode(
),i=this.get_div().down(".editor_field"),"selectionEnd"in i&&this.filename.lastI
ndexOf(".")>-1?i.selectionEnd=this.filename.lastIndexOf("."):void 0},to_key:func
tion(){return this.ns_id+"_"+this.sjid},get_category:function(){var e,t;return t
his.dir&&(Nr.inside_dir&&""===Nr.containing_fq_path()&&"public"===this.filename.
toLowerCase()&&Nr.public_folder_enabled&&(e="PUBLIC_FOLDER"),null==e&&(e=this.ty
pe===Tt.FOLDER?"FOLDER":this.type===Tt.PACKAGE?"FOLDER":this.type===Tt.TEAM_SHAR
ED_FOLDER?"TEAM_SHARED_FOLDER":this.type===Tt.SHARED_FOLDER?"SHARED_FOLDER":this
.type===Tt.SANDBOX?"SANDBOX":this.target_ns?"SHARED_FOLDER":"FOLDER")),null==e&&
(e=mr.EXTENSION_TO_CATEGORY[this.get_extension()]||"FILE"),t=this.is_deleted?mr.
CATEGORY_TO_DELETED_TRANSLATION[e]:mr.CATEGORY_TO_TRANSLATION[e],ft(t,"CATEGORY
MISSING FOR "+e),t},get_icon_alt:function(){return this.dir?Pt(this.is_shared_fo
lder()?this.is_team_shared_folder()?this.is_read_only_mount?"Read-only team fold
er":"Team folder":this.is_read_only_mount?"Read-only shared folder":"Shared fold
er":this.is_read_only_mount?"Read-only folder":"Folder"):""},get_extension:funct
ion(){return this.dir||-1===this.filename.indexOf(".")?void 0:rt.file_extension(
this.filename).toLowerCase()},is_shmodelable:function(){return!this.is_deleted&&
Nr.is_shmodelable_path(this.fq_path)},update_caption:function(){var e;return e=N
r.inside_dir?Or:Mr,this.unresolved_comment_count>0&&(e-=Ir),this.caption=_.em_sn
ippet(this.filename,e)}}),mr._CATEGORIES={IMAGE:"bmp cr2 gif ico jpeg jpg nef pn
g psd tif tiff svg svgz",VIDEO:"3gp 3gpp 3gpp2 avi dv flv m2t m4v mkv mov mp4 mp
eg mpg mts ts vob wmv",AUDIO:"aif flac m4a m4p mp3 ogg wav wma",DOCUMENT:"ai cdr
csv doc docx docm eps fla indd keynote numbers otf pages pdf ppt pptx pptm pps
ppsx ppsm ps rtf swf txt wpd xls xlsx xlsm",COMPRESSED_FILE:"7z bz2 gz gzip rar
tar zip",CODE:"as as3 c coffee cpp cs css cxx h html java js less php py rb sass
scss sh sql vb xhtml xml",DISK_IMAGE:"dmg iso",EXECUTABLE:"exe",SHORTCUT:"lnk",
LINK:"url webloc",FONT:"ttf"},mr.EXTENSION_TO_CATEGORY={},mr.CATEGORY_TO_TRANSLA
TION={FILE:Pt("file"),FOLDER:Pt("folder"),SHARED_FOLDER:Pt("shared folder"),TEAM
_SHARED_FOLDER:Pt("team folder"),PUBLIC_FOLDER:Pt("folder"),IMAGE:Pt("image"),VI
DEO:Pt("video"),AUDIO:Pt("audio"),DOCUMENT:Pt("document"),COMPRESSED_FILE:Pt("ar
chive"),CODE:Pt("code"),DISK_IMAGE:Pt("disk image"),EXECUTABLE:Pt("executable"),
SHORTCUT:Pt("shortcut"),LINK:Pt("link"),FONT:Pt("font"),SANDBOX:Pt("app folder")
},mr.CATEGORY_TO_DELETED_TRANSLATION={FILE:Pt("deleted file"),FOLDER:Pt("deleted
folder"),SHARED_FOLDER:Pt("deleted shared folder"),TEAM_SHARED_FOLDER:Pt("delet
ed team folder"),PUBLIC_FOLDER:Pt("deleted folder"),IMAGE:Pt("deleted image"),VI
DEO:Pt("deleted video"),AUDIO:Pt("deleted audio"),DOCUMENT:Pt("deleted document"
),COMPRESSED_FILE:Pt("deleted archive"),CODE:Pt("deleted code"),DISK_IMAGE:Pt("d
eleted disk image"),EXECUTABLE:Pt("deleted executable"),SHORTCUT:Pt("deleted sho
rtcut"),LINK:Pt("deleted link"),FONT:Pt("deleted font"),SANDBOX:Pt("deleted app
folder")},function(){var e,t,n,i,r;i=mr._CATEGORIES,r=[];for(e in i)n=i[e],r.pus
h(function(){var i,r,o,s;for(o=n.trim().split(" "),s=[],i=0,r=o.length;r>i;i++)t
=o[i],s.push(mr.EXTENSION_TO_CATEGORY[t]=e);return s}());return r}(),mr._file_in
dex={},mr.from_key=function(e){return mr._file_index[e]},mr.from_elem=function(e
){var t;if(e)return t=e.readAttribute("data-identity"),t?mr.from_key(t):mr.from_
elem(e.up("[data-identity]"))};var vr,gr,wr,br,yr,kr,Vn=[].indexOf||function(e){
for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};v
r=INLINE_JS.BrowseActions=ut.BrowseActions=Class.create({initialize:function(e){
return this._set_files(e)},firefly_logging_helper:function(e){return Nr.in_searc
h_mode()&&e?(this._firefly_log_values.action_type=e,et.SearchClientActivityLogge
r.log("result_action",Nr.active_user.id,this._firefly_log_values)):void 0},unlis
ten:function(){},get_action_names:function(){var e;return e=this.get_files(),e.l
ength<2?this._get_actions_single(e.first()):this._get_actions_multi(e)},get_file
s:function(){return this._files},get_action_by_name:function(e){return this.eval
uate_action(vr.option_dict[e],e)},evaluate_action:function(e,t){var n,i,r;return
n=function(e){return function(t,n){return null!=n&&null==t?n:ke.isFunction(t)?t
.call(e):null!=t?t:n}}(this),r={icon_href:e.icon_href,target:e.target,click_hand
ler:e.click_handler,type:e.type,name:t||e.name,is_dropdown:!!e.is_dropdown,icon:
n(e.icon),text:n(e.text),detail_text:n(e.detail_text),href:n(e.href,""),kind:n(e
.kind,"icon"),button_label:n(e.button_label,e.text)},ke.isFunction(e.subactions)
?r.subactions=e.subactions.call(this):ke.isArray(e.subactions)?r.subactions=func
tion(){var t,n,r,o;for(r=e.subactions,o=[],t=0,n=r.length;n>t;t++)i=r[t],o.push(
this.get_action_by_name(i));return o}.call(this):e.subactions&&ft(0,"subactions
must be a function or an array of actions"),r},_set_files:function(e){var t;retu
rn this._files=$A(e),this._log_extras={},this.get_files().length>0?(t=e.first(),
this._log_extras={path:t.fq_path,ns_id:t.ns_id},this._firefly_log_values={file_n
sid:t.ns_id,file_sjid:t.sjid,firefly:cr.firefly_enabled,match_type:t.match_type,
position:t.sort_rank,request_id:t.request_id,viewport:"full-view"}):void 0},_get
_actions_single:function(e){var t,n,i,r,o,s,a,_,l,u,d,h,f,p,m,v,g,w,b,y;if(n=[],
!e)return[];if(r=Nr.public_folder_enabled&&e.fq_path.toLowerCase().startsWith("/
public/"),u=Nr.public_folder_enabled&&"/public"===e.fq_path.toLowerCase(),_=e.ta
rget_ns,i=e.ns_id!==c.root_ns,h=e.type===Tt.SHARED_FOLDER,d=e.type===Tt.SANDBOX,
l=e.type===Tt.PACKAGE,a=e.in_root_coll,s=e.compressible,e.is_deleted)n=n.concat(
["restore"]),(null!=(v=Nr.permanent_delete_is_disabled_by_ns_id)?v[e.ns_id]:void
0)||n.push("purge");else if(y=null!=__CONDITIONAL_JS__.UnityFeatures&&(null!=(g
=__CONDITIONAL_JS__.UnityCheckFileCache)?g.is_cached_and_locally_available(e.ns_
id,e.ns_path):void 0),m=y?"open":"download",e.dir?(d?n.push("app_info"):Nr.simpl
e_sharing_enabled?n.push("share_folder_and_token"):h?n.push("sharing_options"):i
||_||r||u||n.push("share"),e.is_shmodelable()&&!Nr.simple_sharing_enabled&&n.pus
h("token_share"),n.push(m),u||(n=n.concat(["delete","rename","move"]),l||_||n.pu
sh("copy")),Nr.can_use_photos_features&&Nr.can_use_photos_features&&n.push("albu
m_from_folder")):(r||Nr.public_app_token?n.push("copy_url"):Nr.simple_sharing_re
act_member_list_enabled?n.push("share_folder_and_token"):e.is_shmodelable()&&n.p
ush("token_share"),n.push(m),Nr.can_show_preview(e)&&Nr.browser_supports_comment
s&&n.push("comment"),n=n.concat(["delete","rename","move","copy","revisions"]),
a&&Nr.can_use_photos_features&&n.push("carousel"===Nr.photos_experience?"view_in
_carousel":"view_in_photos"),s&&n.push("compress")),!Nr.simple_sharing_enabled){
for(b=!1,w=["sharing_options","share","token_share"],f=0,p=w.length;p>f;f++)t=w[
f],o=n.indexOf(t),o>-1&&(n.splice(o,1),b=!0);n.unshift(e.is_shared_folder()||e.c
ould_be_shared_folder()?"single_entry_share_dropdown_variant_menu":"single_entry
_share_dropdown_variant_token_share_only")}return n},_get_actions_multi:function
(e){var t,n,i;return t=["download","delete","move","copy","restore","purge"],t.p
ush("carousel"===Nr.photos_experience?"view_in_carousel":"view_in_photos"),n=lr.
profile_files(e),(n.deleted>0||n.public_folder>0)&&(t.removeItem("move"),t.remov
eItem("copy"),t.removeItem("delete")),n.shared_folders>0&&t.removeItem("copy"),n
.deleted>0&&(t.removeItem("send_copy"),t.removeItem("delete"),t.removeItem("down
load")),Nr.inside_dir||t.removeItem("download"),(n.deleted!==e.length||0!==n.sha
red_folders&&(n.shared_folders!==(i=e.length)||1!==i))&&t.removeItem("restore"),
(n.deleted!==e.length||n.can_permanently_delete!==e.length)&&t.removeItem("purge
"),n.in_root_coll===e.length&&Nr.can_use_photos_features||(t.removeItem("view_in
_photos"),t.removeItem("view_in_carousel")),t},_show_appropriate_sharing_modals:
function(e,t){var n;return Nr.simple_sharing_enabled&&e.dir||Nr.simple_sharing_r
eact_member_list_enabled?void(Et.get_for_user(Nr.active_user).verified_or_show()
&&ei.createAndShowInbandModalFromBrowseFile(Nr.active_user,e)):e.is_shared_folde
r()?(et.ShmodelUILogger.log_with_target_file("sf_options",t,e),tn.show_shared_fo
lder_options_modal(e.fq_path,Nr.active_user)):e.could_be_shared_folder()?(et.Shm
odelUILogger.log_with_target_file("sf_invite",t,e),tn.show_share_existing_modal(
e.fq_path,Nr.active_user)):(et.ShmodelUILogger.log_with_target_file("token_share
",t,e),n=e.fq_path,ft(n,"token_share: expected non-root fq_path"),qn.shmodel(n,t
+"_token_share"))},get_disabled_action_names:function(){var e,t,n,i,r;for(e=!1,r
=this.get_files(),n=0,i=r.length;i>n;n++)if(t=r[n],e=!0,!t.read_only){e=!1;break
}return Nr.inside_read_only_shared_folder||e?["move","rename","delete","restore"
,"purge","upload","new_folder","compress"]:[]},show_disabled_action_warning:func
tion(e){return b.warning(Nr.inside_read_only_shared_folder?"move"===e?Pt("You do
n t have permission to move files in this folder."):"rename"===e?Pt("You don t h
ave permission to rename files in this folder."):"delete"===e?Pt("You don t have
q_path(),Nr.active_user)}},sharing_options:{icon:"rainbow_16",text:lr.append_ell
ipsis(Pt("Shared folder options",{comment:"BUTTON"})),click_handler:function(e,t
){var n;return n=this.get_files().first(),et.ShmodelUILogger.log_with_target_fil
e("sf_options",t,n),tn.show_shared_folder_options_modal(n.fq_path,Nr.active_user
)}},share:{icon:"rainbow_16",text:lr.append_ellipsis(Pt("Invite to folder",{comm
ent:"BUTTON"})),click_handler:function(e,t){var n;return n=this.get_files().firs
t(),et.ShmodelUILogger.log_with_target_file("sf_invite",t,n),tn.show_share_exist
ing_modal(n.fq_path,Nr.active_user)}},share_folder_and_token:{icon:"rainbow_16",
text:lr.append_ellipsis(Pt("Share",{comment:"BUTTON"})),click_handler:function(e
,t){var n;return n=this.get_files().first(),this._show_appropriate_sharing_modal
s(n,t)}},revisions:{icon:"previous_versions",click_handler:function(){return win
dow.location.href=_i.build_revisions_uri(this.get_files().first().fq_path,Nr.act
ive_user)},text:Pt("Previous versions",{comment:"BUTTON"})},token_share:{icon:"s
_link",text:lr.append_ellipsis(Pt("Share link",{comment:"BUTTON"})),click_handle
r:function(e,t){var n,i;return n=this.get_files().first(),et.ShmodelUILogger.log
_with_target_file("token_share",t,n),i=n.fq_path,ft(i,"token_share: expected non
-root fq_path"),qn.shmodel(i,t+"_token_share")}},global_token_share:{icon:"s_lin
k",text:lr.append_ellipsis(Pt("Share link",{comment:"BUTTON"})),click_handler:fu
nction(e,t){return et.ShmodelUILogger.log("via-global-toolbar"),qn.shmodel(Nr.co
ntaining_fq_path(),t+"_global_token_share")}},copy_url:{icon:"world_link",text:l
r.append_ellipsis(Pt("Copy public link",{comment:"BUTTON"})),click_handler:funct
ion(){var e,t;return e=this.get_files().first(),t=Nr.public_app_token?"/spa/"+Nr
.public_app_token+e.ns_path:"/u/"+Nr.active_user.id+e.fq_path.substring(vr.PUBLI
C_FOLDER_PATH_LENGTH),vr.showCopyPublicUrlModal(String(new o({scheme:"https",aut
hority:be.PUBSERVER,path:t})))}},download:{icon:"download",text:function(){retur
n Pt("Download",{comment:"BUTTON"})},click_handler:function(){var e,t,n,i,r,s,a,
_;return n=this.get_files(),1!==n.length||n[0].dir?_i.do_bulk_download(n):(t=n.f
irst(),a=[be.BLOCK_CLUSTER,t.fq_path,t.hash],e=a[0],r=a[1],i=a[2],s={w:i,dl:1},_
=o({scheme:"https",authority:e,path:"/get"+r,query:s}),window.location=String(_.
updateQuery(D.UID_PARAM_NAME,Nr.active_user)))}},view:{href:function(){var e,t,n
,i,r;return t=this.get_files().first(),r=[be.BLOCK_CLUSTER,Kt.urlquote(t.fq_path
),t.hash],e=r[0],i=r[1],n=r[2],"https://"+e+"/get"+i+"?w="+n},icon:"page_white_m
agnify",text:Pt("View file",{comment:"BUTTON"})},ignore:{click_handler:function(
){return tn.show_ignore_modal(this.get_files().first().fq_path)},icon:"folder_us
er_delete",text:Pt("Permanently remove",{comment:"BUTTON"})},show_del:{click_han
dler:function(){return Nr.toggle_deleted()},icon:"trash-can",text:Pt("Show delet
ed files",{comment:"BUTTON"})},hide_del:{click_handler:function(){return Nr.togg
le_deleted()},icon:"trash-can-open",text:Pt("Hide deleted files",{comment:"BUTTO
N"})},copy:{icon:"copy",text:lr.append_ellipsis(Pt("Copy",{comment:"BUTTON"})),c
lick_handler:function(){var e,t;return t=this.get_files(),1===t.length?(e=t.firs
t(),_i.show_copy(e.fq_path,e.dir)):t.length>1?_i.show_copy_bulk(t):void 0}},move
:{icon:"move_16",text:lr.append_ellipsis(Pt("Move",{comment:"BUTTON"})),click_ha
ndler:function(){var e,t;return t=this.get_files(),1===t.length?(e=t.first(),_i.
show_move(e.fq_path,e.dir)):t.length>1?_i.show_move_bulk(t):void 0}},rename:{ico
n:"rename",text:Pt("Rename",{comment:"BUTTON"}),click_handler:function(){return
this.get_files().first().edit()}},"delete":{icon:"delete_16",text:lr.append_elli
psis(Pt("Delete",{comment:"BUTTON"})),click_handler:function(){var e,t,n,i,r,o,s
,a;if(n=this.get_files(),s=n.length,s>=1){if(o=n[0].mount_point)for(i=r=1,a=s;a>
=1?a>r:r>a;i=a>=1?++r:--r)if(n[i].mount_point!==o){o="";break}if(e=o?rt.filename
(o):null,s>1)return _i.show_bulk_delete(Nr.active_user,n,e);if(1===s)return t=n[
0],_i.show_delete(Nr.active_user,t.fq_path,t.dir,void 0,e,t.is_shared_folder())}
}},global_purge:{icon:"cancel",text:lr.append_ellipsis(Pt("Permanently delete fo
lder")),click_handler:function(){return _i.show_purge(Nr.containing_fq_path(),!0
)}},purge:{icon:"cancel",text:lr.append_ellipsis(Pt("Permanently delete",{commen
t:"BUTTON"})),click_handler:function(){var e,t;return t=this.get_files(),1===t.l
ength?(e=t.first(),_i.show_purge(e.fq_path,e.dir)):_i.show_bulk_purge(t)}},uploa
d:{icon:"upload_16",text:lr.append_ellipsis(Pt("Upload")),click_handler:function
(){return _i.show_upload()}},app_info:{icon:"application_double",text:lr.append_
ellipsis(Pt("Application info")),click_handler:function(){return window.location
.href="/account/security"}},more_actions:{is_dropdown:!0,text:Pt("More",{comment
-menu-container .hover").removeClass("hover")},_reset_submenu:function(e){return
ke(e).removeClass("hover")},_enter:function(e){var t,n,i;return t=ke(e.currentT
arget).data("value"),ft(t),n=vr.option_dict[t],ft(n,"Action info is missing for
"+t),null!=(i=n.hover_handler)?i.call(this,e,"browse_actions_context"):void 0},_
over:function(e){return ke(e.currentTarget).children(".secondary").length?(clear
Timeout(this.timeoutID),this._reset_all_submenus(),ke(e.currentTarget).addClass(
"hover")):void 0},_out:function(e){return ke(e.currentTarget).children(".seconda
ry").length?this.timeoutID=setTimeout(function(t){return function(){return t._re
set_submenu(e.currentTarget)}}(this),300):void 0}}),gr=ut.BrowseActionsBasic=Cla
ss.create(vr,{initialize:function($super){var e;return e=xr.get_selected_files()
,$super(e),this._render(),this._listen()},_listen:function(){var e;return this.b
ound_update=this._update.bind(this),this.bound_disable=this._disable.bind(this),
this.bound_enable=this._enable.bind(this),this.bound_click=this._click.bind(this
),document.observe(xr.UPDATED_EVT,this.bound_update),document.observe(Dr.SHOW_EV
T,this.bound_disable),document.observe(Dr.HIDE_EVT,this.bound_enable),e=$("brows
e-root-actions"),e.stopObserving("click"),e.on("click",".action button",this.bou
nd_click)},unlisten:function(){return document.stopObserving(xr.UPDATED_EVT,this
.bound_update),document.stopObserving(Dr.SHOW_EVT,this.bound_disable),document.s
topObserving(Dr.HIDE_EVT,this.bound_enable),$("browse-root-actions").stopObservi
ng("click",this.bound_click)},_update:function(){return this._set_files(xr.get_s
elected_files()),this._render()},_disable:function(){return $("browse-root-actio
ns").stopObserving("click"),$("browse-root-actions").down(".secondary")&&$("brow
se-root-actions").down(".secondary").addClassName("disabled"),$$("#browse-root-a
ctions .action *").invoke("setStyle",{cursor:"default"})},_disable_action:functi
on(e){var t,n;return n="#browse-root-actions #"+e+"_action_button",t=ke(n),t.add
Class("disabled"),t.click(function(t){return function(){return t.show_disabled_a
ction_warning(e),!1}}(this))},_enable:function(){return $("browse-root-actions")
.stopObserving("click"),$("browse-root-actions").on("click",".action button",thi
s._click.bind(this)),$("browse-root-actions").down(".secondary")&&$("browse-root
-actions").down(".secondary").removeClassName("disabled"),$$("#browse-root-actio
ns .action *").invoke("setStyle",{cursor:"pointer"})},_render:function(){var e,t
,n,i,r,o,s,a,l,u,d,c,h,f,p,m,v,g,w,b,y,k,E,x,S,C,T,A,D,O,N,I;if(c=this.get_files
(),n=this.get_action_names(),!Nr.simple_sharing_enabled)for(D=["single_entry_sha
re_dropdown_variant_token_share_only","single_entry_share_dropdown_variant_menu"
],m=0,w=D.length;w>m;m++)if(t=D[m],p=n.indexOf(t),p>-1){n.splice(p,1);break}for(
e=13.5,l="",h="",1===c.length?(l=_.em_snippet(c[0].filename,e),!c[0].dir&&c[0].b
ytes>=0&&(h=c[0].size)):1<c.length&&(C=lr.profile_files(c),k=[],C.files&&(E=Ft("
%d file","%d files",C.files).format(C.files),k.push(E)),C.folders&&(E=Ft("%d fol
der","%d folders",C.folders).format(C.folders),k.push(E)),l=Kt.nice_list(k)),o=$
("browse-root-actions"),r=o.getLayout().get("width"),f=o.getStyle("font-size"),f
t(f.endsWith("px"),"Invalid font size "+f),f=parseInt(f,10),u=new _(l).length*f,
O=new _(h).length*f,r-=u+O,N=[],A=[],r-=30,v=0,b=n.length;b>v;v++)x=n[v],t=this.
get_action_by_name(x),I=new _(t.text).length*f,s=I+16+8+10+9,r>s?N.push(x):(0===
A.length&&(S=N.pop(),A.push(S)),A.push(x)),r-=s;for(A.length&&N.push("more_actio
ns"),i=function(){var e,t,n;for(n=[],e=0,t=N.length;t>e;e++)x=N[e],n.push(this.g
et_action_by_name(x));return n}.call(this),A.length&&(i[i.length-1].subactions=f
unction(){var e,t,n;for(n=[],e=0,t=A.length;t>e;e++)x=A[e],n.push(this.get_actio
n_by_name(x));return n}.call(this)),a=ot.tmpl("actions_bar_tmpl",{context:this,d
escription:l,filesize:h,has_actions:!!n.length,actions:i,_:Pt,Sprite:Q}),$("brow
se-root-actions").__date(a),d=this.get_disabled_action_names(),T=[],g=0,y=d.leng
th;y>g;g++)t=d[g],T.push(this._disable_action(t));return T},_click:function(e,t)
{var n,i;return n=t.readAttribute("data-value"),ft(n),this.firefly_logging_helpe
r(n),i=vr.option_dict[n],ft(i,"Action info is missing for "+n),e.preventDefault(
),et.TimeToFirstActionLogger.log(Nr.active_user.id,n),i.click_handler.call(this,
G.OREF_CONSTANTS.BROWSE_COMMENT_BUTTON,e,"browse_actions_basic"),"sharing_option
s"===n&&et.SharedFolderActivityLogger.log("web","browse_view_select_folder_optio
ns",Nr.active_user,this._log_extras,!0),"share"===n?et.SharedFolderActivityLogge
r.log("web","browse_view_select_share_existing",Nr.active_user,this._log_extras,
!0):void 0}}),Object.extend(gr,{STANDARD_ACTIONS:["share","sharing_options","app
_info","token_share","copy_url","download","delete","rename","restore","purge","
view_in_photos","view_in_carousel","compress"]}),br=ut.GlobalActions=Class.creat
e(vr,{initialize:function($super){return $super()},get_action_names:function(){v
ar e;return Nr.inside_dir?(e=[],Nr.inside_deleted_dir?e=e.concat(["global_restor
e"]):(e=e.concat(["upload","new_folder"]),this._should_show_shared_folder_option
s()&&e.push("global_share"),this._should_show_share_link()&&e.push("global_token
_share"),e.push(Nr.deleted_shown?"hide_del":"show_del")),e):[]},_should_show_sha
red_folder_options:function(){return!Nr.is_in_subfolder_of_shared_folder()&&!Nr.
inside_sandbox},_should_show_share_link:function(){return!Nr.inside_team_folder&
&Nr.is_shmodelable_path(Nr.containing_fq_path())}}),yr=ut.GlobalActionsBasic=Cla
ss.create(br,{initialize:function($super){return $super(),this._listen(),this._r
ender()},_listen:function(){return $("global-actions").stopObserving("click"),$(
"global-actions").on("click","a",this._click.bind(this)),document.observe(Dr.SHO
W_EVT,this._disable.bind(this)),document.observe(Dr.HIDE_EVT,this._enable.bind(t
his))},_render:function(){var e,t,n,i,r,o,s,a,_,l,u,d,c;for(t=this.get_action_na
mes(),c=t.intersect(yr.STANDARD_ACTIONS),u=t.without.apply(t,yr.STANDARD_ACTIONS
),1===u.length&&(c=t,u=[]),u.length&&c.push("more_global_actions"),d=function(){
var e,t,n;for(n=[],e=0,t=c.length;t>e;e++)a=c[e],n.push(this.get_action_by_name(
a));return n}.call(this),n=function(){var t,n,i;for(i=[],t=0,n=d.length;n>t;t++)
e=d[t],"button"===e.kind&&i.push(e);return i}(),_=function(){var t,n,i;for(i=[],
t=0,n=d.length;n>t;t++)e=d[t],"button"!==e.kind&&i.push(e);return i}(),i=ot.tmpl
("global_actions_tmpl",{context:this,standard_actions:n.concat(_),secondary_acti
ons:function(){var e,t,n;for