/*! Summernote v0.8.7 | (c) 2013- Alan Hong and other contributors | MIT license */ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?module.exports=a(require("jquery")):a(window.jQuery)}(function(a){a.extend(a.summernote.plugins,{specialchars:function(b){var c,d,e,f=this,g=a.summernote.ui,h=b.layoutInfo.editor,i=b.options,j=i.langInfo,k={UP:38,DOWN:40,LEFT:37,RIGHT:39,ENTER:13},l=15,m=0,n=[""","&","<",">","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","×","÷","ƒ","ˆ","˜","–","—","‘","’","‚","“","”","„","†","‡","•","…","‰","′","″","‹","›","‾","⁄","€","ℑ","℘","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","∑","−","∗","√","∝","∞","∠","∧","∨","∩","∪","∫","∴","∼","≅","≈","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","◊","♠","♣","♥","♦"];b.memo("button.specialCharacter",function(){return g.button({contents:'',tooltip:j.specialChar.specialChar,click:function(){f.show()}}).render()}),this.makeSpecialCharSetTable=function(){var b=a("");return a.each(n,function(c,d){var e=a(""):b.find("tr").last(),h=g.button({callback:function(a){a.html(d),a.attr("title",d),a.attr("data-value",encodeURIComponent(d)),a.css({width:35,"margin-right":"2px","margin-bottom":"2px"})}}).render();e.append(h),f.append(e),c%l==0&&b.append(f)}),m=b.find("tr").length,e=l,b},this.initialize=function(){var b=i.dialogsInBody?a(document.body):h,c='
'+this.makeSpecialCharSetTable()[0].outerHTML+"
";this.$dialog=g.dialog({title:j.specialChar.select,body:c}).render().appendTo(b)},this.show=function(){var c=b.invoke("editor.getSelectedText");b.invoke("editor.saveRange"),this.showSpecialCharDialog(c).then(function(c){b.invoke("editor.restoreRange");var d=a("").html(c)[0];d&&b.invoke("editor.insertNode",d)}).fail(function(){b.invoke("editor.restoreRange")})},this.showSpecialCharDialog=function(b){return a.Deferred(function(h){function i(a){a&&(a.find("button").addClass("active"),t=a)}function j(a){a.find("button").removeClass("active"),t=null}function n(b,c){var d=null;return a.each(s,function(a,e){var f=Math.ceil((a+1)/l),g=(a+1)%l==0?l:(a+1)%l;if(f===b&&g===c)return d=e,!1}),a(d)}function o(a){var b,f=s.length%e;k.LEFT===a?c>1?c-=1:1===d&&1===c?(c=f,d=m):(c=e,d-=1):k.RIGHT===a?d===m&&f===c?(c=1,d=1):cf?d=1:d>m?d=1:d<1&&(d=m),(b=n(d,c))&&(j(t),i(b))}function p(){t&&(h.resolve(decodeURIComponent(t.find("button").attr("data-value"))),r.modal("hide"))}function q(a){a.preventDefault();var b=a.keyCode;if(void 0!==b&&null!==b){if(u.indexOf(b)>-1){if(null===t)return i(s.eq(0)),c=1,void(d=1);o(b)}else b===v&&p();return!1}}var r=f.$dialog,s=r.find(".note-specialchar-node"),t=null,u=[k.UP,k.DOWN,k.LEFT,k.RIGHT],v=k.ENTER;if(j(s),b)for(var w=0;w
").addClass("note-specialchar-node"),f=c%l==0?a("