;(function (window, document, $, moment, undefined){
'use strict';
var INTERVAL_NONE='none';
var INTERVAL_DAILY='daily';
var INTERVAL_MONTHLY='monthly';
function pad(number, width, pad){
var _number='' + number;
var _width=width||2;
var _pad=pad||'0';
return (_number.length >=width) ? _number:Array.apply(null, Array(_width - _number.length + 1)).join(_pad) + _number;
}
var CountDownTimer=(function (){
function Counter($element, expiredAtString, interval, invert){
var now=moment();
var expiredAt=moment(expiredAtString);
var _expiredAt;
this._$element=$element;
this._interval=interval;
this._invert   = !!invert;
switch (this._interval){
case INTERVAL_DAILY:
_expiredAt=expiredAt.clone();
_expiredAt.year(now.year());
_expiredAt.month(now.month());
_expiredAt.date(now.date());
break;
case INTERVAL_MONTHLY:
_expiredAt=expiredAt.clone();
_expiredAt.year(now.year());
_expiredAt.month(now.month());
break;
case INTERVAL_NONE:
default:
_expiredAt=expiredAt.clone();
break;
}
this._expiredAt=_expiredAt;
this._timerId=null;
}
Counter.prototype._updateTimer=function (timer){
var $itemDay=this._$element.find('[data-st-countdown-item-day]');
var $countDay=this._$element.find('[data-st-countdown-count-day]');
var $countHour=this._$element.find('[data-st-countdown-count-hour]');
var $countMinute=this._$element.find('[data-st-countdown-count-minute]');
var $countSecond=this._$element.find('[data-st-countdown-count-second]');
var $countMs=this._$element.find('[data-st-countdown-count-ms]');
if($itemDay.length){
if(timer.day > 0){
$itemDay.show();
}else{
$itemDay.hide();
}}
if($countDay.length){
$countDay.text(timer.day);
}
if($countHour.length){
$countHour.text(pad(timer.hour));
}
if($countMinute.length){
$countMinute.text(pad(timer.minute));
}
if($countSecond.length){
$countSecond.text(pad(timer.second));
}
if($countMs.length){
$countMs.text(pad(timer.ms));
}};
Counter.prototype.onTick=function (){
var now=moment();
var diff=this._expiredAt.diff(now);
var $expired=this._$element.find('[data-st-countdown-expired]');
var timer={
day:Math.max(0, Math.floor(diff / (24 * 60 * 60 * 1000))),
hour:Math.max(0, Math.floor((diff % (24 * 60 * 60 * 1000)) / (60 * 60 * 1000))),
minute: Math.max(0, Math.floor((diff % (24 * 60 * 60 * 1000)) / (60 * 1000)) % 60),
second: Math.max(0, Math.floor((diff % (24 * 60 * 60 * 1000)) / 1000) % 60 % 60),
ms:Math.max(0, Math.floor((diff % (24 * 60 * 60 * 1000)) / 10) % 100)
};
this._updateTimer(timer);
if(diff > 0){
this._$element.removeClass('is-expired')
.addClass('is-active');
if(this._invert){
$expired.show();
}else{
$expired.hide();
}
return true;
}
switch (this._interval){
case INTERVAL_DAILY:
this._expiredAt=this._expiredAt.clone().add(1, 'day');
return true;
case INTERVAL_MONTHLY:
this._expiredAt=this._expiredAt.clone().add(1, 'month');
return true;
case INTERVAL_NONE:
default:
this._$element.removeClass('is-active')
.addClass('is-expired');
if(this._invert){
$expired.hide();
}else{
$expired.show();
}
break;
}
return false;
};
Counter.prototype.initialize=function (){
var self=this;
(function tick(interval){
var nextTick;
clearTimeout(self._timerId);
nextTick=self.onTick();
if(nextTick){
self._timerId=setTimeout(function (){
tick(interval)
}, interval);
}}(10));
};
return Counter;
}());
function onReady(){
var timers=[];
$('[data-st-countdown]').each(function (){
var $element=$(this);
var expiredAt=$element.attr('data-st-countdown-expired-at');
var interval=$element.attr('data-st-countdown-interval')||INTERVAL_NONE;
var invert=($element.attr('data-st-countdown-invert')==='true');
if(typeof expiredAt==='undefined'){
return;
}
var timer=new CountDownTimer($element, expiredAt, interval, invert);
timers.push(timer);
timer.initialize();
});
return timers;
}
$(onReady);
}(window, window.document, jQuery, moment));
;(function (window, document, $, ST, undefined){
'use strict';
var LoadMore=(function (){
function LoadMore($element){
var self=this;
this._$element=$element;
this._$state=$();
this._handlers={
onClick: function (event){
self.onClick(event);
}};}
LoadMore.prototype.update=function (data){
var $html;
var $content;
var $target;
this._$element.data('st-load-more', data.options);
$html=$(data.html);
$content=$html.find('[data-st-load-more-content]')
.addBack()
.filter('[data-st-load-more-content]');
$content=$content.length ? $content.children():$html;
$target=$('[data-st-load-more-id="' + this._$element.attr('data-st-load-more-controls') + '"]');
if($target.length){
$target.append($content);
}
if(!data.has_next){
this.removeEventListeners();
this._$element.remove();
}};
LoadMore.prototype.onClick=function (event){
var self=this;
var data;
event.preventDefault();
event.stopImmediatePropagation();
self._$element.prop('disabled', true);
self._$state.addClass('is-loading');
data=self._$element.data('st-load-more');
$.ajax({
url:ST.ajax_url,
headers: {
'X-Requested-With': 'XMLHttpRequest'
},
type:'GET',
data:data
})
.done(function (response){
if(!response.success){
return;
}
self.update(response.data);
})
.fail(function (jqXHR, textStatus, errorThrown){
})
.always(function (){
self._$state.removeClass('is-loading');
self._$element.prop('disabled', false);
});
};
LoadMore.prototype.prepareStateImage=function (){
var state;
var $state;
var $img;
state=(this._$element.attr('data-st-load-more-loading-img')||'').trim();
if(state===''){
return;
}
$img=$('<img />', {src: state});
$state=$('<div></div>', {'class': 'load-more-state'})
.append($img);
this._$element.after($state);
this._$state=$state;
};
LoadMore.prototype.addEventListeners=function (){
this._$element.on('click', this._handlers.onClick);
};
LoadMore.prototype.removeEventListeners=function (){
this._$element.off('click', this._handlers.onClick);
};
LoadMore.prototype.initialize=function (){
this.prepareStateImage();
this.addEventListeners();
};
return LoadMore;
}());
function onReady(){
var loadMores=[];
$('[data-st-load-more]').each(function (){
var $element=$(this);
var loadMore=new LoadMore($element);
loadMores.push(loadMore);
loadMore.initialize();
});
}
$(onReady);
}(window, window.document, jQuery, ST));
(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.jQuery;var n,o=t.n(e);!function(t){t.ST_TOC=t.ST_TOC||{}}(window,window.document),window,window.document,(n=ST_TOC).POSITIONS=n.POSITIONS||{BEFORE_FIRST_HEADING:1,AFTER_FIRST_HEADING:2,TOP:3,BOTTOM:4},function(t,e,n){n.Css=n.Css||{escapeSelector:function(t){return(t||"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,(function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}))}}}(window,window.document,ST_TOC),function(t,e,n){n.RegExp=n.RegExp||{quote:function(t){return(t+"").replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}}}(window,window.document,ST_TOC),function(t,e,n,o){const i=function(){function t(t,e){this._uri=t,this._prefix=e||"",this._nonce=""}return t.prototype.setNonce=function(t){this._nonce=t},t.prototype.track=function(t,e,o){const i=o||{};let s={action:this._prefix+"track_click",post_id:t,index:e.index(),level:e.level(),text:e.text(),nonce:this._nonce};return s=n.extend({},i,s),n.ajax({url:this._uri,type:"POST",data:s})},t}();o.Tracker=o.Tracker||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){}return t.prototype.setNonce=function(t){},t.prototype.track=function(t,e,o){return n.Deferred().resolve().promise()},t}();o.NullTracker=o.NullTracker||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=!(!history||!history.pushState),s=function(){function o(t,e){this._speed=t,this._fixedElementSelector=e}return o.prototype._getOffsetAdjustment=function(){let t=16;const e=n("#wpadminbar"),o=n(this._fixedElementSelector);return e.length&&"fixed"===e.css("position")&&(t+=e.height()),o.length&&"fixed"===o.css("position")&&(t+=o.height()),t},o.prototype.scrollTo=function(o,s,r,c,a){const l=this,d=s.offset().top-l._getOffsetAdjustment(),p=void 0!==c?c:l._speed,h=null==a||a;return r&&i&&history.pushState({},e.title,location.pathname+"#"+o),n("html, body").animate({scrollTop:d},p).promise().then((function(){setTimeout((function(){h&&n(t).scrollTop()!==s.offset().top-l._getOffsetAdjustment()&&l.scrollTo(o,s,!1,c,!1)}),200)}))},o}();o.Scroller=o.Scroller||s}(window,window.document,jQuery,ST_TOC),function(t,e,n){const o=function(){function t(t,e){this._accepted={}||t,this._rejected={}||e}return t.prototype.accepted=function(){return this._accepted},t.prototype.acceptedSelector=function(t){let e=[];if(void 0!==t)e=this._accepted[t]||[];else for(const t in this._accepted)Object.prototype.hasOwnProperty.call(this._accepted,t)&&(e=e.concat(this._accepted[t]));return e.join(",")},t.prototype.rejected=function(){return this._rejected},t.prototype.rejectedSelector=function(t){let e=[];if(void 0!==t)e=this._rejected[t]||[];else for(const t in this._rejected)Object.prototype.hasOwnProperty.call(this._rejected,t)&&(e=e.concat(this._rejected[t]));return e.join(",")},t.prototype.accept=function(t,e){let n;void 0===this._accepted[t]&&(this._accepted[t]=[]),n=Array.isArray(e)?e:[e],this._accepted[t]=this._accepted[t].concat(n).filter((function(t){return""!==t}))},t.prototype.reject=function(t,e){let n;void 0===this._rejected[t]&&(this._rejected[t]=[]),n=Array.isArray(e)?e:[e],this._rejected[t]=this._rejected[t].concat(n).filter((function(t){return""!==t}))},t}();n.HeadingRule=n.HeadingRule||o}(window,window.document,ST_TOC),function(t,e,n){const o=function(){function t(t,e){const n={1:["h1"].concat(t[1]),2:["h2"].concat(t[2]),3:["h3"].concat(t[3]),4:["h4"].concat(t[4]),5:["h5"].concat(t[5]),6:["h6"].concat(t[6])},o={1:[].concat(e[1]),2:[].concat(e[2]),3:[].concat(e[3]),4:[].concat(e[4]),5:[].concat(e[5]),6:[].concat(e[6])};this._acceptedSelectors=n,this._rejectedSelectors=o}return t.prototype.create=function(t){const e=this,o=new n.HeadingRule;return t.forEach((function(t){o.accept(t,e._acceptedSelectors[t]),o.reject(t,e._rejectedSelectors[t])})),o},t}();n.HeadingRuleFactory=n.HeadingRuleFactory||o}(window,window.document,ST_TOC),function(t,e,n){n.MARKER_ELEMENT_POSITIONS=n.MARKER_ELEMENT_POSITIONS||{NONE:0,BEFORE_MARKER:1,AFTER_MARKER:2}}(window,window.document,ST_TOC),function(t,e,n){const i=function(){function t(t,e,n){this._$element=t,this._position=e,this._options=o().extend({},{classes:{}},n)}return t.POSITIONS={},t.prototype.$element=function(){return this._$element},t.prototype.exists=function(){return this._$element.length&&this._position!==n.MARKER_ELEMENT_POSITIONS.NONE},t.prototype.isBeforeMarker=function(){return this._position===n.MARKER_ELEMENT_POSITIONS.BEFORE_MARKER},t.prototype.isAfterMarker=function(){return this._position===n.MARKER_ELEMENT_POSITIONS.AFTER_MARKER},t.prototype.options=function(){return this._options},t}();n.MarkerElement=n.MarkerElement||i}(window,window.document,ST_TOC),function(t,e,n,o){const i=function(){function t(t){this._marker=t}return t.prototype.find=function(t){let e=null;const i=t.children().first();let s=new o.MarkerElement(n(),o.MARKER_ELEMENT_POSITIONS.NONE);const r=new RegExp(`^s*${o.RegExp.quote(this._marker)}s*`);return t.contents().each((function(t,c){if(c.nodeType===Node.ELEMENT_NODE)e=c;else if(c.nodeType===Node.COMMENT_NODE&&r.test(c.nodeValue)){const t=c.nodeValue.replace(r,"");let a;try{a=JSON.parse(t)}catch(t){a={}}return s=null!==e?new o.MarkerElement(n(e),o.MARKER_ELEMENT_POSITIONS.BEFORE_MARKER,a):new o.MarkerElement(i,o.MARKER_ELEMENT_POSITIONS.AFTER_MARKER,a),!1}return!0})),s},t}();o.MarkerFinder=o.MarkerFinder||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(t){}return t.prototype.find=function(t,e){return t.find(e.acceptedSelector()).not(e.rejectedSelector())},t}();o.ContentHeadingFinder=o.ContentHeadingFinder||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(t){this._markerElement=t}return t.prototype.find=function(t,e){return this._markerElement.isAfterMarker()?t.find(e.acceptedSelector()).not(e.rejectedSelector()):this._markerElement.$element().nextAll().find(e.acceptedSelector()).addBack().filter(e.acceptedSelector()).not(e.rejectedSelector())},t}();o.PartialHeadingFinder=o.PartialHeadingFinder||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(t,e,n,o){this._index=t,this._depth=0,this._level=e,this._text=n,this._$element=o,this._children=[]}return t.prototype.index=function(){return this._index},t.prototype.depth=function(t){return void 0===t||(this._depth=t),this._depth},t.prototype.level=function(){return this._level},t.prototype.text=function(){return this._text},t.prototype.$element=function(){return this._$element},t.prototype.children=function(){return this._children},t.prototype.hasChild=function(){return!!this._children.length},t.prototype.addChild=function(t){this._children.push(n.extend({},t))},t}();o.TocListItem=o.TocListItem||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){this._items=[]}return t.prototype.items=function(){return this._items},t.prototype.addItem=function(t){this._items.push(n.extend({},t))},t.prototype.fragments=function(t){return void 0===t?this._fragments:this._fragments=n.extend({},t)},t}();o.TocList=o.Toclist||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){this._fragments={}}return t.prototype._generateItems=function(t,e,i){let s,r;const c=[];let a=0;return s={1:e.acceptedSelector(1),2:e.acceptedSelector(2),3:e.acceptedSelector(3),4:e.acceptedSelector(4),5:e.acceptedSelector(5),6:e.acceptedSelector(6)},r={1:e.rejectedSelector(1),2:e.rejectedSelector(2),3:e.rejectedSelector(3),4:e.rejectedSelector(4),5:e.rejectedSelector(5),6:e.rejectedSelector(6)},t.each((function(t,e){const l=n(e);let d,p,h,_;for(let t=1;t<=6;t++)d=l.filter(s[t]).not(r[t]).length,d&&(h=l.attr("data-"+i.prefix+"h"),h=void 0!==h?h.trim():"",_=""!==h?h:l.clone().find(".st-h-copy").addBack().filter(".st-h-copy").remove().end().end().end().text(),p=new o.TocListItem(a,t,_,l),c.push(p),a++)})),c},t.prototype._generateFragmentMap=function(t){const e={};return t.forEach((function(t){e[t.index()+1]=t})),e},t.prototype._generateList=function(t){const e=Array.prototype.slice.call(t),n=[],i=new o.TocList;return e.forEach((function(t){let e;if(!n.length)return t.depth(0),i.addItem(t),void n.push(t);if(e=n[n.length-1],t.level()>e.level())t.depth(n.length),e.addChild(t);else{do{e=n.pop()}while(n.length&&t.level()<=e.level());n.length||t.level()>e.level()?(t.depth(n.length+1),e.addChild(t),n.push(e)):(t.depth(0),i.addItem(t))}n.push(t)})),i},t.prototype.generate=function(t,e,n){const o=this._generateItems(t,e,n),i=this._generateList(o);return i.fragments(this._generateFragmentMap(o)),i},t}();o.TocListGenerator=o.TocListGenerator||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){}return t.prototype._renderItem=function(t,e){const o=this;let i,s,r;const c=[];return r={href:"#"+e.fragId+"-"+(t.index()+1)},r["data-"+e.prefix+"item"]="",i=n("<a>",r).text(t.text()).data(e.prefix+"item",t),s=n("<li>").append(i),c.push(s),t.hasChild()&&t.children().forEach((function(t){c.push(o._renderItem(t,e))})),n(n.map(c,(function(t){return t.get()})))},t.prototype.render=function(t,e){const o=this;let i,s,r,c;const a=[];let l;return t.items().length?(s={list:"toc-list"},r={prefix:"toc-",fragId:"toc-h",expanded:!1,classes:{}},i=n.extend({},r,e),i.classes=n.extend({},s,e.classes),t.items().forEach((function(t){a.push(o._renderItem(t,i))})),c={class:i.classes.list},c["data-"+i.prefix+"list"]="",l=n("<ul>",c).append(a).data(i.prefix+"list",t),i.expanded||l.hide(),l):n()},t}();o.FlatTocListRenderer=o.FlatTocListRenderer||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){}return t.prototype._renderItem=function(t,e){const o=this;let i,s,r,c;return r={href:"#"+e.fragId+"-"+(t.index()+1)},r["data-"+e.prefix+"item"]="",i=n("<a>",r).text(t.text()).data(e.prefix+"item",t),s=n("<li>").append(i),t.hasChild()&&(c=n("<ul>"),t.children().forEach((function(t){c.append(o._renderItem(t,e))})),s.append(c)),s},t.prototype.render=function(t,e){const o=this;let i,s,r,c;const a=[];let l;return t.items().length?(s={list:"toc-list"},r={prefix:"toc-",fragId:"toc-h",expanded:!1,classes:{}},i=n.extend({},r,e),i.classes=n.extend({},s,e.classes),t.items().forEach((function(t){a.push(o._renderItem(t,i))})),c={class:i.classes.list},c["data-"+i.prefix+"list"]="",l=n("<ul>",c).append(a).data(i.prefix+"list",t),i.expanded||l.hide(),l):n()},t}();o.HierarchicalTocListRenderer=o.HierarchicalTocListRenderer||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(t){this._markerElement=t}return t.prototype.render=function(t,e,i){let s,r,c,a,l,d,p,h,_,u,f;r={container:"",close:"is-closed",hierarchical:"is-hierarchical"},c={prefix:"toc-",id:"toc-container",position:o.POSITIONS.BEFORE_FIRST_HEADING,expandable:!0,expanded:!1,hierarchical:!0,wrapper:"",classes:{},ignoredSelectorBeforeHeading:"",ignoredSelectorAfterHeading:""},s=n.extend({},c,i),s.classes=n.extend({},r,i.classes),s.expanded=!s.expandable||s.expandable&&s.expanded,l=s.hierarchical?s.classes.hierarchical:"",l+=s.expanded?"":" "+s.classes.close,a={id:s.id,class:l},a["data-"+s.prefix+"container"]="",d=n("<div>",a),d.addClass(s.classes.container),h="[data-"+s.prefix+"wrapper]";try{p=n(s.wrapper)}catch(t){p=n()}if(_=p.find(h).addBack().filter(h),_.length&&(_.append(d),d=p),this._markerElement.exists())return this._markerElement.isAfterMarker()?d.prependTo(t):this._markerElement.$element().after(d),d;switch(s.position){case o.POSITIONS.AFTER_FIRST_HEADING:for(u=e.eq(0),f=u.next();f.filter(s.ignoredSelectorBeforeHeading).length;)u=f,f=u.next();u.after(d);break;case o.POSITIONS.TOP:t.children().first().before(d);break;case o.POSITIONS.BOTTOM:t.children().last().after(d);break;case o.POSITIONS.BEFORE_FIRST_HEADING:default:for(u=e.eq(0),f=u.prev();f.filter(s.ignoredSelectorBeforeHeading).length;)u=f,f=u.prev();u.before(d)}return d},t}();o.TocContainerRenderer=o.TocContainerRenderer||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function t(){}return t.prototype.render=function(t){let e,o,i,s,r,c,a;return o={back:"back"},i={prefix:"toc-",classes:{},containerId:"toc-container",label:"目次へ"},e=n.extend({},i,t),e.classes=n.extend({},o,t.classes),s=n("<span></span>",{class:"st_toc_back_icon","aria-hidden":!0}),r=n("<span></span>",{class:"st_toc_back_label"}).text(e.label),c={href:"#"+e.containerId,class:e.classes.back},c["data-"+e.prefix+"back"]="",a=n("<a></a>",c).append(s).append(r),a},t}();o.BackButtonRenderer=o.BackButtonRenderer||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){const i=function(){function e(t,e){let i,s,r,c;i={uri:"",prefix:"",postId:null,nonce:""},s={show:"表示",hide:"非表示"},r={container:"toc-container",close:"is-closed",hierarchical:"is-hierarchical",flat:"is-flat",title:"toc-title",toggle:"toc-toggle",list:"toc-list"},c={prefix:"toc-",fragId:"toc-h",threshold:2,marker:"",acceptedSelectors:[],rejectedSelectors:[],targetLevels:[1,2,3,4,5,6],smoothScroll:!1,trackable:!1,tracker:{},containerId:"toc-container",wrapper:"",position:o.POSITIONS.BEFORE_FIRST_HEADING,showTitle:!0,title:"",expandable:!0,labels:{},expanded:!1,hierarchical:!0,classes:{},fixedElementSelector:""},this._$content=t,this._options=n.extend({},c,e),this._options.tracker=n.extend({},i,e.tracker||{}),this._options.labels=n.extend({},s,e.labels||{}),this._options.classes=n.extend({},r,e.classes||{}),this._options.expandable=this._options.showTitle&&this._options.expandable,this._options.expanded=!this._options.expandable||this._options.expandable&&this._options.expanded,this._tracker=null,this._scroller=null,this._headingRuleFactory=null,this._headingRule=null,this._markerFinder=null,this._markerElement=new o.MarkerElement(n(),o.MARKER_ELEMENT_POSITIONS.NONE),this._headingFinder=null,this._$headings=n(),this._tocListGenerator=null,this._tocContainerRenderer=null,this._tocListRenderer=null,this._backButtonRenderer=null,this._tocList=null}return e.prototype._configure=function(){this._tracker=this._options.trackable?new o.Tracker(this._options.tracker.uri,this._options.tracker.prefix):new o.NullTracker,this._tracker.setNonce(this._options.tracker.nonce),this._scroller=new o.Scroller(this._options.smoothScroll?"normal":0,this._options.fixedElementSelector),this._headingRuleFactory=new o.HeadingRuleFactory(this._options.acceptedSelectors,this._options.rejectedSelectors),this._headingRule=this._headingRuleFactory.create(this._options.targetLevels),this._markerFinder=new o.MarkerFinder(this._options.marker),this._markerElement=this._markerFinder.find(this._$content),this._headingFinder=this._markerElement.exists()?new o.PartialHeadingFinder(this._markerElement):new o.ContentHeadingFinder,this._$headings=this._headingFinder.find(this._$content,this._headingRule),this._tocListGenerator=new o.TocListGenerator,this._tocContainerRenderer=new o.TocContainerRenderer(this._markerElement),this._tocListRenderer=this._options.hierarchical?new o.HierarchicalTocListRenderer:new o.FlatTocListRenderer,this._backButtonRenderer=new o.BackButtonRenderer,this._tocList=this._tocListGenerator.generate(this._$headings,this._headingRule,this._options)},e.prototype._createTitle=function(){let t,e,o,i,s,r,c;return this._options.showTitle?(t=n("<p>",{class:this._options.classes.title}).text(this._options.title),this._options.expandable?(i=this._options.expanded?this._options.labels.hide:this._options.labels.show,s=this._options.expanded?this._options.labels.show:this._options.labels.hide,c={class:this._options.classes.toggle},r={href:"#"},r["data-"+this._options.prefix+"toggle"]=s,e=n("<a>",r).text(i),o=n("<span>",c),o.append("[").append(e).append("]"),t.append(o),t):t):n()},e.prototype._createList=function(){return this._tocListRenderer.render(this._tocList,{fragId:this._options.fragId,prefix:this._options.prefix,expanded:this._options.expanded,classes:{list:this._options.classes.list}})},e.prototype._adjustFontSize=function(t,e){const o=[];t.find([".st_toc_title",".st_toc_toggle",".st_toc_toggle a",".st_toc_list",".st_toc_list ul",".st_toc_list li",".st_toc_list a"].join(",")).each((function(t,i){let s,r;n(this).css("font-size","").css("line-height",""),s=parseInt(getComputedStyle(i,null).getPropertyValue("font-size")),r=parseInt(getComputedStyle(i,null).getPropertyValue("line-height")),o.push({$element:n(this),style:{fontSize:s*e+"px",lineHeight:r*e+"px"}})})),o.forEach((function(t){t.$element.css(t.style)}))},e.prototype._createElements=function(){let t,e,o,i;const s="[data-"+this._options.prefix+"container]";let r;const c=this._markerElement.options();let a=`${this._options.classes.container} st_toc_style_${this._options.listStyle}`;a=void 0!==c.classes.container?`${a} ${c.classes.container}`:a,a=a.trim();const l={id:this._options.containerId,prefix:this._options.prefix,position:this._options.position,expandable:this._options.expandable,expanded:this._options.expanded,hierarchical:this._options.hierarchical,wrapper:this._options.wrapper,classes:{container:a,close:this._options.classes.close,hierarchical:this._options.classes.hierarchical},ignoredSelectorBeforeHeading:this._options.ignoredSelectorBeforeHeading,ignoredSelectorAfterHeading:this._options.ignoredSelectorAfterHeading};return t=this._tocContainerRenderer.render(this._$content,this._$headings,l),e=t.find(s).addBack().filter(s),o=this._createTitle(),i=this._createList(),i.find("li ul").length||e.addClass(this._options.classes.flat),e.append(o).append(i),null!==this._options.fontSize&&this._options.fontSize>0&&this._adjustFontSize(e,this._options.fontSize),this._options.showBackButton&&(r=this._backButtonRenderer.render({prefix:this._options.prefix,containerId:this._options.containerId,classes:{back:this._options.classes.back}}),n("body").append(r)),e},e.prototype.addEventListeners=function(){const e=this,o="data-"+e._options.prefix+"container",i="data-"+e._options.prefix+"toggle",s="data-"+e._options.prefix+"item",r="data-"+e._options.prefix+"back",c=n("["+o+"]");if(this._$toc.find("["+i+"]").on("click",(function(t){const s=n(this),r=s.closest("["+o+"]"),c="data-"+e._options.prefix+"list",a=r.find("["+c+"]"),l=s.text(),d=s.attr(i);t.preventDefault(),t.stopPropagation(),s.text(d).attr(i,l),a.slideToggle("fast"),r.toggleClass(e._options.classes.close)})),this._$toc.find("["+s+"]").on("click",(function(t){const o=n(this);let i,s;t.preventDefault(),t.stopPropagation(),i=o.data(e._options.prefix+"item"),s=i.$element(),e._tracker.track(e._options.tracker.postId,i),e._scroller.scrollTo(o.attr("href").slice(1),s,!0)})),n("["+r+"]").on("click",(function(t){let o;t.preventDefault(),t.stopPropagation(),o=n("#"+e._options.containerId),e._scroller.scrollTo(e._options.containerId,o)})),n(t).on("hashchange",(function(t){const n=location.hash.slice(1),o=e.get$fragment(n);o.length&&(t.preventDefault(),t.stopPropagation(),e._scroller.scrollTo(n,o))})),null!==e._options.fontSize&&e._options.fontSize>0){let o;n(t).on("orientationchange resize",(function(t){o&&clearTimeout(o),o=setTimeout((function(){e._adjustFontSize(c,e._options.fontSize)}),500)}))}n(t).on("scroll",(function(e){n(t).scrollTop()>400?n("["+r+"]").addClass("is-shown"):n("["+r+"]").removeClass("is-shown")}))},e.prototype.get$fragment=function(t){const e=n("[data-"+this._options.prefix+"list]");let i,s;return""!==t&&e.length?(i=e.data(this._options.prefix+"list").fragments(),s=t.replace(new RegExp("^"+o.RegExp.quote(this._options.fragId)+"-"),""),void 0===i[s]?n():i[s].$element()):n()},e.prototype.scrollToFragment=function(t,e,n){const o=this.get$fragment(t);o.length&&this._scroller.scrollTo(t,o,e,n)},e.prototype._handleSidebarToc=function(){const t=n("#st_toc_container"),e=n("#scrollad");if(!t.length||!e.length)return;if(e.find(".post.side_toc").length)return;const o=t.clone(!0);o.removeAttr("id"),o.attr("class",`${this._options.classes.container} st_toc_hierarchical st_toc_style_default st_toc_sidebar_toc side_toc_content`);const i=o.find(".st_toc_toggle");i.length&&i.remove();const s=o.find(".st_toc_list");s.length&&s.attr("style")&&s.removeAttr("style");const r=n("<div>",{class:"post side_toc"});r.append(o),e.append(r)},e.prototype._handleOverlayToc=function(){const t=this,e=n("#st_toc_container"),o=n(".st_toc_back");e.length&&o.length&&(o.find(".st_toc_back_label").text("目次"),o.off("click"),o.on("click",(function(o){o.preventDefault(),o.stopPropagation(),function(){if(n(".over_toc_wrapper").length)return;const o=n("<div>",{class:"over_toc_wrapper"}).css({background:"white",opacity:".95",position:"fixed",top:"0",left:"0",right:"0",bottom:"0","z-index":"99999"}),i=n("<div>",{class:"post over_toc"}).css({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%","max-width":"800px","max-height":"80%",overflow:"auto","box-sizing":"border-box",padding:"0 20px"}),s=n("<div>").css({"box-sizing":"border-box",padding:"25px",overflow:"auto"}),r=n("<button>",{text:"×"}).css({position:"absolute",top:"5px",right:"5px",color:"#333",border:"none","font-size":"3rem","line-height":"1",padding:"0 10px",cursor:"pointer","background-color":"transparent"}).on("click",(function(){o.remove()}));o.append(r);const c=e.clone(!0);c.removeAttr("id"),c.attr("class",`${t._options.classes.container} st_toc_hierarchical st_toc_style_default st_toc_overlay_toc over_toc_content`);const a=c.find(".st_toc_toggle");a.length&&a.remove();const l=c.find(".st_toc_list");l.length&&l.attr("style")&&l.removeAttr("style"),s.append(c),i.append(s),o.append(i),i.find("a").each((function(){n(this).on("click",(function(){o.remove()}))})),n("body").append(o)}()})).removeAttr("href"))},e.prototype._appendInlineStyles=function(){const t=n("<style>").html("\n        .st_toc_back {\n            cursor: pointer;\n        }\n\n        .over_toc .st_toc_container .st_toc_list > li > a {\n            font-weight: bold;\n        }\n\n        .side_toc .st_toc_container:not(.st_toc_contracted) .st_toc_title {\n            margin-bottom: 0;\n            color: #ccc;\n        }\n        \n        .side_toc .st_toc_container {\n            background: #fff;\n            max-height: 500px;\n            overflow: auto;\n        }\n        \n        .side_toc .st_toc_container.st_toc_style_default > ul > li,\n        .side_toc .st_toc_container ul, .post .st_toc_container ol {\n            list-style: none;\n        }\n\n        .side_toc ul li ul li {\n            list-style-type: decimal!important;\n        }\n        \n        .side_toc .st_toc_container.st_toc_style_default > ul > li > a {\n            font-weight: bold;\n        }\n        \n        @media only screen and (max-width: 959px){\n            .side_toc {\n                display: none;\n            }\n\t\t\t}");n("body").append(t)},e.prototype.initialize=function(){this._configure(),this._$headings.length<this._options.threshold||(this._$toc=this._createElements(),this.addEventListeners(),this.scrollToFragment(location.hash.slice(1),!1,0),(this._options.showInSidebar||this._options.enableOverlayToc)&&this._appendInlineStyles(),this._options.showInSidebar&&this._handleSidebarToc(),this._options.enableOverlayToc&&this._handleOverlayToc())},e}();o.Toc=o.Toc||i}(window,window.document,jQuery,ST_TOC),function(t,e,n,o){function i(){let t,e;t={prefix:o.VARS.plugin_meta.slug+"-",fragId:o.VARS.plugin_meta.slug+"-h",threshold:o.VARS.settings.threshold,marker:o.VARS.marker,acceptedSelectors:o.VARS.settings.accepted_selectors,rejectedSelectors:o.VARS.settings.rejected_selectors,targetLevels:o.VARS.settings.target_levels,smoothScroll:o.VARS.settings.enable_smooth_scroll,fontSize:o.VARS.settings.font_size>0?o.VARS.settings.font_size/100:null,listStyle:o.VARS.settings.list_style,trackable:o.VARS.trackable,tracker:{uri:o.VARS.uri,prefix:o.VARS.plugin_meta.prefix+"_",postId:o.VARS.post_id,nonce:o.VARS.nonce},wrapper:o.VARS.wrapper,ignoredSelectorBeforeHeading:o.VARS.ignored_selector_before_heading,ignoredSelectorAfterHeading:o.VARS.ignored_selector_after_heading,containerId:o.VARS.container_id,position:o.VARS.settings.position,showInSidebar:o.VARS.settings.show_in_sidebar,showTitle:o.VARS.settings.show_title,title:o.VARS.settings.title,expandable:o.VARS.settings.expandable,labels:{show:o.VARS.settings.labels.show,hide:o.VARS.settings.labels.hide},expanded:!o.VARS.settings.hide_by_default,showBackButton:o.VARS.settings.show_back_button,enableOverlayToc:o.VARS.settings.enable_overlay_toc,hierarchical:o.VARS.settings.hierarchical,classes:{container:o.VARS.classes.container,close:o.VARS.classes.close,hierarchical:o.VARS.classes.hierarchical,flat:o.VARS.classes.flat,title:o.VARS.classes.title,toggle:o.VARS.classes.toggle,list:o.VARS.classes.list,back:o.VARS.classes.back},fixedElementSelector:o.VARS.fixed_element_selector},n(o.VARS.settings.content_selector).each((function(i,s){const r=n(s),c=n.extend({},t);i>0&&(c.fragId=o.VARS.plugin_meta.slug+"-"+(i+1)+"-h"),e=new o.Toc(r,c),r.data(o.VARS.plugin_meta.slug,e),e.initialize()}))}o.VARS.settings.early_loading?n(i):n(t).on("load",i)}(window,window.document,jQuery,ST_TOC)})();
(()=>{"use strict";var t={n:e=>{var s=e&&e.__esModule?()=>e.default:()=>e;return t.d(s,{a:s}),s},d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const e=window.jQuery;var s=t.n(e);class i{constructor(t){this._$element=t,this._focusedIndex=0,this._handlers={onClickTab:this._onClickTab.bind(this),onKeydown:this._onKeydown.bind(this)}}$tabList(){return this._$element.children('[role="tablist"]')}$tabListItemByTab(t){return t.closest("[data-st-tabs-tab-list-item]")}$tab(){return this.$tabList().find('[role="tab"]')}$tabPanel(){return this._$element.children().children('[role="tabpanel"]')}changeTabs(t){const e=this.$tab().eq(t),s=this.$tabListItemByTab(e),i=this.$tab(),n=this.$tabListItemByTab(i),a=this.$tabPanel();i.attr("aria-selected",!1),n.removeClass("is-selected"),e.attr("aria-selected",!0),s.addClass("is-selected"),a.prop("hidden",!0),a.filter(`#${CSS.escape(e.attr("aria-controls"))}`).prop("hidden",!1)}_onClickTab(t){const e=s()(t.currentTarget),i=this.$tab().index(e);this.changeTabs(i)}_onKeydown(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;const e=this.$tab();e.eq(this._focusedIndex).attr("tabindex",-1),"ArrowRight"===t.key?(this._focusedIndex++,this._focusedIndex>=e.length&&(this._focusedIndex=0)):"ArrowLeft"===t.key&&(this._focusedIndex--,this._focusedIndex<0&&(this._focusedIndex=e.length-1)),e.eq(this._focusedIndex).attr("tabindex",0).focus()}addEventListeners(){this.$tab().on("click",this._handlers.onClickTab),this.$tabList().on("keydown",this._handlers.onKeydown)}removeEventListeners(){this.$tab().off("click",this._handlers.onClickTab),this.$tabList().off("keydown",this._handlers.onKeydown)}initialize(){const t=this.$tab();this._focusedIndex=Math.max(0,t.index(t.filter('[aria-selected="true"]'))),this.addEventListeners()}}s()((function(){let t=[];s()("[data-st-tabs]").each(((e,n)=>{var a=s()(n),r=new i(a);t=[...t,r],r.initialize()}))}))})();
!function(d,l){"use strict";l.querySelector&&d.addEventListener&&"undefined"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),i=0;i<o.length;i++)o[i].style.display="none";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute("style"),"height"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):"link"===t.message&&(r=new URL(s.getAttribute("src")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener("message",d.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,s=l.querySelectorAll("iframe.wp-embedded-content"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))}(window,document);