PageSourceSearch

https://gw.shikoku-zei.or.jp/assets/colorbox.js

js shikoku-zei.or.jp collected 2026-10-05 09:34:18 UTC 12,183 bytes, 5 lines download raw bytes

1/*! For license information please see colorbox.js.LICENSE.txt */
2
3(()=>{var t={4581:()=>{!function(t,e,i){var o,n,r,h,a,s,c,l,d,g,u,f,p,m,w,x,b,v,y,T,C,E,H,k,W,I,M,L,F,R,S,K,P,B={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,(function(t,i){e[t]=i})),e},createIframe:function(){var i=e.createElement("iframe"),o=t(this).data("cbox-iframe-attrs");return"object"==typeof o&&t.each(o,(function(t,e){i[t]=e})),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},O="colorbox",_="cboxElement",j="cbox_load",D="cbox_complete",N="cbox_cleanup",z="cbox_closed",A="cbox_purge",q=t("<a/>"),U="div",$=0,G={};function Q(i,o,n){var r=e.createElement(i);return o&&(r.id="cbox"+o),n&&(r.style.cssText=n),t(r)}function J(){return i.innerHeight?i.innerHeight:t(i).height()}function V(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var o;return void 0===this.cache[e]&&(void 0!==(o=t(this.el).attr("data-cbox-"+e))?this.cache[e]=o:void 0!==i[e]?this.cache[e]=i[e]:void 0!==B[e]&&(this.cache[e]=B[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function X(t){var e=d.length,i=(I+t)%e;return i<0?e+i:i}function Y(t,e){return Math.round((/%/.test(t)?("x"===e?g.width():J())/100:1)*parseInt(t,10))}function Z(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function tt(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function et(t){"contains"in n[0]&&!n[0].contains(t.target)&&t.target!==o[0]&&(t.stopPropagation(),n.focus())}function it(t){it.str!==t&&(n.add(o).removeClass(it.str).addClass(t),it.str=t)}function ot(i){t(e).trigger(i),q.triggerHandler(i)}var nt=function(){var t,e,i="cboxSlideshow_",o="click.cbox";function r(){clearTimeout(e)}function h(){(C.get("loop")||d[I+1])&&(r(),e=setTimeout(K.next,C.get("slideshowSpeed")))}function a(){x.html(C.get("slideshowStop")).unbind(o).one(o,s),q.bind(D,h).bind(j,r),n.removeClass(i+"off").addClass(i+"on")}function s(){r(),q.unbind(D,h).unbind(j,r),x.html(C.get("slideshowStart")).unbind(o).one(o,(function(){K.next(),a()})),n.removeClass(i+"on").addClass(i+"off")}function c(){t=!1,x.hide(),r(),q.unbind(D,h).unbind(j,r),n.removeClass(i+"off "+i+"on")}return function(){t?C.get("slideshow")||(q.unbind(N,c),c()):C.get("slideshow")&&d[1]&&(t=!0,q.one(N,c),C.get("slideshowAuto")?a():s(),x.show())}}();function rt(r){var g,w;if(!R){if(g=t(r).data(O),C=new V(r,g),w=C.get("rel"),I=0,w&&!1!==w&&"nofollow"!==w?(d=t(".cboxElement").filter((function(){return new V(this,t.data(this,O)).get("rel")===w})),-1===(I=d.index(C.el))&&(d=d.add(C.el),I=d.length-1)):d=t(C.el),!L){L=F=!0,it(C.get("className")),n.css({visibility:"hidden",display:"block",opacity:""}),u=Q(U,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),h.css({width:"",height:""}).append(u),E=a.height()+l.height()+h.outerHeight(!0)-h.height(),H=s.width()+c.width()+h.outerWidth(!0)-h.width(),k=u.outerHeight(!0),W=u.outerWidth(!0);var x=Y(C.get("initialWidth"),"x"),b=Y(C.get("initialHeight"),"y"),v=C.get("maxWidth"),P=C.get("maxHeight");C.w=Math.max((!1!==v?Math.min(x,Y(v,"x")):x)-W-H,0),C.h=Math.max((!1!==P?Math.min(b,Y(P,"y")):b)-k-E,0),u.css({width:"",height:C.h}),K.position(),ot("cbox_open"),C.get("onOpen"),T.add(m).hide(),n.focus(),C.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",et,!0),q.one(z,(function(){e.removeEventListener("focus",et,!0)}))),C.get("returnFocus")&&q.one(z,(function(){t(C.el).focus()}))}var B=parseFloat(C.get("opacity"));o.css({opacity:B==B?B:"",cursor:C.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),C.get("closeButton")?y.html(C.get("close")).appendTo(h):y.appendTo("<div/>"),function(){var e,o,n,r=K.prep,h=++$;if(F=!0,M=!1,ot(A),ot(j),C.get("onLoad"),C.h=C.get("height")?Y(C.get("height"),"y")-k-E:C.get("innerHeight")&&Y(C.get("innerHeight"),"y"),C.w=C.get("width")?Y(C.get("width"),"x")-W-H:C.get("innerWidth")&&Y(C.get("innerWidth"),"x"),C.mw=C.w,C.mh=C.h,C.get("maxWidth")&&(C.mw=Y(C.get("maxWidth"),"x")-W-H,C.mw=C.w&&C.w<C.mw?C.w:C.mw),C.get("maxHeight")&&(C.mh=Y(C.get("maxHeight"),"y")-k-E,C.mh=C.h&&C.h<C.mh?C.h:C.mh),e=C.get("href"),S=setTimeout((function(){p.show()}),100),C.get("inline")){var a=t(e).eq(0);n=t("<div>").hide().insertBefore(a),q.one(A,(function(){n.replaceWith(a)})),r(a)}else C.get("iframe")?r(" "):C.get("html")?r(C.get("html")):Z(C,e)?(e=tt(C,e),M=C.get("createImg"),t(M).addClass("cboxPhoto").bind("error.cbox",(function(){r(Q(U,"Error").html(C.get("imgError")))})).one("load",(function(){h===$&&setTimeout((function(){var e;C.get("retinaImage")&&i.devicePixelRatio>1&&(M.height=M.height/i.devicePixelRatio,M.width=M.width/i.devicePixelRatio),C.get("scalePhotos")&&(o=function(){M.height-=M.height*e,M.width-=M.width*e},C.mw&&M.width>C.mw&&(e=(M.width-C.mw)/M.width,o()),C.mh&&M.height>C.mh&&(e=(M.height-C.mh)/M.height,o())),C.h&&(M.style.marginTop=Math.max(C.mh-M.height,0)/2+"px"),d[1]&&(C.get("loop")||d[I+1])&&(M.style.cursor="pointer",t(M).bind("click.cbox",(function(){K.next()}))),M.style.width=M.width+"px",M.style.height=M.height+"px",r(M)}),1)})),M.src=e):e&&f.load(e,C.get("data"),(function(e,i){h===$&&r("error"===i?Q(U,"Error").html(C.get("xhrError")):t(this).contents())}))}()}}function ht(){n||(P=!1,g=t(i),n=Q(U).attr({id:O,class:!1===t.support.opacity?"cboxIE":"",role:"dialog",tabindex:"-1"}).hide(),o=Q(U,"Overlay").hide(),p=t([Q(U,"LoadingOverlay")[0],Q(U,"LoadingGraphic")[0]]),r=Q(U,"Wrapper"),h=Q(U,"Content").append(m=Q(U,"Title"),w=Q(U,"Current"),v=t('<button type="button"/>').attr({id:"cboxPrevious"}),b=t('<button type="button"/>').attr({id:"cboxNext"}),x=t('<button type="button"/>').attr({id:"cboxSlideshow"}),p),y=t('<button type="button"/>').attr({id:"cboxClose"}),r.append(Q(U).append(Q(U,"TopLeft"),a=Q(U,"TopCenter"),Q(U,"TopRight")),Q(U,!1,"clear:left").append(s=Q(U,"MiddleLeft"),h,c=Q(U,"MiddleRight")),Q(U,!1,"clear:left").append(Q(U,"BottomLeft"),l=Q(U,"BottomCenter"),Q(U,"BottomRight"))).find("div div").css({float:"left"}),f=Q(U,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),T=b.add(v).add(w).add(x)),e.body&&!n.parent().length&&t(e.body).append(o,n.append(r,f))}t.colorbox||(t(ht),(K=t.fn.colorbox=t.colorbox=function(i,r){var h=this;return i=i||{},t.isFunction(h)&&(h=t("<a/>"),i.open=!0),h[0]?(ht(),function(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),rt(this))}return!!n&&(P||(P=!0,b.click((function(){K.next()})),v.click((function(){K.prev()})),y.click((function(){K.close()})),o.click((function(){C.get("overlayClose")&&K.close()})),t(e).bind("keydown.cbox",(function(t){var e=t.keyCode;L&&C.get("escKey")&&27===e&&(t.preventDefault(),K.close()),L&&C.get("arrowKey")&&d[1]&&!t.altKey&&
3(37===e?(t.preventDefault(),v.click()):39===e&&(t.preventDefault(),b.click()))})),t.isFunction(t.fn.on)?t(e).on("click.cbox",".cboxElement",i):t(".cboxElement").live("click.cbox",i)),!0)}()&&(r&&(i.onComplete=r),h.each((function(){var e=t.data(this,O)||{};t.data(this,O,t.extend(e,i))})).addClass(_),new V(h[0],i).get("open")&&rt(h[0])),h):h}).position=function(e,i){var o,d,u,f=0,p=0,m=n.offset();function w(){a[0].style.width=l[0].style.width=h[0].style.width=parseInt(n[0].style.width,10)-H+"px",h[0].style.height=s[0].style.height=c[0].style.height=parseInt(n[0].style.height,10)-E+"px"}if(g.unbind("resize.cbox"),n.css({top:-9e4,left:-9e4}),d=g.scrollTop(),u=g.scrollLeft(),C.get("fixed")?(m.top-=d,m.left-=u,n.css({position:"fixed"})):(f=d,p=u,n.css({position:"absolute"})),!1!==C.get("right")?p+=Math.max(g.width()-C.w-W-H-Y(C.get("right"),"x"),0):!1!==C.get("left")?p+=Y(C.get("left"),"x"):p+=Math.round(Math.max(g.width()-C.w-W-H,0)/2),!1!==C.get("bottom")?f+=Math.max(J()-C.h-k-E-Y(C.get("bottom"),"y"),0):!1!==C.get("top")?f+=Y(C.get("top"),"y"):f+=Math.round(Math.max(J()-C.h-k-E,0)/2),n.css({top:m.top,left:m.left,visibility:"visible"}),r[0].style.width=r[0].style.height="9999px",o={width:C.w+W+H,height:C.h+k+E,top:f,left:p},e){var x=0;t.each(o,(function(t){o[t]===G[t]||(x=e)})),e=x}G=o,e||n.css(o),n.dequeue().animate(o,{duration:e||0,complete:function(){w(),F=!1,r[0].style.width=C.w+W+H+"px",r[0].style.height=C.h+k+E+"px",C.get("reposition")&&setTimeout((function(){g.bind("resize.cbox",K.position)}),1),t.isFunction(i)&&i()},step:w})},K.resize=function(t){var e;L&&((t=t||{}).width&&(C.w=Y(t.width,"x")-W-H),t.innerWidth&&(C.w=Y(t.innerWidth,"x")),u.css({width:C.w}),t.height&&(C.h=Y(t.height,"y")-k-E),t.innerHeight&&(C.h=Y(t.innerHeight,"y")),t.innerHeight||t.height||(e=u.scrollTop(),u.css({height:"auto"}),C.h=u.height()),u.css({height:C.h}),e&&u.scrollTop(e),K.position("none"===C.get("transition")?0:C.get("speed")))},K.prep=function(i){if(L){var o,r="none"===C.get("transition")?0:C.get("speed");u.remove(),(u=Q(U,"LoadedContent").append(i)).hide().appendTo(f.show()).css({width:(C.w=C.w||u.width(),C.w=C.mw&&C.mw<C.w?C.mw:C.w,C.w),overflow:C.get("scrolling")?"auto":"hidden"}).css({height:(C.h=C.h||u.height(),C.h=C.mh&&C.mh<C.h?C.mh:C.h,C.h)}).prependTo(h),f.hide(),t(M).css({float:"none"}),it(C.get("className")),o=function(){var i,o,h=d.length;function a(){!1===t.support.opacity&&n[0].style.removeAttribute("filter")}L&&(o=function(){clearTimeout(S),p.hide(),ot(D),C.get("onComplete")},m.html(C.get("title")).show(),u.show(),h>1?("string"==typeof C.get("current")&&w.html(C.get("current").replace("{current}",I+1).replace("{total}",h)).show(),b[C.get("loop")||I<h-1?"show":"hide"]().html(C.get("next")),v[C.get("loop")||I?"show":"hide"]().html(C.get("previous")),nt(),C.get("preloading")&&t.each([X(-1),X(1)],(function(){var i=d[this],o=new V(i,t.data(i,O)),n=o.get("href");n&&Z(o,n)&&(n=tt(o,n),e.createElement("img").src=n)}))):T.hide(),C.get("iframe")?(i=C.get("createIframe"),C.get("scrolling")||(i.scrolling="no"),t(i).attr({src:C.get("href"),class:"cboxIframe"}).one("load",o).appendTo(u),q.one(A,(function(){i.src="//about:blank"})),C.get("fastIframe")&&t(i).trigger("load")):o(),"fade"===C.get("transition")?n.fadeTo(r,1,a):a())},"fade"===C.get("transition")?n.fadeTo(r,0,(function(){K.position(0,o)})):K.position(r,o)}},K.next=function(){!F&&d[1]&&(C.get("loop")||d[I+1])&&(I=X(1),rt(d[I]))},K.prev=function(){!F&&d[1]&&(C.get("loop")||I)&&(I=X(-1),rt(d[I]))},K.close=function(){L&&!R&&(R=!0,L=!1,ot(N),C.get("onCleanup"),g.unbind(".cbox"),o.fadeTo(C.get("fadeOut")||0,0),n.stop().fadeTo(C.get("fadeOut")||0,0,(function(){n.hide(),o.hide(),ot(A),u.remove(),setTimeout((function(){R=!1,ot(z),C.get("onClosed")}),1)})))},K.remove=function(){n&&(n.stop(),t.colorbox.close(),n.stop(!1,!0).remove(),o.remove(),R=!1,n=null,t(".cboxElement").removeData(O).removeClass(_),t(e).unbind("click.cbox").unbind("keydown.cbox"))},K.element=function(){return t(C.el)},K.settings=B)}(jQuery,document,window)}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,i),r.exports}(()=>{"use strict";i(4581)})()})();
4//# sourceMappingURL=colorbox.js.map
5;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.