<\/div>').appendTo(i)),t.append(r.find(".date-picker").removeClass("d-none")))}).on("hide.bs.popover",function(){var t=this.getAttribute("aria-describedby"),i,u;t&&(i=n("#"+t),u=i.find(".date-picker"),r.append(u.addClass("d-none")))});r.find(".datetime-picker-input-icon").on("click",function(t){if(!n(this).hasClass("disabled")){t.stopImmediatePropagation();var i=n(this).parents(".datetime-picker-bar").find(".datetime-picker-input");i.trigger("click")}});r.find(".date-table .cell").on("click",function(t){n(t.target).parent().parent().hasClass("disabled")&&(t.preventDefault(),t.stopImmediatePropagation())})}},bb_datetimeRange:function(t,i){var r=n(t),f=r.attr("data-bs-placement")||"auto",u=r.find(".datetime-range-bar");if(i)u.popover(i);else{u.popover({toggle:"datetime-range",placement:f}).on("show.bs.popover",function(){var t=n(this).parent().hasClass("disabled");return!t}).on("inserted.bs.popover",function(){var u=this.getAttribute("aria-describedby"),i,t;u&&(i=n("#"+u),t=i.find(".popover-body"),t.length===0&&(t=n('
<\/div>').appendTo(i)),t.append(r.find(".datetime-range-body").removeClass("d-none")))}).on("hide.bs.popover",function(){var t=this.getAttribute("aria-describedby"),i,u;t&&(i=n("#"+t),u=i.find(".datetime-range-body"),r.append(u.addClass("d-none")))});r.find(".is-clear").on("click",function(){u.popover("hide")})}}});n(function(){var r,t,i;n.fn.popover.Constructor.prototype.isWithContent=function(){var n=this._config.toggle;return["","confirm","datetime-picker","datetime-range"].indexOf(n)||this.getTitle()||this._getContent()};r=n.fn.popover.Constructor.prototype.getTipElement;n.fn.popover.Constructor.prototype.getTipElement=function(){var i=this._config.toggle,u=r.call(this),t=n(u).addClass("shadow");return t.find(".popover-header").length>0&&t.addClass("has-header"),i==="datetime-picker"&&t.addClass("popover-datetime"),i==="datetime-range"&&t.addClass("popover-datetime-range"),u};t=function(t){var i=null,r=t.parents(".popover"),u;return r.length>0&&(u=r.attr("id"),i=n('[aria-describedby="'+u+'"]')),i};i=function(n){n.popover("dispose");n.removeClass("is-show")};n(document).on("click",function(r){var e=!0,u=n(r.target),o=t(u),f;o!=null&&(e=!1);e&&(f=u,f.data("bs-toggle")!=="confirm"&&(f=f.parents('[data-bs-toggle="confirm"][aria-describedby^="popover"]')),n('[data-bs-toggle="confirm"][aria-describedby^="popover"]').each(function(t,r){if(f[0]!==r){var u=n(r);i(u)}}));u.parents(".popover-datetime.show").length===0&&n(".popover-datetime.show").each(function(){var t=this.getAttribute("id"),i;t&&(i=n('[aria-describedby="'+t+'"]'),u.attr("aria-describedby")!==t&&i.popover("hide"))});u.parents(".popover-datetime-range.show").length===0&&n(".popover-datetime-range.show").each(function(){var t=this.getAttribute("id"),i;t&&(i=n('[aria-describedby="'+t+'"]'),u.parents(".datetime-range-bar").attr("aria-describedby")!==t&&i.popover("hide"))})});n(document).on("click",".popover-confirm-buttons .btn",function(r){var u,f,e;r.stopPropagation();u=t(n(this));u.length>0&&(i(u),f=u.attr("id"),$ele=n('[data-bs-target="'+f+'"]'),e=this.getAttribute("data-dismiss")==="confirm"?$ele.find(".popover-confirm-buttons .btn:first"):$ele.find(".popover-confirm-buttons .btn:last"),e.trigger("click"))})})}(jQuery),function(n){n.extend({bb_printview:function(t){var r=n(t).parent(),f=r.hasClass("modal-header"),e=r.hasClass("modal-footer"),i=null;if(f?i=r.next():e&&(i=r.parentsUntil(".modal-content").parent().find(".modal-body")),i!=null&&i.length>0){var o=i.html(),u=n("body").addClass("bb-printview-open"),s=n("
<\/div>").addClass("bb-printview").html(o).appendTo(u);window.print();u.removeClass("bb-printview-open");s.remove()}else window.print()}})}(jQuery),function(n){n.extend({bb_qrcode:function(t,i,r,u){var e=n(t),f=e.find(".qrcode-img");f.html("");r==="generate"&&(qrcode=new QRCode(f[0],{text:u,width:128,height:128,colorDark:"#000000",colorLight:"#ffffff",correctLevel:QRCode.CorrectLevel.H}),i.invokeMethodAsync("Generated"))}})}(jQuery),function(n){n.extend({bb_rate:function(t,i,r){var u=n(t),f;u.val=parseInt(u.attr("aria-valuenow"));f=function(){var t=u.find(".rate-item");t.each(function(t){t>u.val?n(this).removeClass("is-on"):n(this).addClass("is-on")})};u.on("mouseenter",".rate-item",function(){if(!u.hasClass("disabled")){var t=u.find(".rate-item"),i=t.toArray().indexOf(this);t.each(function(t){t>i?n(this).removeClass("is-on"):n(this).addClass("is-on")})}});u.on("mouseleave",function(){u.hasClass("disabled")||f()});u.on("click",".rate-item",function(){if(!u.hasClass("disabled")){var n=u.find(".rate-item");u.val=n.toArray().indexOf(this);u.attr("aria-valuenow",u.val+1);i.invokeMethodAsync(r,u.val+1)}})}})}(jQuery),function(n){n.extend({bb_resize_monitor:function(t,i){var r=n.bb_get_responsive(),u=function(){var u=r;r=n.bb_get_responsive();u!==r&&(u=r,t.invokeMethodAsync(i,r))};return window.attachEvent?window.attachEvent("onresize",u):window.addEventListener&&window.addEventListener("resize",u,!0),r},bb_get_responsive:function(){return window.getComputedStyle(document.body,":before").content.replace(/\"/g,"")}})}(jQuery),function(n){n.extend({bb_row:function(t){var i=n(t);i.grid()}})}(jQuery),function(n){n.extend({bb_multi_select:function(t,i,r){n(t).data("bb_multi_select",{obj:i,method:r})}});n(function(){n(document).on("click",function(t){var r=n(t.target),i=r.closest(".multi-select");n(".multi-select.show").each(function(){if(i.length===0||this!=i[0]){var t=n(this).data("bb_multi_select");t.obj.invokeMethodAsync(t.method)}})})})}(jQuery),function(n){n.extend({bb_select:function(t,i,r){var u=n(t),e=u.find("input.search-text"),f=function(n){var i=n.find(".dropdown-menu"),t=i.children(".preActive");if(t.length===0&&(t=i.children(".active"),t.addClass("preActive")),t.length===1){var u=i.innerHeight(),f=t.outerHeight(),e=t.index()+1,r=11+f*e-u;r>=0?i.scrollTop(r):i.scrollTop(0)}};u.on("show.bs.dropdown",function(n){u.find(".form-select").prop("disabled")&&n.preventDefault()});u.on("shown.bs.dropdown",function(){e.length>0&&e.focus();f(n(this))});u.on("keyup",function(t){var u=n(this),o,e,s,h,c;u.find(".dropdown-toggle").hasClass("show")&&(o=u.find(".dropdown-menu.show > .dropdown-item").not(".disabled, .search"),e=o.filter(function(t,i){return n(i).hasClass("preActive")}),o.length>1&&(t.key==="ArrowUp"?(e.removeClass("preActive"),s=e.prev().not(".disabled, .search"),s.length===0&&(s=o.last()),s.addClass("preActive"),f(u)):t.key==="ArrowDown"&&(e.removeClass("preActive"),h=e.next().not(".disabled, .search"),h.length===0&&(h=o.first()),h.addClass("preActive"),f(u))),t.key==="Enter"&&(u.find(".show").removeClass("show"),c=e.index(),u.find(".search").length>0&&c--,i.invokeMethodAsync(r,c)))});u.on("click",".dropdown-item.disabled",function(n){n.stopImmediatePropagation()})}})}(jQuery),function(n){n.extend({bb_slider:function(t,i,r){var f=n(t),s=f.find(".disabled").length>0;if(!s){var e=0,o=0,u=0,h=f.innerWidth();f.find(".slider-button-wrapper").drag(function(n){e=n.clientX||n.touches[0].clientX;o=parseInt(f.attr("aria-valuetext"));f.find(".slider-button-wrapper, .slider-button").addClass("dragging")},function(n){var t=n.clientX||n.changedTouches[0].clientX;u=Math.ceil((t-e)*100/h)+o;u<=0&&(u=0);u>=100&&(u=100);f.find(".slider-bar").css({width:u.toString()+"%"});f.find(".slider-button-wrapper").css({left:u.toString()+"%"});f.attr("aria-valuetext",u.toString());i.invokeMethodAsync(r,u)},function(){f.find(".slider-button-wrapper, .slider-button").removeClass("dragging");i.invokeMethodAsync(r,u)})}}})}(jQuery),function(n){n.extend({bb_split:function(t){var i=n(t),f=i.innerWidth(),e=i.innerHeight(),u=0,r=0,o=0,s=0,h=!i.children().hasClass("is-horizontal");i.children().children(".split-bar").drag(function(n){f=i.innerWidth();e=i.innerHeight();h?(s=n.clientY||n.touches[0].clientY,u=i.children().children(".split-left").innerHeight()*100/e):(o=n.clientX||n.touches[0].clientX,u=i.children().children(".split-left").innerWidth()*100/f);i.toggleClass("dragging")},function(n){var t,c;h?(t=n.clientY||n.changedTouches[0].clientY,r=Math.ceil((t-s)*100/e)+u):(c=n.clientX||n.changedTouches[0].clientX,r=Math.ceil((c-o)*100/f)+u);r<=0&&(r=0);r>=100&&(r=100);i.children().children(".split-left").css({"flex-basis":r.toString()+"%"});i.children().children(".split-right").css({"flex-basis":(100-r).toString()+"%"});i.attr("data-split",r)},function(){i.toggleClass("dragging")})}})}(jQuery),function(n){n.extend({bb_tab:function(t){var i=n(t),r=window.setInterval(function(){i.is(":visible")&&(window.clearInterval(r),i.lgbTab("active"))},200)}})}(jQuery),function(n){n.extend({bb_table_search:function(t,i,r,u){n(t).data("bb_table_search",{obj:i,searchMethod:r,clearSearchMethod:u})},bb_table_row_hover:function(t){var i=t.find(".table-excel-toolbar"),r=t.find("tbody > tr").each(function(t,r){n(r).hover(function(){var t=n(this).position().top;i.css({top:t+"px",display:"block"})},function(){i.css({top:top+"px",display:"none"})})})},bb_table_resize:function(t){var f=t.find(".col-resizer");if(f.length>0){var e=function(t){var u=n(this),i=u.closest("th");t?i.addClass("border-resize"):i.removeClass("border-resize");var r=i.index(),f=i.closest(".table-resize").find("tbody"),e=f.find("tr").each(function(){var i=n(this.children[r]);t?i.addClass("border-resize"):i.removeClass("border-resize")});return r},i=0,r=0,u=0,o=0;f.each(function(){n(this).drag(function(f){u=e.call(this,!0);var s=t.find("table colgroup col")[u].width;i=s?parseInt(s):n(this).closest("th").width();r=n(this).closest("table").width();o=f.clientX},function(f){t.find("table colgroup").each(function(t,e){var c=n(e).find("col")[u],h=f.clientX-o,s;c.width=i+h;s=n(e).closest("table");s.parent().hasClass("table-fixed-header")?s.width(r+h):s.width(r+h-6)})},function(){e.call(this,!1)})})}},bb_table_load:function(t,i){var u=n(t),r=u.find(".table-loader");i==="show"?r.addClass("show"):r.removeClass("show")},bb_table_filter_calc:function(t){var c=t.find(".table-toolbar"),l=0,h,e,u;c.length>0&&(l=c.outerHeight());var o=n(this),a=o.position(),v=o.attr("data-field"),f=t.find('.table-filter-item[data-field="'+v+'"]'),i=o.closest("th"),y=i.closest("thead"),p=y.outerHeight()-i.outerHeight(),s=i.outerWidth()+i.position().left-f.outerWidth()/2,r=0,w=i.hasClass("fixed");i.hasClass("sortable")&&(r=24);i.hasClass("filterable")&&(r=r+12);h=0;w||(h=i.closest("table").parent().scrollLeft());e=i.offset().left+i.outerWidth()-r+f.outerWidth()/2-n(window).width();r=r+h;e>0&&(s=s-e-16,$arrow=f.find(".card-arrow"),$arrow.css({left:"calc(50% - 0.5rem + "+(e+16)+"px)"}));u=t.find(".table-search").outerHeight();u===undefined?u=0:u+=8;f.css({top:a.top+l+p+u+50,left:s-r})},bb_table_filter:function(t){t.on("click",".filterable .fa-filter",function(){n.bb_table_filter_calc.call(this,t)})},bb_table_getCaretPosition:function(n){var t=-1,i=n.selectionStart,r=n.selectionEnd;return i==r&&(i==n.value.length?t=1:i==0&&(t=0)),t},bb_table_excel_keybord:function(t){var f=t.find(".table-excel").length>0;if(f){var i={TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40},e=function(n){var t=window.setTimeout(function(){window.clearTimeout(t);n.focus();n.select()},10)},r=function(t,i){var r=!1,f=t[i],u=n(f).find("input.form-control:not([readonly]");return u.length>0&&(e(u),r=!0),r},u=function(n,t){var o=n.closest("td"),e=o.closest("tr"),u=e.children("td"),f=u.index(o);if(t==i.LEFT_ARROW){while(f-->0)if(r(u,f))break}else if(t==i.RIGHT_ARROW){while(f++
0&&(u>0&&(h=i.parent().css("height"),t.find(".table-search-collapse").each(function(){n(this).data("fixed-height",h)})),i.parent().css({height:"calc(100% - "+e+"px)"}));o=r.outerHeight();o>0&&i.css({height:"calc(100% - "+o+"px)"})},bb_table:function(t,i,r,u){var f=n(t),l=f.find(".table-fixed").length>0,a,h,c,e,o,v,s;if(l){a=f.find(".table-fixed-header");h=f.find(".table-fixed-body");h.on("scroll",function(){var n=h.scrollLeft();a.scrollLeft(n)});if(c=f.find(".fixed-scroll"),c.length===1){for(e=c.prev();e.length===1;)if(e.hasClass("fixed-right")&&!e.hasClass("modified"))o=e.css("right"),o=o.replace("px",""),n.browser.versions.mobile&&(o=parseFloat(o)-6+"px"),e.css({right:o}).addClass("modified"),e=e.prev();else break;n.browser.versions.mobile&&c.remove()}n.bb_table_fixedbody(f,h,a);f.find(".col-resizer:last").remove()}v=f.find(".table-cell.is-sort .table-text");s=u;v.each(function(){var i=n(this).parent().find(".fa:last"),t;i.length>0&&(t=s.unset,i.hasClass("fa-sort-asc")?t=s.sortAsc:i.hasClass("fa-sort-desc")&&(t=s.sortDesc),n(this).tooltip({container:"body",title:t}))});v.on("click",function(){var i=n(this),u=i.parent().find(".fa:last"),t="sortAsc",r,f;u.hasClass("fa-sort-asc")?t="sortDesc":u.hasClass("fa-sort-desc")&&(t="unset");r=n("#"+i.attr("aria-describedby"));r.length>0&&(f=r.find(".tooltip-inner"),f.html(s[t]),i.attr("data-original-title",s[t]))});f.children(".table-scroll").scroll(function(){f.find(".table-filter-item.show").each(function(){var t=n(this).attr("data-field"),i=f.find('.fa-filter[data-field="'+t+'"]')[0];n.bb_table_filter_calc.call(i,f)})});n.bb_table_row_hover(f);n.bb_table_tooltip(t);n.bb_table_filter(f);n.bb_table_resize(f);n.bb_table_excel_keybord(f);f.on("click",".table-search-collapse",function(){var i=n(this).toggleClass("is-open"),t=i.closest(".card").find(".card-body");t.length===1&&(t.is(":hidden")&&(l&&f.find(".table-fixed-body").parent().css({height:i.data("fixed-height")}),t.parent().toggleClass("collapsed")),t.slideToggle("fade",function(){var t=n(this);t.is(":hidden")&&t.parent().toggleClass("collapsed");l&&n.bb_table_fixedbody(f)}))})}});n(function(){n(document).on("keyup",function(t){var r,i;t.key==="Enter"?(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.searchMethod)):t.key==="Escape"&&(r=n(t.target).closest(".table-container"),i=r.data("bb_table_search"),i&&i.obj.invokeMethodAsync(i.clearSearchMethod))});n(document).on("click",function(t){var i=n(t.target),u=i.closest(".dropdown-menu.show"),r;u.length>0||(r=i.closest(".btn-col"),r.length>0)||n(".table-toolbar > .btn-group > .btn-col > .dropdown-toggle.show").each(function(t,i){n(i).trigger("click")})})})}(jQuery),function(n){n.extend({bb_setTitle:function(n){document.title=n}})}(jQuery),function(n){n.extend({bb_toast_close:function(t){var i=n(t);i.find(".btn-close").trigger("click")},bb_toast:function(t,i,r){var f,o;window.Toasts===undefined&&(window.Toasts=[]);Toasts.push(t);var u=n(t),s=u.attr("data-bs-autohide")!=="false",e=parseInt(u.attr("data-bs-delay"));u.addClass("d-block");f=null;o=window.setTimeout(function(){window.clearTimeout(o);s&&(u.find(".toast-progress").css({width:"100%",transition:"width "+e/1e3+"s linear"}),f=window.setTimeout(function(){window.clearTimeout(f);u.find(".btn-close").trigger("click")},e));u.addClass("show")},50);u.on("click",".btn-close",function(n){n.preventDefault();n.stopPropagation();f!=null&&window.clearTimeout(f);u.removeClass("show");var t=window.setTimeout(function(){window.clearTimeout(t);u.removeClass("d-block");Toasts.remove(u[0]);Toasts.length===0&&i.invokeMethodAsync(r)},500)})}})}(jQuery),function(n){n.extend({bb_tooltip:function(t,i,r,u,f,e){var s=document.getElementById(t),h,l,c,o;s!==null&&(h=bootstrap.Tooltip.getInstance(s),h&&h.dispose(),i!=="dispose"&&(l={html:f,sanitize:!f,title:r,placement:u,trigger:e},h=new bootstrap.Tooltip(s,l),c=n(s),i==="enable"?(o=c.parents("form").find(".is-invalid:first"),o.prop("nodeName")==="INPUT"?o.prop("readonly")?o.trigger("focus"):o.focus():o.prop("nodeName")==="DIV"&&o.trigger("focus")):i!==""&&c.tooltip(i)))}});n(function(){n(document).on("inserted.bs.tooltip",".is-invalid",function(){n("#"+n(this).attr("aria-describedby")).addClass("is-invalid")})})}(jQuery),function(n){n.extend({bb_transition:function(t,i,r){n(t).on("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oAnimationEnd",function(){i.invokeMethodAsync(r)})}})}(jQuery),function(n){n.extend({bb_tree:function(t){var i=n(t);i.find(".tree-content").hover(function(){n(this).parent().addClass("hover")},function(){n(this).parent().removeClass("hover")});i.on("click",".tree-node",function(){var i=n(this),r=i.prev(),t=r.find('[type="radio"]');t.attr("disabeld")!=="disabled"&&t.trigger("click")})}})}(jQuery),function(n){n.extend({bb_upload:function(t){var i=n(t);i.on("click",".btn-browser",function(){var r=n(this),t=i.find(":file");t.trigger("click")})}})}(jQuery),function(n){n.extend({bb_form:function(t){var i=n("#"+t);i.find("[aria-describedby]").each(function(t,i){var u=bootstrap.Tooltip.getInstance(i),r;u&&(r=n(i),r.tooltip("dispose"))})}})}(jQuery);
\ No newline at end of file
--
Gitee
From 7251ef76ef0b26fef1047170a63aba63139ce7ad Mon Sep 17 00:00:00 2001
From: Argo-Lenovo
Date: Sun, 17 Apr 2022 12:35:34 +0800
Subject: [PATCH 03/10] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E8=B5=84?=
=?UTF-8?q?=E6=BA=90=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/BootstrapBlazor.Shared/Locales/en.json | 2 +-
src/BootstrapBlazor.Shared/Locales/zh.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/BootstrapBlazor.Shared/Locales/en.json b/src/BootstrapBlazor.Shared/Locales/en.json
index 818bf3698..9b53c5ae7 100644
--- a/src/BootstrapBlazor.Shared/Locales/en.json
+++ b/src/BootstrapBlazor.Shared/Locales/en.json
@@ -2698,7 +2698,7 @@
"LinkButton": "LinkButton",
"ListView": "ListView",
"Locator": "Locator",
- "Image": "Image",
+ "ImageViewer": "ImageViewer",
"Popover": "Popover",
"Print": "Print",
"QRCode": "QRCode",
diff --git a/src/BootstrapBlazor.Shared/Locales/zh.json b/src/BootstrapBlazor.Shared/Locales/zh.json
index 64ccdf10c..43ca7d3ef 100644
--- a/src/BootstrapBlazor.Shared/Locales/zh.json
+++ b/src/BootstrapBlazor.Shared/Locales/zh.json
@@ -2708,7 +2708,7 @@
"LinkButton": "链接按钮 LinkButton",
"ListView": "列表组件 ListView",
"Locator": "位置定位 Locator",
- "Image": "图片 Image",
+ "ImageViewer": "图片 ImageViewer",
"Popover": "弹出窗 Popover",
"Print": "打印组件 Print",
"QRCode": "二维码 QRCode",
--
Gitee
From 49d9f5a6f3f7d77660b8dd2b61e3cc2be6ea5e21 Mon Sep 17 00:00:00 2001
From: Argo-Lenovo
Date: Sun, 17 Apr 2022 13:02:10 +0800
Subject: [PATCH 04/10] =?UTF-8?q?wip:=20=E6=8F=90=E4=BA=A4=E8=84=9A?=
=?UTF-8?q?=E6=9C=AC=E8=B0=83=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Properties/launchSettings.json | 2 +-
.../Components/ImageViewer/ImageViewer.js | 12 +-
src/BootstrapBlazor/bundleconfig.json | 2 +-
.../wwwroot/js/bootstrap.blazor.bundle.min.js | 4295 ++++++++++++++++-
.../wwwroot/js/bootstrap.blazor.min.js | 4295 ++++++++++++++++-
.../lib/extensions/longbow.extensions.js | 15 +-
6 files changed, 8604 insertions(+), 17 deletions(-)
diff --git a/src/BootstrapBlazor.Server/Properties/launchSettings.json b/src/BootstrapBlazor.Server/Properties/launchSettings.json
index b1d6127ab..74512dc38 100644
--- a/src/BootstrapBlazor.Server/Properties/launchSettings.json
+++ b/src/BootstrapBlazor.Server/Properties/launchSettings.json
@@ -12,7 +12,7 @@
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
- "applicationUrl": "http://localhost:50853/",
+ "applicationUrl": "http://0.0.0.0:50853/",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
diff --git a/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.js b/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.js
index a55805a4c..9e65ba7a5 100644
--- a/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.js
+++ b/src/BootstrapBlazor/Components/ImageViewer/ImageViewer.js
@@ -149,12 +149,6 @@
}
);
- $prevImg.touchScale(function (scale) {
- processImage(function () {
- return scale;
- });
- });
-
// 点击遮罩关闭功能
$mask.on('click', function () {
$closeButton.trigger('click');
@@ -233,6 +227,12 @@
}
return value;
};
+
+ $prevImg.touchScale(function (scale) {
+ processImage(function () {
+ return scale;
+ });
+ });
}
});
})(jQuery);
diff --git a/src/BootstrapBlazor/bundleconfig.json b/src/BootstrapBlazor/bundleconfig.json
index a2498e1cd..15429ec4d 100644
--- a/src/BootstrapBlazor/bundleconfig.json
+++ b/src/BootstrapBlazor/bundleconfig.json
@@ -19,7 +19,7 @@
"Components/**/*.js"
],
"minify": {
- "enabled": true,
+ "enabled": false,
"renameLocals": true
}
},
diff --git a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js
index 5ad3ff421..f49391364 100644
--- a/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js
+++ b/src/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js
@@ -13,4 +13,4297 @@ var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this
/*! Summernote v0.8.18 | (c) 2013- Alan Hong and other contributors | MIT license */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.jQuery);for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(self,(function(t){return(()=>{"use strict";var e={9458:e=>{e.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.amdO={},o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{o.r(i);var t=o(9458),e=o.n(t);function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t,e){for(var n=0;n'),u=s(''),d=s(''),h=s(''),f=s(''),p=s(['','"].join("")),m=s(''),v=s(['',''].join("")),g=s(''),b=s('"].join("")).prependTo(this.$editingArea),this.$handle.on("mousedown",(function(e){if(Dt.isControlSizing(e.target)){e.preventDefault(),e.stopPropagation();var n=t.$handle.find(".note-control-selection").data("target"),o=n.offset(),i=t.$document.scrollTop(),r=function(e){t.context.invoke("editor.resizeTo",{x:e.clientX-o.left,y:e.clientY-(o.top-i)},n,!e.shiftKey),t.update(n[0],e)};t.$document.on("mousemove",r).one("mouseup",(function(e){e.preventDefault(),t.$document.off("mousemove",r),t.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(e){e.preventDefault(),t.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(t,n){if(this.context.isDisabled())return!1;var o=Dt.isImg(t),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",t,n),o){var r=e()(t),a=r.position(),s={left:a.left+parseInt(r.css("marginLeft"),10),top:a.top+parseInt(r.css("marginTop"),10)},l={w:r.outerWidth(!1),h:r.outerHeight(!1)};i.css({display:"block",left:s.left,top:s.top,width:l.w,height:l.h}).data("target",r);var c=new Image;c.src=r.attr("src");var u=l.w+"x"+l.h+" ("+this.lang.image.original+": "+c.width+"x"+c.height+")";i.find(".note-control-selection-info").text(u),this.context.invoke("editor.saveTarget",t)}else this.hide();return o}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}])&&ve(n.prototype,o),i&&ve(n,i),t}();function be(t,e){for(var n=0;n
").html(i).attr("href",o)[0];this.context.options.linkTargetBlank&&e()(r).attr("target","_blank"),this.lastWordRange.insertNode(r),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(t){if(W.contains([Kt.code.ENTER,Kt.code.SPACE],t.keyCode)){var e=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=e}}},{key:"handleKeyup",value:function(t){W.contains([Kt.code.ENTER,Kt.code.SPACE],t.keyCode)&&this.replace()}}])&&be(n.prototype,o),i&&be(n,i),t}();function we(t,e){for(var n=0;n
'),this.$placeholder.on("click",(function(){t.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var t=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(t)}}])&&Te(n.prototype,o),i&&Te(n,i),t}();function Ie(t,e){for(var n=0;n',''+this.lang.color.background+"
","",'","
",'\x3c!-- back colors --\x3e
',"",'",'',"
",''," "].join(""):"")+(i?['','
'+this.lang.color.foreground+"
","
",'","
",'
\x3c!-- fore colors --\x3e
',"
",'",'',"
",'
',"
"].join(""):""),callback:function(t){t.find(".note-holder").each((function(t,n){var o=e()(n);o.append(r.ui.palette({colors:r.options.colors,colorsName:r.options.colorsName,eventName:o.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())}));var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];t.find(".note-holder-custom").each((function(t,o){var i=e()(o);i.append(r.ui.palette({colors:n,colorsName:n,eventName:i.data("event"),container:r.options.container,tooltip:r.options.tooltip}).render())})),t.find("input[type=color]").each((function(n,o){e()(o).change((function(){var n=t.find("#"+e()(this).data("event")).find(".note-color-btn").first(),o=this.value.toUpperCase();n.css("background-color",o).attr("aria-label",o).attr("data-value",o).attr("data-original-title",o),n.click()}))}))},click:function(n){n.stopPropagation();var o=e()("."+t).find(".note-dropdown-menu"),i=e()(n.target),a=i.data("event"),s=i.attr("data-value");if("openPalette"===a){var l=o.find("#"+s),c=e()(o.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.click()}else{if(W.contains(["backColor","foreColor"],a)){var h="backColor"===a?"background-color":"color",f=i.closest(".note-color").find(".note-recent-color"),p=i.closest(".note-color").find(".note-current-color-button");f.css(h,s),p.attr("data"+a,s)}r.context.invoke("editor."+a,s)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var t=this;this.context.memo("button.style",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,title:t.lang.style.style,template:function(e){"string"==typeof e&&(e={tag:e,title:Object.prototype.hasOwnProperty.call(t.lang.style,e)?t.lang.style[e]:e});var n=e.tag,o=e.title;return"<"+n+(e.style?' style="'+e.style+'" ':"")+(e.className?' class="'+e.className+'"':"")+">"+o+""+n+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var n=function(e,n){var o=t.options.styleTags[e];t.context.memo("button.style."+o,(function(){return t.button({className:"note-btn-style-"+o,contents:''+o.toUpperCase()+"
",tooltip:t.lang.style[o],click:t.context.createInvokeHandler("editor.formatBlock")}).render()}))},o=0,i=this.options.styleTags.length;o',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),title:t.lang.font.name,template:function(t){return''+t+""},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,title:t.lang.font.size,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('',t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizeUnits,title:t.lang.font.sizeunit,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return t.colorPalette("note-color-all",t.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return t.colorPalette("note-color-fore",t.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return t.colorPalette("note-color-back",t.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var r=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),a=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),s=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",z.invoke(r,"render")),this.context.memo("button.justifyCenter",z.invoke(a,"render")),this.context.memo("button.justifyRight",z.invoke(s,"render")),this.context.memo("button.justifyFull",z.invoke(l,"render")),this.context.memo("button.outdent",z.invoke(c,"render")),this.context.memo("button.indent",z.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[r,a,s,l]}),t.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",title:t.lang.font.height,click:t.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),data:{toggle:"dropdown"}}),t.ui.dropdown({title:t.lang.table.table,className:"note-table",items:['",'1 x 1
'].join("")})],{callback:function(e){e.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()})),this.context.memo("button.link",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return t.button({className:"btn-fullscreen note-codeview-keep",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.lang.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return t.button({className:"btn-codeview note-codeview-keep",contents:t.ui.icon(t.options.icons.code),tooltip:t.lang.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.lang.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var t=this;this.context.memo("button.resizeFull",(function(){return t.button({contents:'100%',tooltip:t.lang.image.resizeFull,click:t.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return t.button({contents:'50%',tooltip:t.lang.image.resizeHalf,click:t.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return t.button({contents:'25%',tooltip:t.lang.image.resizeQuarter,click:t.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.resizeNone,click:t.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatLeft),tooltip:t.lang.image.floatLeft,click:t.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return t.button({contents:t.ui.icon(t.options.icons.floatRight),tooltip:t.lang.image.floatRight,click:t.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return t.button({contents:t.ui.icon(t.options.icons.rollback),tooltip:t.lang.image.floatNone,click:t.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return t.button({contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.image.remove,click:t.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var t=this;this.context.memo("button.linkDialogShow",(function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.edit,click:t.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return t.button({contents:t.ui.icon(t.options.icons.unlink),tooltip:t.lang.link.unlink,click:t.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var t=this;this.context.memo("button.addRowUp",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowAbove),tooltip:t.lang.table.addRowAbove,click:t.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowBelow),tooltip:t.lang.table.addRowBelow,click:t.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colBefore),tooltip:t.lang.table.addColLeft,click:t.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colAfter),tooltip:t.lang.table.addColRight,click:t.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.rowRemove),tooltip:t.lang.table.delRow,click:t.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.colRemove),tooltip:t.lang.table.delCol,click:t.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return t.button({className:"btn-md",contents:t.ui.icon(t.options.icons.trash),tooltip:t.lang.table.delTable,click:t.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(t,e){for(var n=0,o=e.length;n3&&c3&&ul&&ac)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(t){t?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),t),this.changeContainer(t)}},{key:"updateCodeview",value:function(t){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),t),t?this.deactivate():this.activate()}},{key:"activate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!0)}},{key:"deactivate",value:function(t){var e=this.$toolbar.find("button");t||(e=e.not(".note-codeview-keep")),this.ui.toggleBtn(e,!1)}}])&&Ne(n.prototype,o),i&&Ne(n,i),t}();function Re(t,e){for(var n=0;n','"),''),"",'
','"),''),"
",this.options.disableLinkTarget?"":e()("
").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),e()("
").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),o='
');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:n,footer:o}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"toggleLinkBtn",value:function(t,e,n){this.ui.toggleBtn(t,e.val()&&n.val())}},{key:"showLinkDialog",value:function(t){var n=this;return e().Deferred((function(e){var o=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),r=n.$dialog.find(".note-link-btn"),a=n.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),s=n.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");n.ui.onDialogShown(n.$dialog,(function(){n.context.triggerEvent("dialog.shown"),!t.url&&z.isValidUrl(t.text)&&(t.url=t.text),o.on("input paste propertychange",(function(){t.text=o.val(),n.toggleLinkBtn(r,o,i)})).val(t.text),i.on("input paste propertychange",(function(){t.text||o.val(i.val()),n.toggleLinkBtn(r,o,i)})).val(t.url),H.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(r,o,i),n.bindEnterKey(i,r),n.bindEnterKey(o,r);var l=void 0!==t.isNewWindow?t.isNewWindow:n.context.options.linkTargetBlank;a.prop("checked",l);var c=!t.url&&n.context.options.useProtocol;s.prop("checked",c),r.one("click",(function(r){r.preventDefault(),e.resolve({range:t.range,url:i.val(),text:o.val(),isNewWindow:a.is(":checked"),checkProtocol:s.is(":checked")}),n.ui.hideDialog(n.$dialog)}))})),n.ui.onDialogHidden(n.$dialog,(function(){o.off(),i.off(),r.off(),"pending"===e.state()&&e.reject()})),n.ui.showDialog(n.$dialog)})).promise()}},{key:"show",value:function(){var t=this,e=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(e).then((function(e){t.context.invoke("editor.restoreRange"),t.context.invoke("editor.createLink",e)})).fail((function(){t.context.invoke("editor.restoreRange")}))}}])&&Re(n.prototype,o),i&&Re(n,i),t}();function Ae(t,e){for(var n=0;n
')}}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",t,this.options.popover.link),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var t=this.context.invoke("editor.getLastRange");if(t.isCollapsed()&&t.isOnAnchor()){var n=Dt.ancestor(t.sc,Dt.isAnchor),o=e()(n).attr("href");this.$popover.find("a").attr("href",o).text(o);var i=Dt.posFromPlaceholder(n),r=e()(this.options.container).offset();i.top-=r.top,i.left-=r.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&Ae(n.prototype,o),i&&Ae(n,i),t}();function De(t,e){for(var n=0;n".concat(this.lang.image.maximumFileSize+" : "+n,"")}var o=this.options.dialogsInBody?this.$body:this.options.container,i=['','",'',t,"
",'','",'',"
"].join(""),r='');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(o)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(e){t.ui.hideDialog(t.$dialog),t.context.invoke("editor.restoreRange"),"string"==typeof e?t.options.callbacks.onImageLinkInsert?t.context.triggerEvent("image.link.insert",e):t.context.invoke("editor.insertImage",e):t.context.invoke("editor.insertImagesOrCallback",e)})).fail((function(){t.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var t=this;return e().Deferred((function(e){var n=t.$dialog.find(".note-image-input"),o=t.$dialog.find(".note-image-url"),i=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(t){e.resolve(t.target.files||t.target.value)})).val("")),o.on("input paste propertychange",(function(){t.ui.toggleBtn(i,o.val())})).val(""),H.isSupportTouch||o.trigger("focus"),i.click((function(t){t.preventDefault(),e.resolve(o.val())})),t.bindEnterKey(o,i)})),t.ui.onDialogHidden(t.$dialog,(function(){n.off(),o.off(),i.off(),"pending"===e.state()&&e.reject()})),t.ui.showDialog(t.$dialog)}))}}])&&De(n.prototype,o),i&&De(n,i),t}();function Be(t,e){for(var n=0;n','"),''),"');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:e,footer:n}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(t,e){t.on("keypress",(function(t){t.keyCode===Kt.code.ENTER&&(t.preventDefault(),e.trigger("click"))}))}},{key:"createVideoNode",value:function(t){var n,o=t.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=t.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),r=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),a=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=t.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),f=t.match(/^.+.(mp4|m4v)$/),p=t.match(/^.+.(ogg|ogv)$/),m=t.match(/^.+.(webm)$/),v=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(o&&11===o[1].length){var g=o[1],b=0;if(void 0!==o[2]){var y=o[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(y)for(var k=[3600,60,1],w=0,C=k.length;w