@saplingai/sapling-js 1.0.53 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="4de58452-c8ae-485f-b4c6-837ec549f667",t._sentryDebugIdIdentifier="sentry-dbid-4de58452-c8ae-485f-b4c6-837ec549f667")}catch(t){}}();export var SaplingModule; var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"9ba0f96e1f4ccca988cb913941110f02446e2492"},(()=>{var t={545(t,e){!function(t){"use strict";function e(){}function n(t,e,n,r,i){for(var o=0,a=e.length,s=0,u=0;o<a;o++){var c=e[o];if(c.removed){if(c.value=t.join(r.slice(u,u+c.count)),u+=c.count,o&&e[o-1].added){var l=e[o-1];e[o-1]=e[o],e[o]=l}}else{if(!c.added&&i){var f=n.slice(s,s+c.count);f=f.map(function(t,e){var n=r[u+e];return n.length>t.length?n:t}),c.value=t.join(f)}else c.value=t.join(n.slice(s,s+c.count));s+=c.count,c.added||(u+=c.count)}}var p=e[a-1];return a>1&&"string"==typeof p.value&&(p.added||p.removed)&&t.equals("",p.value)&&(e[a-2].value+=p.value,e.pop()),e}function r(t){return{newPos:t.newPos,components:t.components.slice(0)}}e.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callback;"function"==typeof i&&(o=i,i={}),this.options=i;var a=this;function s(t){return o?(setTimeout(function(){o(void 0,t)},0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var u=(e=this.removeEmpty(this.tokenize(e))).length,c=t.length,l=1,f=u+c,p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],e,t,0);if(p[0].newPos+1>=u&&d+1>=c)return s([{value:this.join(e),count:e.length}]);function h(){for(var i=-1*l;i<=l;i+=2){var o=void 0,f=p[i-1],d=p[i+1],h=(d?d.newPos:0)-i;f&&(p[i-1]=void 0);var g=f&&f.newPos+1<u,v=d&&0<=h&&h<c;if(g||v){if(!g||v&&f.newPos<d.newPos?(o=r(d),a.pushComponent(o.components,void 0,!0)):((o=f).newPos++,a.pushComponent(o.components,!0,void 0)),h=a.extractCommon(o,e,t,i),o.newPos+1>=u&&h+1>=c)return s(n(a,o.components,e,t,a.useLongestToken));p[i]=o}else p[i]=void 0}l++}if(o)!function t(){setTimeout(function(){if(l>f)return o();h()||t()},0)}();else for(;l<=f;){var g=h();if(g)return g}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,o=n.length,a=t.newPos,s=a-r,u=0;a+1<i&&s+1<o&&this.equals(e[a+1],n[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},equals:function(t,e){return this.options.comparator?this.options.comparator(t,e):t===e||this.options.ignoreCase&&t.toLowerCase()===e.toLowerCase()},removeEmpty:function(t){for(var e=[],n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};var i=new e;function o(t,e,n){return i.diff(t,e,n)}function a(t,e){if("function"==typeof t)e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,c=new e;function l(t,e,n){return n=a(n,{ignoreWhitespace:!0}),c.diff(t,e,n)}function f(t,e,n){return c.diff(t,e,n)}c.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!u.test(t)&&!u.test(e)},c.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&s.test(e[n])&&s.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var p=new e;function d(t,e,n){return p.diff(t,e,n)}function h(t,e,n){var r=a(n,{ignoreWhitespace:!0});return p.diff(t,e,r)}p.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var g=new e;function v(t,e,n){return g.diff(t,e,n)}g.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var y=new e;function m(t,e,n){return y.diff(t,e,n)}function b(t){return b="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},b(t)}function D(t){return w(t)||x(t)||A()}function w(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function x(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function A(){throw new TypeError("Invalid attempt to spread non-iterable instance")}y.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};var E=Object.prototype.toString,C=new e;function S(t,e,n){return C.diff(t,e,n)}function _(t,e,n,r,i){var o,a;for(e=e||[],n=n||[],r&&(t=r(i,t)),o=0;o<e.length;o+=1)if(e[o]===t)return n[o];if("[object Array]"===E.call(t)){for(e.push(t),a=new Array(t.length),n.push(a),o=0;o<t.length;o+=1)a[o]=_(t[o],e,n,r,i);return e.pop(),n.pop(),a}if(t&&t.toJSON&&(t=t.toJSON()),"object"===b(t)&&null!==t){e.push(t),a={},n.push(a);var s,u=[];for(s in t)t.hasOwnProperty(s)&&u.push(s);for(u.sort(),o=0;o<u.length;o+=1)a[s=u[o]]=_(t[s],e,n,r,s);e.pop(),n.pop()}else a=t;return a}C.useLongestToken=!0,C.tokenize=p.tokenize,C.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,i=void 0===r?function(t,e){return void 0===e?n:e}:r;return"string"==typeof t?t:JSON.stringify(_(t,null,null,i),i," ")},C.equals=function(t,n){return e.prototype.equals.call(C,t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var O=new e;function k(t,e,n){return O.diff(t,e,n)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.split(/\r\n|[\n\v\f\r\x85]/),r=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var t={};for(i.push(t);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(r);a&&(t.index=r.substring(a[0].length).trim()),o++}for(s(t),s(t),t.hunks=[];o<n.length;){var c=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))t.hunks.push(u());else{if(c&&e.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(c));o++}}}function s(t){var e=/^(---|\+\+\+)\s+/.exec(n[o]);if(e){var r="---"===e[1]?"old":"new",i=n[o].substring(3).trim().split("\t",2),a=i[0].replace(/\\\\/g,"\\");a.startsWith('"')&&a.endsWith('"')&&(a=a.substr(1,a.length-2)),t[r+"FileName"]=a,t[r+"Header"]=(i[1]||"").trim(),o++}}function u(){for(var t=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+i[1],oldLines:+i[2]||1,newStart:+i[3],newLines:+i[4]||1,lines:[],linedelimiters:[]},s=0,u=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var c=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;a.lines.push(n[o]),a.linedelimiters.push(r[o]||"\n"),"+"===c?s++:"-"===c?u++:" "===c&&(s++,u++)}if(s||1!==a.newLines||(a.newLines=0),u||1!==a.oldLines||(a.oldLines=0),e.strict){if(s!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(t+1));if(u!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(t+1))}return a}for(;o<n.length;)a();return i}function F(t,e,n){var r=!0,i=!1,o=!1,a=1;return function s(){if(r&&!o){if(i?a++:r=!1,t+a<=n)return a;o=!0}if(!i)return o||(r=!0),e<=t-a?-a++:(i=!0,s())}}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e&&(e=T(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var r,i,o=t.split(/\r\n|[\n\v\f\r\x85]/),a=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,u=n.compareLine||function(t,e,n,r){return e===r},c=0,l=n.fuzzFactor||0,f=0,p=0;function d(t,e){for(var n=0;n<t.lines.length;n++){var r=t.lines[n],i=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!u(e+1,o[e],i,a)&&++c>l)return!1;e++}}return!0}for(var h=0;h<s.length;h++){for(var g=s[h],v=o.length-g.oldLines,y=0,m=p+g.oldStart-1,b=F(m,f,v);void 0!==y;y=b())if(d(g,m+y)){g.offset=p+=y;break}if(void 0===y)return!1;f=g.offset+g.oldStart+g.oldLines}for(var D=0,w=0;w<s.length;w++){var x=s[w],A=x.oldStart+x.offset+D-1;D+=x.newLines-x.oldLines,A<0&&(A=0);for(var E=0;E<x.lines.length;E++){var C=x.lines[E],S=C.length>0?C[0]:" ",_=C.length>0?C.substr(1):C,O=x.linedelimiters[E];if(" "===S)A++;else if("-"===S)o.splice(A,1),a.splice(A,1);else if("+"===S)o.splice(A,0,_),a.splice(A,0,O),A++;else if("\\"===S){var k=x.lines[E-1]?x.lines[E-1][0]:null;"+"===k?r=!0:"-"===k&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var j=0;j<o.length-1;j++)o[j]=o[j]+a[j];return o.join("")}function I(t,e){"string"==typeof t&&(t=T(t));var n=0;function r(){var i=t[n++];if(!i)return e.complete();e.loadFile(i,function(t,n){if(t)return e.complete(t);var o=j(n,i,e);e.patched(i,o,function(t){if(t)return e.complete(t);r()})})}r()}function N(t,e,n,r,i,o,a){a||(a={}),void 0===a.context&&(a.context=4);var s=d(n,r,a);function u(t){return t.map(function(t){return" "+t})}s.push({value:"",lines:[]});for(var c=[],l=0,f=0,p=[],h=1,g=1,v=function(t){var e=s[t],i=e.lines||e.value.replace(/\n$/,"").split("\n");if(e.lines=i,e.added||e.removed){var o;if(!l){var d=s[t-1];l=h,f=g,d&&(p=a.context>0?u(d.lines.slice(-a.context)):[],l-=p.length,f-=p.length)}(o=p).push.apply(o,D(i.map(function(t){return(e.added?"+":"-")+t}))),e.added?g+=i.length:h+=i.length}else{if(l)if(i.length<=2*a.context&&t<s.length-2){var v;(v=p).push.apply(v,D(u(i)))}else{var y,m=Math.min(i.length,a.context);(y=p).push.apply(y,D(u(i.slice(0,m))));var b={oldStart:l,oldLines:h-l+m,newStart:f,newLines:g-f+m,lines:p};if(t>=s.length-2&&i.length<=a.context){var w=/\n$/.test(n),x=/\n$/.test(r),A=0==i.length&&p.length>b.oldLines;!w&&A&&p.splice(b.oldLines,0,"\"),(w||A)&&x||p.push("\")}c.push(b),l=0,f=0,p=[]}h+=i.length,g+=i.length}},y=0;y<s.length;y++)v(y);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:o,hunks:c}}function B(t,e,n,r,i,o,a){var s=N(t,e,n,r,i,o,a),u=[];t==e&&u.push("Index: "+t),u.push("==================================================================="),u.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),u.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var c=0;c<s.hunks.length;c++){var l=s.hunks[c];u.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),u.push.apply(u,l.lines)}return u.join("\n")+"\n"}function P(t,e,n,r,i,o){return B(t,t,e,n,r,i,o)}function R(t,e){return t.length===e.length&&L(t,e)}function L(t,e){if(e.length>t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(t){var e=nt(t.lines),n=e.oldLines,r=e.newLines;void 0!==n?t.oldLines=n:delete t.oldLines,void 0!==r?t.newLines=r:delete t.newLines}function H(t,e,n){t=U(t,n),e=U(e,n);var r={};(t.index||e.index)&&(r.index=t.index||e.index),(t.newFileName||e.newFileName)&&(z(t)?z(e)?(r.oldFileName=q(r,t.oldFileName,e.oldFileName),r.newFileName=q(r,t.newFileName,e.newFileName),r.oldHeader=q(r,t.oldHeader,e.oldHeader),r.newHeader=q(r,t.newHeader,e.newHeader)):(r.oldFileName=t.oldFileName,r.newFileName=t.newFileName,r.oldHeader=t.oldHeader,r.newHeader=t.newHeader):(r.oldFileName=e.oldFileName||t.oldFileName,r.newFileName=e.newFileName||t.newFileName,r.oldHeader=e.oldHeader||t.oldHeader,r.newHeader=e.newHeader||t.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,s=0;i<t.hunks.length||o<e.hunks.length;){var u=t.hunks[i]||{oldStart:1/0},c=e.hunks[o]||{oldStart:1/0};if(W(u,c))r.hunks.push(G(u,a)),i++,s+=u.newLines-u.oldLines;else if(W(c,u))r.hunks.push(G(c,s)),o++,a+=c.newLines-c.oldLines;else{var l={oldStart:Math.min(u.oldStart,c.oldStart),oldLines:0,newStart:Math.min(u.newStart+a,c.oldStart+s),newLines:0,lines:[]};$(l,u.oldStart,u.lines,c.oldStart,c.lines),o++,i++,r.hunks.push(l)}}return r}function U(t,e){if("string"==typeof t){if(/^@@/m.test(t)||/^Index:/m.test(t))return T(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return N(void 0,void 0,e,t)}return t}function z(t){return t.newFileName&&t.newFileName!==t.oldFileName}function q(t,e,n){return e===n?e:(t.conflict=!0,{mine:e,theirs:n})}function W(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function G(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function $(t,e,n,r,i){var o={offset:e,lines:n,index:0},a={offset:r,lines:i,index:0};for(K(t,o,a),K(t,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var s=o.lines[o.index],u=a.lines[a.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==u[0]&&"+"!==u[0])if("+"===s[0]&&" "===u[0]){var c;(c=t.lines).push.apply(c,D(Q(o)))}else if("+"===u[0]&&" "===s[0]){var l;(l=t.lines).push.apply(l,D(Q(a)))}else"-"===s[0]&&" "===u[0]?X(t,o,a):"-"===u[0]&&" "===s[0]?X(t,a,o,!0):s===u?(t.lines.push(s),o.index++,a.index++):V(t,Q(o),Q(a));else Y(t,o,a)}J(t,o),J(t,a),M(t)}function Y(t,e,n){var r=Q(e),i=Q(n);if(tt(r)&&tt(i)){var o,a;if(L(r,i)&&et(n,r,r.length-i.length))return void(o=t.lines).push.apply(o,D(r));if(L(i,r)&&et(e,i,i.length-r.length))return void(a=t.lines).push.apply(a,D(i))}else if(R(r,i)){var s;return void(s=t.lines).push.apply(s,D(r))}V(t,r,i)}function X(t,e,n,r){var i,o=Q(e),a=Z(n,o);a.merged?(i=t.lines).push.apply(i,D(a.merged)):V(t,r?a:o,r?o:a)}function V(t,e,n){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:n})}function K(t,e,n){for(;e.offset<n.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r),e.offset++}}function J(t,e){for(;e.index<e.lines.length;){var n=e.lines[e.index++];t.lines.push(n)}}function Q(t){for(var e=[],n=t.lines[t.index][0];t.index<t.lines.length;){var r=t.lines[t.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;e.push(r),t.index++}return e}function Z(t,e){for(var n=[],r=[],i=0,o=!1,a=!1;i<e.length&&t.index<t.lines.length;){var s=t.lines[t.index],u=e[i];if("+"===u[0])break;if(o=o||" "!==s[0],r.push(u),i++,"+"===s[0])for(a=!0;"+"===s[0];)n.push(s),s=t.lines[++t.index];u.substr(1)===s.substr(1)?(n.push(s),t.index++):a=!0}if("+"===(e[i]||"")[0]&&o&&(a=!0),a)return n;for(;i<e.length;)r.push(e[i++]);return{merged:r,changes:n}}function tt(t){return t.reduce(function(t,e){return t&&"-"===e[0]},!0)}function et(t,e,n){for(var r=0;r<n;r++){var i=e[e.length-n+r].substr(1);if(t.lines[t.index+r]!==" "+i)return!1}return t.index+=n,!0}function nt(t){var e=0,n=0;return t.forEach(function(t){if("string"!=typeof t){var r=nt(t.mine),i=nt(t.theirs);void 0!==e&&(r.oldLines===i.oldLines?e+=r.oldLines:e=void 0),void 0!==n&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==t[0]&&" "!==t[0]||n++,void 0===e||"-"!==t[0]&&" "!==t[0]||e++}),{oldLines:e,newLines:n}}function rt(t){for(var e,n,r=[],i=0;i<t.length;i++)n=(e=t[i]).added?1:e.removed?-1:0,r.push([n,e.value]);return r}function it(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(ot(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function ot(t){var e=t;return e=(e=(e=(e=e.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}O.tokenize=function(t){return t.slice()},O.join=O.removeEmpty=function(t){return t},t.Diff=e,t.diffChars=o,t.diffWords=l,t.diffWordsWithSpace=f,t.diffLines=d,t.diffTrimmedLines=h,t.diffSentences=v,t.diffCss=m,t.diffJson=S,t.diffArrays=k,t.structuredPatch=N,t.createTwoFilesPatch=B,t.createPatch=P,t.applyPatch=j,t.applyPatches=I,t.parsePatch=T,t.merge=H,t.convertChangesToDMP=rt,t.convertChangesToXML=it,t.canonicalize=_,Object.defineProperty(t,"__esModule",{value:!0})}(e)},464(t){"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},820(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,f=128,p=256,d=1/0,h=9007199254740991,g=NaN,v=4294967295,y=[["ary",f],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",p]],m="[object Arguments]",b="[object Array]",D="[object Boolean]",w="[object Date]",x="[object Error]",A="[object Function]",E="[object GeneratorFunction]",C="[object Map]",S="[object Number]",_="[object Object]",O="[object Promise]",k="[object RegExp]",T="[object Set]",F="[object String]",j="[object Symbol]",I="[object WeakMap]",N="[object ArrayBuffer]",B="[object DataView]",P="[object Float32Array]",R="[object Float64Array]",L="[object Int8Array]",M="[object Int16Array]",H="[object Int32Array]",U="[object Uint8Array]",z="[object Uint8ClampedArray]",q="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,K=RegExp(X.source),J=RegExp(V.source),Q=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,lt=/,? & /,ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",Ct="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",Ot="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ft="['\u2019]",jt="["+Et+"]",It="["+Tt+"]",Nt="["+Ct+"]",Bt="\\d+",Pt="["+St+"]",Rt="["+_t+"]",Lt="[^"+Et+Tt+Bt+St+_t+Ot+"]",Mt="\\ud83c[\\udffb-\\udfff]",Ht="[^"+Et+"]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",qt="["+Ot+"]",Wt="\\u200d",Gt="(?:"+Rt+"|"+Lt+")",$t="(?:"+qt+"|"+Lt+")",Yt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Vt="(?:"+Nt+"|"+Mt+")"+"?",Kt="["+kt+"]?",Jt=Kt+Vt+("(?:"+Wt+"(?:"+[Ht,Ut,zt].join("|")+")"+Kt+Vt+")*"),Qt="(?:"+[Pt,Ut,zt].join("|")+")"+Jt,Zt="(?:"+[Ht+Nt+"?",Nt,Ut,zt,jt].join("|")+")",te=RegExp(Ft,"g"),ee=RegExp(Nt,"g"),ne=RegExp(Mt+"(?="+Mt+")|"+Zt+Jt,"g"),re=RegExp([qt+"?"+Rt+"+"+Yt+"(?="+[It,qt,"$"].join("|")+")",$t+"+"+Xt+"(?="+[It,qt+Gt,"$"].join("|")+")",qt+"?"+Gt+"+"+Yt,qt+"+"+Xt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bt,Qt].join("|"),"g"),ie=RegExp("["+Wt+Et+Ct+kt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ue={};ue[P]=ue[R]=ue[L]=ue[M]=ue[H]=ue[U]=ue[z]=ue[q]=ue[W]=!0,ue[m]=ue[b]=ue[N]=ue[D]=ue[B]=ue[w]=ue[x]=ue[A]=ue[C]=ue[S]=ue[_]=ue[k]=ue[T]=ue[F]=ue[I]=!1;var ce={};ce[m]=ce[b]=ce[N]=ce[B]=ce[D]=ce[w]=ce[P]=ce[R]=ce[L]=ce[M]=ce[H]=ce[C]=ce[S]=ce[_]=ce[k]=ce[T]=ce[F]=ce[j]=ce[U]=ce[z]=ce[q]=ce[W]=!0,ce[x]=ce[A]=ce[I]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fe=parseFloat,pe=parseInt,de="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,ge=de||he||Function("return this")(),ve=e&&!e.nodeType&&e,ye=ve&&t&&!t.nodeType&&t,me=ye&&ye.exports===ve,be=me&&de.process,De=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=De&&De.isArrayBuffer,xe=De&&De.isDate,Ae=De&&De.isMap,Ee=De&&De.isRegExp,Ce=De&&De.isSet,Se=De&&De.isTypedArray;function _e(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Oe(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function ke(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Ie(t,e){return!!(null==t?0:t.length)&&qe(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Be(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Re(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Le(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Me(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var He=Ye("length");function Ue(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function ze(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function qe(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):ze(t,Ge,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:g}function Ye(t){return function(e){return null==e?i:e[t]}}function Xe(t){return function(e){return null==t?i:t[e]}}function Ve(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function Ke(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,vn(t)+1).replace(at,""):t}function Ze(t){return function(e){return t(e)}}function tn(t,e){return Be(e,function(e){return t[e]})}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,r=t.length;++n<r&&qe(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&qe(e,t[n],0)>-1;);return n}var on=Xe({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),an=Xe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(t){return"\\"+le[t]}function un(t){return ie.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function ln(t,e){return function(n){return t(e(n))}}function fn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function dn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function hn(t){return un(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):He(t)}function gn(t){return un(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vn(t){for(var e=t.length;e--&&st.test(t.charAt(e)););return e}var yn=Xe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var mn=function t(e){var n,r=(e=null==e?ge:mn.defaults(ge.Object(),e,mn.pick(ge,ae))).Array,st=e.Date,Et=e.Error,Ct=e.Function,St=e.Math,_t=e.Object,Ot=e.RegExp,kt=e.String,Tt=e.TypeError,Ft=r.prototype,jt=Ct.prototype,It=_t.prototype,Nt=e["__core-js_shared__"],Bt=jt.toString,Pt=It.hasOwnProperty,Rt=0,Lt=(n=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=It.toString,Ht=Bt.call(_t),Ut=ge._,zt=Ot("^"+Bt.call(Pt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qt=me?e.Buffer:i,Wt=e.Symbol,Gt=e.Uint8Array,$t=qt?qt.allocUnsafe:i,Yt=ln(_t.getPrototypeOf,_t),Xt=_t.create,Vt=It.propertyIsEnumerable,Kt=Ft.splice,Jt=Wt?Wt.isConcatSpreadable:i,Qt=Wt?Wt.iterator:i,Zt=Wt?Wt.toStringTag:i,ne=function(){try{var t=po(_t,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==ge.clearTimeout&&e.clearTimeout,le=st&&st.now!==ge.Date.now&&st.now,de=e.setTimeout!==ge.setTimeout&&e.setTimeout,he=St.ceil,ve=St.floor,ye=_t.getOwnPropertySymbols,be=qt?qt.isBuffer:i,De=e.isFinite,He=Ft.join,Xe=ln(_t.keys,_t),bn=St.max,Dn=St.min,wn=st.now,xn=e.parseInt,An=St.random,En=Ft.reverse,Cn=po(e,"DataView"),Sn=po(e,"Map"),_n=po(e,"Promise"),On=po(e,"Set"),kn=po(e,"WeakMap"),Tn=po(_t,"create"),Fn=kn&&new kn,jn={},In=Mo(Cn),Nn=Mo(Sn),Bn=Mo(_n),Pn=Mo(On),Rn=Mo(kn),Ln=Wt?Wt.prototype:i,Mn=Ln?Ln.valueOf:i,Hn=Ln?Ln.toString:i;function Un(t){if(ns(t)&&!Ga(t)&&!(t instanceof Gn)){if(t instanceof Wn)return t;if(Pt.call(t,"__wrapped__"))return Ho(t)}return new Wn(t)}var zn=function(){function t(){}return function(e){if(!es(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function qn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Xn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Xn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Yn(t);this.size=e.size}function Jn(t,e){var n=Ga(t),r=!n&&Wa(t),i=!n&&!r&&Va(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Je(t.length,kt):[],u=s.length;for(var c in t)!e&&!Pt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Do(c,u))||s.push(c);return s}function Qn(t){var e=t.length;return e?t[Vr(0,e-1)]:i}function Zn(t,e){return Po(Ti(t),ur(e,0,t.length))}function tr(t){return Po(Ti(t))}function er(t,e,n){(n!==i&&!Ua(t[e],n)||n===i&&!(e in t))&&ar(t,e,n)}function nr(t,e,n){var r=t[e];Pt.call(t,e)&&Ua(r,n)&&(n!==i||e in t)||ar(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(Ua(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,function(t,i,o){e(r,t,n(t),o)}),r}function or(t,e){return t&&Fi(e,js(e),t)}function ar(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:_s(t,e[n]);return a}function ur(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function cr(t,e,n,r,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!es(t))return t;var f=Ga(t);if(f){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Pt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ti(t,s)}else{var p=vo(t),d=p==A||p==E;if(Va(t))return Ei(t,u);if(p==_||p==m||d&&!o){if(s=c||d?{}:mo(t),!u)return c?function(t,e){return Fi(t,go(t),e)}(t,function(t,e){return t&&Fi(e,Is(e),t)}(s,t)):function(t,e){return Fi(t,ho(t),e)}(t,or(s,t))}else{if(!ce[p])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case N:return Ci(t);case D:case w:return new r(+t);case B:return function(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case P:case R:case L:case M:case H:case U:case z:case q:case W:return Si(t,n);case C:return new r;case S:case F:return new r(t);case k:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case j:return i=t,Mn?_t(Mn.call(i)):{}}var i}(t,p,u)}}a||(a=new Kn);var h=a.get(t);if(h)return h;a.set(t,s),ss(t)?t.forEach(function(r){s.add(cr(r,e,n,r,t,a))}):rs(t)&&t.forEach(function(r,i){s.set(i,cr(r,e,n,i,t,a))});var g=f?i:(l?c?oo:io:c?Is:js)(t);return ke(g||t,function(r,i){g&&(r=t[i=r]),nr(s,i,cr(r,e,n,i,t,a))}),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=_t(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new Tt(o);return jo(function(){t.apply(i,n)},e)}function pr(t,e,n,r){var i=-1,o=Ie,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Be(e,Ze(n))),r?(o=Ne,a=!1):e.length>=200&&(o=en,a=!1,e=new Vn(e));t:for(;++i<s;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;u.push(l)}else o(e,f,r)||u.push(l)}return u}Un.templateSettings={escape:Q,evaluate:Z,interpolate:tt,variable:"",imports:{_:Un}},Un.prototype=qn.prototype,Un.prototype.constructor=Un,Wn.prototype=zn(qn.prototype),Wn.prototype.constructor=Wn,Gn.prototype=zn(qn.prototype),Gn.prototype.constructor=Gn,$n.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},$n.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$n.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===a?i:n}return Pt.call(e,t)?e[t]:i},$n.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==i:Pt.call(e,t)},$n.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===i?a:e,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Kt.call(e,n,1),--this.size,!0)},Yn.prototype.get=function(t){var e=this.__data__,n=rr(e,t);return n<0?i:e[n][1]},Yn.prototype.has=function(t){return rr(this.__data__,t)>-1},Yn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Xn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(Sn||Yn),string:new $n}},Xn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Xn.prototype.get=function(t){return lo(this,t).get(t)},Xn.prototype.has=function(t){return lo(this,t).has(t)},Xn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(t){return this.__data__.set(t,a),this},Vn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Xn(r)}return n.set(t,e),this.size=n.size,this};var dr=Ni(wr),hr=Ni(xr,!0);function gr(t,e){var n=!0;return dr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function vr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function yr(t,e){var n=[];return dr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function mr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=bo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?mr(s,e-1,n,r,i):Pe(i,s):r||(i[i.length]=s)}return i}var br=Bi(),Dr=Bi(!0);function wr(t,e){return t&&br(t,e,js)}function xr(t,e){return t&&Dr(t,e,js)}function Ar(t,e){return je(e,function(e){return Qa(t[e])})}function Er(t,e){for(var n=0,r=(e=Di(e,t)).length;null!=t&&n<r;)t=t[Lo(e[n++])];return n&&n==r?t:i}function Cr(t,e,n){var r=e(t);return Ga(t)?r:Pe(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":Zt&&Zt in _t(t)?function(t){var e=Pt.call(t,Zt),n=t[Zt];try{t[Zt]=i;var r=!0}catch(t){}var o=Mt.call(t);r&&(e?t[Zt]=n:delete t[Zt]);return o}(t):function(t){return Mt.call(t)}(t)}function _r(t,e){return t>e}function Or(t,e){return null!=t&&Pt.call(t,e)}function kr(t,e){return null!=t&&e in _t(t)}function Tr(t,e,n){for(var o=n?Ne:Ie,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,f=[];u--;){var p=t[u];u&&e&&(p=Be(p,Ze(e))),l=Dn(p.length,l),c[u]=!n&&(e||a>=120&&p.length>=120)?new Vn(u&&p):i}p=t[0];var d=-1,h=c[0];t:for(;++d<a&&f.length<l;){var g=p[d],v=e?e(g):g;if(g=n||0!==g?g:0,!(h?en(h,v):o(f,v,n))){for(u=s;--u;){var y=c[u];if(!(y?en(y,v):o(t[u],v,n)))continue t}h&&h.push(v),f.push(g)}}return f}function Fr(t,e,n){var r=null==(t=ko(t,e=Di(e,t)))?t:t[Lo(Jo(e))];return null==r?i:_e(r,t,n)}function jr(t){return ns(t)&&Sr(t)==m}function Ir(t,e,n,r,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ga(t),u=Ga(e),c=s?b:vo(t),l=u?b:vo(e),f=(c=c==m?_:c)==_,p=(l=l==m?_:l)==_,d=c==l;if(d&&Va(t)){if(!Va(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Kn),s||ls(t)?no(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case B:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!o(new Gt(t),new Gt(e)));case D:case w:case S:return Ua(+t,+e);case x:return t.name==e.name&&t.message==e.message;case k:case F:return t==e+"";case C:var s=cn;case T:var u=1&r;if(s||(s=pn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,c,n,r,o,a);if(!(1&n)){var h=f&&Pt.call(t,"__wrapped__"),g=p&&Pt.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,y=g?e.value():e;return a||(a=new Kn),o(v,y,n,r,a)}}if(!d)return!1;return a||(a=new Kn),function(t,e,n,r,o,a){var s=1&n,u=io(t),c=u.length,l=io(e),f=l.length;if(c!=f&&!s)return!1;var p=c;for(;p--;){var d=u[p];if(!(s?d in e:Pt.call(e,d)))return!1}var h=a.get(t),g=a.get(e);if(h&&g)return h==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);var y=s;for(;++p<c;){var m=t[d=u[p]],b=e[d];if(r)var D=s?r(b,m,d,e,t,a):r(m,b,d,t,e,a);if(!(D===i?m===b||o(m,b,n,r,a):D)){v=!1;break}y||(y="constructor"==d)}if(v&&!y){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,o,a)}(t,e,n,r,Ir,o))}function Nr(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=_t(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=n[o])[0],l=t[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in t))return!1}else{var p=new Kn;if(r)var d=r(l,f,c,t,e,p);if(!(d===i?Ir(f,l,3,r,p):d))return!1}}return!0}function Br(t){return!(!es(t)||(e=t,Lt&&Lt in e))&&(Qa(t)?zt:mt).test(Mo(t));var e}function Pr(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ga(t)?zr(t[0],t[1]):Ur(t):du(t)}function Rr(t){if(!Co(t))return Xe(t);var e=[];for(var n in _t(t))Pt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in _t(t))e.push(n);return e}(t);var e=Co(t),n=[];for(var r in t)("constructor"!=r||!e&&Pt.call(t,r))&&n.push(r);return n}function Mr(t,e){return t<e}function Hr(t,e){var n=-1,i=Ya(t)?r(t.length):[];return dr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function Ur(t){var e=fo(t);return 1==e.length&&e[0][2]?_o(e[0][0],e[0][1]):function(n){return n===t||Nr(n,t,e)}}function zr(t,e){return xo(t)&&So(e)?_o(Lo(t),e):function(n){var r=_s(n,t);return r===i&&r===e?Os(n,t):Ir(e,r,3)}}function qr(t,e,n,r,o){t!==e&&br(e,function(a,s){if(o||(o=new Kn),es(a))!function(t,e,n,r,o,a,s){var u=To(t,n),c=To(e,n),l=s.get(c);if(l)return void er(t,n,l);var f=a?a(u,c,n+"",t,e,s):i,p=f===i;if(p){var d=Ga(c),h=!d&&Va(c),g=!d&&!h&&ls(c);f=c,d||h||g?Ga(u)?f=u:Xa(u)?f=Ti(u):h?(p=!1,f=Ei(c,!0)):g?(p=!1,f=Si(c,!0)):f=[]:os(c)||Wa(c)?(f=u,Wa(u)?f=ms(u):es(u)&&!Qa(u)||(f=mo(c))):p=!1}p&&(s.set(c,f),o(f,c,r,a,s),s.delete(c));er(t,n,f)}(t,e,s,n,qr,r,o);else{var u=r?r(To(t,s),a,s+"",t,e,o):i;u===i&&(u=a),er(t,s,u)}},Is)}function Wr(t,e){var n=t.length;if(n)return Do(e+=e<0?n:0,n)?t[e]:i}function Gr(t,e,n){e=e.length?Be(e,function(t){return Ga(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t}):[iu];var r=-1;e=Be(e,Ze(co()));var i=Hr(t,function(t,n,i){var o=Be(e,function(e){return e(t)});return{criteria:o,index:++r,value:t}});return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=_i(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)})}function $r(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Er(t,a);n(s,a)&&ti(o,Di(a,t),s)}return o}function Yr(t,e,n,r){var i=r?We:qe,o=-1,a=e.length,s=t;for(t===e&&(e=Ti(e)),n&&(s=Be(t,Ze(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Kt.call(s,u,1),Kt.call(t,u,1);return t}function Xr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Do(i)?Kt.call(t,i,1):pi(t,i)}}return t}function Vr(t,e){return t+ve(An()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ve(e/2))&&(t+=t)}while(e);return n}function Jr(t,e){return Io(Oo(t,e,iu),t+"")}function Qr(t){return Qn(Us(t))}function Zr(t,e){var n=Us(t);return Po(n,ur(e,0,n.length))}function ti(t,e,n,r){if(!es(t))return t;for(var o=-1,a=(e=Di(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Lo(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var f=u[c];(l=r?r(f,c,u):i)===i&&(l=es(f)?f:Do(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=Fn?function(t,e){return Fn.set(t,e),t}:iu,ni=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return Po(Us(t))}function ii(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return dr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,c=cs(e),l=e===i;o<a;){var f=ve((o+a)/2),p=n(t[f]),d=p!==i,h=null===p,g=p==p,v=cs(p);if(s)var y=r||g;else y=l?g&&(r||d):u?g&&d&&(r||!h):c?g&&d&&!h&&(r||!v):!h&&!v&&(r?p<=e:p<e);y?o=f+1:a=f}return Dn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!Ua(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?g:+t}function li(t){if("string"==typeof t)return t;if(Ga(t))return Be(t,li)+"";if(cs(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function fi(t,e,n){var r=-1,i=Ie,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ne;else if(o>=200){var c=e?null:Ki(t);if(c)return pn(c);a=!1,i=en,u=new Vn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue t;e&&u.push(f),s.push(l)}else i(u,f,n)||(u!==s&&u.push(f),s.push(l))}return s}function pi(t,e){var n=-1,r=(e=Di(e,t)).length;if(!r)return!0;for(;++n<r;){var i=Lo(e[n]);if("__proto__"===i&&!Pt.call(t,"__proto__"))return!1;if(("constructor"===i||"prototype"===i)&&n<r-1)return!1}var o=ko(t,e);return null==o||delete o[Lo(Jo(e))]}function di(t,e,n,r){return ti(t,e,n(Er(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function gi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Re(e,function(t,e){return e.func.apply(e.thisArg,Pe([t],e.args))},n)}function vi(t,e,n){var i=t.length;if(i<2)return i?fi(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=pr(a[o]||s,t[u],e,n));return fi(mr(a,1),e,n)}function yi(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var u=r<a?e[r]:i;n(s,t[r],u)}return s}function mi(t){return Xa(t)?t:[]}function bi(t){return"function"==typeof t?t:iu}function Di(t,e){return Ga(t)?t:xo(t,e)?[t]:Ro(bs(t))}var wi=Jr;function xi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ii(t,e,n)}var Ai=ie||function(t){return ge.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=$t?$t(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function Si(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function _i(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=cs(t),s=e!==i,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t<e||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Oi(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=bn(a-s,0),f=r(c+l),p=!i;++u<c;)f[u]=e[u];for(;++o<s;)(p||o<a)&&(f[n[o]]=t[o]);for(;l--;)f[u++]=t[o++];return f}function ki(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,f=bn(a-u,0),p=r(f+l),d=!i;++o<f;)p[o]=t[o];for(var h=o;++c<l;)p[h+c]=e[c];for(;++s<u;)(d||o<a)&&(p[h+n[s]]=t[o++]);return p}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Fi(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?ar(n,u,c):nr(n,u,c)}return n}function ji(t,e){return function(n,r){var i=Ga(n)?Oe:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Ii(t){return Jr(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=_t(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e})}function Ni(t,e){return function(n,r){if(null==n)return n;if(!Ya(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=_t(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Bi(t){return function(e,n,r){for(var i=-1,o=_t(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Pi(t){return function(e){var n=un(e=bs(e))?gn(e):i,r=n?n[0]:e.charAt(0),o=n?xi(n,1).join(""):e.slice(1);return r[t]()+o}}function Ri(t){return function(e){return Re(Qs(Ws(e).replace(te,"")),t,"")}}function Li(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=zn(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Mi(t){return function(e,n,r){var o=_t(e);if(!Ya(e)){var a=co(n,3);e=js(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Hi(t){return ro(function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Tt(o);if(a&&!u&&"wrapper"==so(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=so(s=e[r]),l="wrapper"==c?ao(s):i;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function Ui(t,e,n,o,a,s,u,c,l,p){var d=e&f,h=1&e,g=2&e,v=24&e,y=512&e,m=g?i:Li(t);return function f(){for(var b=arguments.length,D=r(b),w=b;w--;)D[w]=arguments[w];if(v)var x=uo(f),A=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(D,x);if(o&&(D=Oi(D,o,a,v)),s&&(D=ki(D,s,u,v)),b-=A,v&&b<p){var E=fn(D,x);return Xi(t,e,Ui,f.placeholder,n,D,E,c,l,p-b)}var C=h?n:this,S=g?C[t]:t;return b=D.length,c?D=function(t,e){var n=t.length,r=Dn(e.length,n),o=Ti(t);for(;r--;){var a=e[r];t[r]=Do(a,n)?o[a]:i}return t}(D,c):y&&b>1&&D.reverse(),d&&l<b&&(D.length=l),this&&this!==ge&&this instanceof f&&(S=m||Li(S)),S.apply(C,D)}}function zi(t,e){return function(n,r){return function(t,e,n,r){return wr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function qi(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=t(n,r)}return o}}function Wi(t){return ro(function(e){return e=Be(e,Ze(co())),Jr(function(n){var r=this;return t(e,function(t){return _e(t,r,n)})})})}function Gi(t,e){var n=(e=e===i?" ":li(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,he(t/hn(e)));return un(e)?xi(gn(r),0,t).join(""):r.slice(0,t)}function $i(t){return function(e,n,o){return o&&"number"!=typeof o&&wo(e,n,o)&&(n=o=i),e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n,i){for(var o=-1,a=bn(he((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:hs(o),t)}}function Yi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ys(e),n=ys(n)),t(e,n)}}function Xi(t,e,n,r,o,a,s,u,f,p){var d=8&e;e|=d?c:l,4&(e&=~(d?l:c))||(e&=-4);var h=[t,e,o,d?a:i,d?s:i,d?i:a,d?i:s,u,f,p],g=n.apply(i,h);return Ao(t)&&Fo(g,h),g.placeholder=r,No(g,t,e)}function Vi(t){var e=St[t];return function(t,n){if(t=ys(t),(n=null==n?0:Dn(gs(n),292))&&De(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ki=On&&1/pn(new On([,-0]))[1]==d?function(t){return new On(t)}:cu;function Ji(t){return function(e){var n=vo(e);return n==C?cn(e):n==T?dn(e):function(t,e){return Be(e,function(e){return[e,t[e]]})}(e,t(e))}}function Qi(t,e,n,a,d,h,g,v){var y=2&e;if(!y&&"function"!=typeof t)throw new Tt(o);var m=a?a.length:0;if(m||(e&=-97,a=d=i),g=g===i?g:bn(gs(g),0),v=v===i?v:gs(v),m-=d?d.length:0,e&l){var b=a,D=d;a=d=i}var w=y?i:ao(t),x=[t,e,n,a,d,b,D,h,g,v];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==f&&8==n||r==f&&n==p&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?Oi(c,u,e[4]):u,t[4]=c?fn(t[3],s):e[4]}(u=e[5])&&(c=t[5],t[5]=c?ki(c,u,e[6]):u,t[6]=c?fn(t[5],s):e[6]);(u=e[7])&&(t[7]=u);r&f&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(x,w),t=x[0],e=x[1],n=x[2],a=x[3],d=x[4],!(v=x[9]=x[9]===i?y?0:t.length:bn(x[9]-m,0))&&24&e&&(e&=-25),e&&1!=e)A=8==e||e==u?function(t,e,n){var o=Li(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=uo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:fn(u,l);return(s-=f.length)<n?Xi(t,e,Ui,a.placeholder,i,u,f,i,i,n-s):_e(this&&this!==ge&&this instanceof a?o:t,this,u)}}(t,e,v):e!=c&&33!=e||d.length?Ui.apply(i,x):function(t,e,n,i){var o=1&e,a=Li(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=r(l+u),p=this&&this!==ge&&this instanceof e?a:t;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return _e(p,o?n:this,f)}}(t,e,n,a);else var A=function(t,e,n){var r=1&e,i=Li(t);return function e(){return(this&&this!==ge&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return No((w?ei:Fo)(A,x),t,e)}function Zi(t,e,n,r){return t===i||Ua(t,It[n])&&!Pt.call(r,n)?e:t}function to(t,e,n,r,o,a){return es(t)&&es(e)&&(a.set(e,t),qr(t,e,i,to,a),a.delete(e)),t}function eo(t){return os(t)?i:t}function no(t,e,n,r,o,a){var s=1&n,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&n?new Vn:i;for(a.set(t,e),a.set(e,t);++p<u;){var g=t[p],v=e[p];if(r)var y=s?r(v,g,p,e,t,a):r(g,v,p,t,e,a);if(y!==i){if(y)continue;d=!1;break}if(h){if(!Me(e,function(t,e){if(!en(h,e)&&(g===t||o(g,t,n,r,a)))return h.push(e)})){d=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d}function ro(t){return Io(Oo(t,i,$o),t+"")}function io(t){return Cr(t,js,ho)}function oo(t){return Cr(t,Is,go)}var ao=Fn?function(t){return Fn.get(t)}:cu;function so(t){for(var e=t.name+"",n=jn[e],r=Pt.call(jn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(Pt.call(Un,"placeholder")?Un:t).placeholder}function co(){var t=Un.iteratee||ou;return t=t===ou?Pr:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,So(i)]}return e}function po(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Br(n)?n:i}var ho=ye?function(t){return null==t?[]:(t=_t(t),je(ye(t),function(e){return Vt.call(t,e)}))}:vu,go=ye?function(t){for(var e=[];t;)Pe(e,ho(t)),t=Yt(t);return e}:vu,vo=Sr;function yo(t,e,n){for(var r=-1,i=(e=Di(e,t)).length,o=!1;++r<i;){var a=Lo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&Do(a,i)&&(Ga(t)||Wa(t))}function mo(t){return"function"!=typeof t.constructor||Co(t)?{}:zn(Yt(t))}function bo(t){return Ga(t)||Wa(t)||!!(Jt&&t&&t[Jt])}function Do(t,e){var n=typeof t;return!!(e=e??h)&&("number"==n||"symbol"!=n&&Dt.test(t))&&t>-1&&t%1==0&&t<e}function wo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?Ya(n)&&Do(e,n.length):"string"==r&&e in n)&&Ua(n[e],t)}function xo(t,e){if(Ga(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(nt.test(t)||!et.test(t)||null!=e&&t in _t(e))}function Ao(t){var e=so(t),n=Un[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(Cn&&vo(new Cn(new ArrayBuffer(1)))!=B||Sn&&vo(new Sn)!=C||_n&&vo(_n.resolve())!=O||On&&vo(new On)!=T||kn&&vo(new kn)!=I)&&(vo=function(t){var e=Sr(t),n=e==_?t.constructor:i,r=n?Mo(n):"";if(r)switch(r){case In:return B;case Nn:return C;case Bn:return O;case Pn:return T;case Rn:return I}return e});var Eo=Nt?Qa:yu;function Co(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||It)}function So(t){return t==t&&!es(t)}function _o(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in _t(n)))}}function Oo(t,e,n){return e=bn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=bn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),_e(t,this,u)}}function ko(t,e){return e.length<2?t:Er(t,ii(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Fo=Bo(ei),jo=de||function(t,e){return ge.setTimeout(t,e)},Io=Bo(ni);function No(t,e,n){var r=e+"";return Io(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ke(y,function(n){var r="_."+n[0];e&n[1]&&!Ie(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(lt):[]}(r),n)))}function Bo(t){var e=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Vr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Ro=function(t){var e=Ba(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,function(t,n,r,i){e.push(r?i.replace(dt,"$1"):n||t)}),e});function Lo(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mo(t){if(null!=t){try{return Bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ho(t){if(t instanceof Gn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Uo=Jr(function(t,e){return Xa(t)?pr(t,mr(e,1,Xa,!0)):[]}),zo=Jr(function(t,e){var n=Jo(e);return Xa(n)&&(n=i),Xa(t)?pr(t,mr(e,1,Xa,!0),co(n,2)):[]}),qo=Jr(function(t,e){var n=Jo(e);return Xa(n)&&(n=i),Xa(t)?pr(t,mr(e,1,Xa,!0),i,n):[]});function Wo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),ze(t,co(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=gs(n),o=n<0?bn(r+o,0):Dn(o,r-1)),ze(t,co(e,3),o,!0)}function $o(t){return(null==t?0:t.length)?mr(t,1):[]}function Yo(t){return t&&t.length?t[0]:i}var Xo=Jr(function(t){var e=Be(t,mi);return e.length&&e[0]===t[0]?Tr(e):[]}),Vo=Jr(function(t){var e=Jo(t),n=Be(t,mi);return e===Jo(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Tr(n,co(e,2)):[]}),Ko=Jr(function(t){var e=Jo(t),n=Be(t,mi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,i,e):[]});function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Jr(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?Yr(t,e):t}var ta=ro(function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Xr(t,Be(e,function(t){return Do(t,n)?+t:t}).sort(_i)),r});function ea(t){return null==t?t:En.call(t)}var na=Jr(function(t){return fi(mr(t,1,Xa,!0))}),ra=Jr(function(t){var e=Jo(t);return Xa(e)&&(e=i),fi(mr(t,1,Xa,!0),co(e,2))}),ia=Jr(function(t){var e=Jo(t);return e="function"==typeof e?e:i,fi(mr(t,1,Xa,!0),i,e)});function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,function(t){if(Xa(t))return e=bn(t.length,e),!0}),Je(e,function(e){return Be(t,Ye(e))})}function aa(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Be(n,function(t){return _e(e,i,t)})}var sa=Jr(function(t,e){return Xa(t)?pr(t,e):[]}),ua=Jr(function(t){return vi(je(t,Xa))}),ca=Jr(function(t){var e=Jo(t);return Xa(e)&&(e=i),vi(je(t,Xa),co(e,2))}),la=Jr(function(t){var e=Jo(t);return e="function"==typeof e?e:i,vi(je(t,Xa),i,e)}),fa=Jr(oa);var pa=Jr(function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,aa(t,n)});function da(t){var e=Un(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var ga=ro(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&Do(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(i),t})):this.thru(o)});var va=ji(function(t,e,n){Pt.call(t,n)?++t[n]:ar(t,n,1)});var ya=Mi(Wo),ma=Mi(Go);function ba(t,e){return(Ga(t)?ke:dr)(t,co(e,3))}function Da(t,e){return(Ga(t)?Te:hr)(t,co(e,3))}var wa=ji(function(t,e,n){Pt.call(t,n)?t[n].push(e):ar(t,n,[e])});var xa=Jr(function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return dr(t,function(t){a[++i]=o?_e(e,t,n):Fr(t,e,n)}),a}),Aa=ji(function(t,e,n){ar(t,n,e)});function Ea(t,e){return(Ga(t)?Be:Hr)(t,co(e,3))}var Ca=ji(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Sa=Jr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&wo(t,e[0],e[1])?e=[]:n>2&&wo(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,mr(e,1),[])}),_a=le||function(){return ge.Date.now()};function Oa(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Qi(t,f,i,i,i,i,e)}function ka(t,e){var n;if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ta=Jr(function(t,e,n){var r=1;if(n.length){var i=fn(n,uo(Ta));r|=c}return Qi(t,r,e,n,i)}),Fa=Jr(function(t,e,n){var r=3;if(n.length){var i=fn(n,uo(Fa));r|=c}return Qi(e,r,t,n,i)});function ja(t,e,n){var r,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new Tt(o);function g(e){var n=r,o=a;return r=a=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=s}function y(){var t=_a();if(v(t))return m(t);c=jo(y,function(t){var n=e-(t-l);return d?Dn(n,s-(t-f)):n}(t))}function m(t){return c=i,h&&r?g(t):(r=a=i,u)}function b(){var t=_a(),n=v(t);if(r=arguments,a=this,l=t,n){if(c===i)return function(t){return f=t,c=jo(y,e),p?g(t):u}(l);if(d)return Ai(c),c=jo(y,e),g(l)}return c===i&&(c=jo(y,e)),u}return e=ys(e)||0,es(n)&&(p=!!n.leading,s=(d="maxWait"in n)?bn(ys(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==i&&Ai(c),f=0,r=l=a=c=i},b.flush=function(){return c===i?u:m(_a())},b}var Ia=Jr(function(t,e){return fr(t,1,e)}),Na=Jr(function(t,e,n){return fr(t,ys(e)||0,n)});function Ba(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ba.Cache||Xn),n}function Pa(t){if("function"!=typeof t)throw new Tt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ba.Cache=Xn;var Ra=wi(function(t,e){var n=(e=1==e.length&&Ga(e[0])?Be(e[0],Ze(co())):Be(mr(e,1),Ze(co()))).length;return Jr(function(r){for(var i=-1,o=Dn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return _e(t,this,r)})}),La=Jr(function(t,e){var n=fn(e,uo(La));return Qi(t,c,i,e,n)}),Ma=Jr(function(t,e){var n=fn(e,uo(Ma));return Qi(t,l,i,e,n)}),Ha=ro(function(t,e){return Qi(t,p,i,i,i,e)});function Ua(t,e){return t===e||t!=t&&e!=e}var za=Yi(_r),qa=Yi(function(t,e){return t>=e}),Wa=jr(function(){return arguments}())?jr:function(t){return ns(t)&&Pt.call(t,"callee")&&!Vt.call(t,"callee")},Ga=r.isArray,$a=we?Ze(we):function(t){return ns(t)&&Sr(t)==N};function Ya(t){return null!=t&&ts(t.length)&&!Qa(t)}function Xa(t){return ns(t)&&Ya(t)}var Va=be||yu,Ka=xe?Ze(xe):function(t){return ns(t)&&Sr(t)==w};function Ja(t){if(!ns(t))return!1;var e=Sr(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Qa(t){if(!es(t))return!1;var e=Sr(t);return e==A||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Za(t){return"number"==typeof t&&t==gs(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Ae?Ze(Ae):function(t){return ns(t)&&vo(t)==C};function is(t){return"number"==typeof t||ns(t)&&Sr(t)==S}function os(t){if(!ns(t)||Sr(t)!=_)return!1;var e=Yt(t);if(null===e)return!0;var n=Pt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Bt.call(n)==Ht}var as=Ee?Ze(Ee):function(t){return ns(t)&&Sr(t)==k};var ss=Ce?Ze(Ce):function(t){return ns(t)&&vo(t)==T};function us(t){return"string"==typeof t||!Ga(t)&&ns(t)&&Sr(t)==F}function cs(t){return"symbol"==typeof t||ns(t)&&Sr(t)==j}var ls=Se?Ze(Se):function(t){return ns(t)&&ts(t.length)&&!!ue[Sr(t)]};var fs=Yi(Mr),ps=Yi(function(t,e){return t<=e});function ds(t){if(!t)return[];if(Ya(t))return us(t)?gn(t):Ti(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=vo(t);return(e==C?cn:e==T?pn:Us)(t)}function hs(t){return t?(t=ys(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=hs(t),n=e%1;return e==e?n?e-n:e:0}function vs(t){return t?ur(gs(t),0,v):0}function ys(t){if("number"==typeof t)return t;if(cs(t))return g;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=yt.test(t);return n||bt.test(t)?pe(t.slice(2),n?2:8):vt.test(t)?g:+t}function ms(t){return Fi(t,Is(t))}function bs(t){return null==t?"":li(t)}var Ds=Ii(function(t,e){if(Co(e)||Ya(e))Fi(e,js(e),t);else for(var n in e)Pt.call(e,n)&&nr(t,n,e[n])}),ws=Ii(function(t,e){Fi(e,Is(e),t)}),xs=Ii(function(t,e,n,r){Fi(e,Is(e),t,r)}),As=Ii(function(t,e,n,r){Fi(e,js(e),t,r)}),Es=ro(sr);var Cs=Jr(function(t,e){t=_t(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&wo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Is(a),u=-1,c=s.length;++u<c;){var l=s[u],f=t[l];(f===i||Ua(f,It[l])&&!Pt.call(t,l))&&(t[l]=a[l])}return t}),Ss=Jr(function(t){return t.push(i,to),_e(Bs,i,t)});function _s(t,e,n){var r=null==t?i:Er(t,e);return r===i?n:r}function Os(t,e){return null!=t&&yo(t,e,kr)}var ks=zi(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n},eu(iu)),Ts=zi(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Pt.call(t,e)?t[e].push(n):t[e]=[n]},co),Fs=Jr(Fr);function js(t){return Ya(t)?Jn(t):Rr(t)}function Is(t){return Ya(t)?Jn(t,!0):Lr(t)}var Ns=Ii(function(t,e,n){qr(t,e,n)}),Bs=Ii(function(t,e,n,r){qr(t,e,n,r)}),Ps=ro(function(t,e){var n={};if(null==t)return n;var r=!1;e=Be(e,function(e){return e=Di(e,t),r||(r=e.length>1),e}),Fi(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)pi(n,e[i]);return n});var Rs=ro(function(t,e){return null==t?{}:function(t,e){return $r(t,e,function(e,n){return Os(t,n)})}(t,e)});function Ls(t,e){if(null==t)return{};var n=Be(oo(t),function(t){return[t]});return e=co(e),$r(t,n,function(t,n){return e(t,n[0])})}var Ms=Ji(js),Hs=Ji(Is);function Us(t){return null==t?[]:tn(t,js(t))}var zs=Ri(function(t,e,n){return e=e.toLowerCase(),t+(n?qs(e):e)});function qs(t){return Js(bs(t).toLowerCase())}function Ws(t){return(t=bs(t))&&t.replace(wt,on).replace(ee,"")}var Gs=Ri(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),$s=Ri(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ys=Pi("toLowerCase");var Xs=Ri(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var Vs=Ri(function(t,e,n){return t+(n?" ":"")+Js(e)});var Ks=Ri(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Js=Pi("toUpperCase");function Qs(t,e,n){return t=bs(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(ft)||[]}(t):t.match(e)||[]}var Zs=Jr(function(t,e){try{return _e(t,i,e)}catch(t){return Ja(t)?t:new Et(t)}}),tu=ro(function(t,e){return ke(e,function(e){e=Lo(e),ar(t,e,Ta(t[e],t))}),t});function eu(t){return function(){return t}}var nu=Hi(),ru=Hi(!0);function iu(t){return t}function ou(t){return Pr("function"==typeof t?t:cr(t,1))}var au=Jr(function(t,e){return function(n){return Fr(n,t,e)}}),su=Jr(function(t,e){return function(n){return Fr(t,n,e)}});function uu(t,e,n){var r=js(e),i=Ar(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ar(e,js(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Qa(t);return ke(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})}),t}function cu(){}var lu=Wi(Be),fu=Wi(Fe),pu=Wi(Me);function du(t){return xo(t)?Ye(Lo(t)):function(t){return function(e){return Er(e,t)}}(t)}var hu=$i(),gu=$i(!0);function vu(){return[]}function yu(){return!1}var mu=qi(function(t,e){return t+e},0),bu=Vi("ceil"),Du=qi(function(t,e){return t/e},1),wu=Vi("floor");var xu,Au=qi(function(t,e){return t*e},1),Eu=Vi("round"),Cu=qi(function(t,e){return t-e},0);return Un.after=function(t,e){if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},Un.ary=Oa,Un.assign=Ds,Un.assignIn=ws,Un.assignInWith=xs,Un.assignWith=As,Un.at=Es,Un.before=ka,Un.bind=Ta,Un.bindAll=tu,Un.bindKey=Fa,Un.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},Un.chain=da,Un.chunk=function(t,e,n){e=(n?wo(t,e,n):e===i)?1:bn(gs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(he(o/e));a<o;)u[s++]=ii(t,a,a+=e);return u},Un.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Un.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Pe(Ga(n)?Ti(n):[n],mr(e,1))},Un.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?Be(t,function(t){if("function"!=typeof t[1])throw new Tt(o);return[n(t[0]),t[1]]}):[],Jr(function(n){for(var r=-1;++r<e;){var i=t[r];if(_e(i[0],this,n))return _e(i[1],this,n)}})},Un.conforms=function(t){return function(t){var e=js(t);return function(n){return lr(n,t,e)}}(cr(t,1))},Un.constant=eu,Un.countBy=va,Un.create=function(t,e){var n=zn(t);return null==e?n:or(n,e)},Un.curry=function t(e,n,r){var o=Qi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Un.curryRight=function t(e,n,r){var o=Qi(e,u,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},Un.debounce=ja,Un.defaults=Cs,Un.defaultsDeep=Ss,Un.defer=Ia,Un.delay=Na,Un.difference=Uo,Un.differenceBy=zo,Un.differenceWith=qo,Un.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===i?1:gs(e))<0?0:e,r):[]},Un.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===i?1:gs(e)))<0?0:e):[]},Un.dropRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0,!0):[]},Un.dropWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0):[]},Un.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&wo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:gs(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Un.filter=function(t,e){return(Ga(t)?je:yr)(t,co(e,3))},Un.flatMap=function(t,e){return mr(Ea(t,e),1)},Un.flatMapDeep=function(t,e){return mr(Ea(t,e),d)},Un.flatMapDepth=function(t,e,n){return n=n===i?1:gs(n),mr(Ea(t,e),n)},Un.flatten=$o,Un.flattenDeep=function(t){return(null==t?0:t.length)?mr(t,d):[]},Un.flattenDepth=function(t,e){return(null==t?0:t.length)?mr(t,e=e===i?1:gs(e)):[]},Un.flip=function(t){return Qi(t,512)},Un.flow=nu,Un.flowRight=ru,Un.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];ar(r,i[0],i[1])}return r},Un.functions=function(t){return null==t?[]:Ar(t,js(t))},Un.functionsIn=function(t){return null==t?[]:Ar(t,Is(t))},Un.groupBy=wa,Un.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},Un.intersection=Xo,Un.intersectionBy=Vo,Un.intersectionWith=Ko,Un.invert=ks,Un.invertBy=Ts,Un.invokeMap=xa,Un.iteratee=ou,Un.keyBy=Aa,Un.keys=js,Un.keysIn=Is,Un.map=Ea,Un.mapKeys=function(t,e){var n={};return e=co(e,3),wr(t,function(t,r,i){ar(n,e(t,r,i),t)}),n},Un.mapValues=function(t,e){var n={};return e=co(e,3),wr(t,function(t,r,i){ar(n,r,e(t,r,i))}),n},Un.matches=function(t){return Ur(cr(t,1))},Un.matchesProperty=function(t,e){return zr(t,cr(e,1))},Un.memoize=Ba,Un.merge=Ns,Un.mergeWith=Bs,Un.method=au,Un.methodOf=su,Un.mixin=uu,Un.negate=Pa,Un.nthArg=function(t){return t=gs(t),Jr(function(e){return Wr(e,t)})},Un.omit=Ps,Un.omitBy=function(t,e){return Ls(t,Pa(co(e)))},Un.once=function(t){return ka(2,t)},Un.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Gr(t,e,n))},Un.over=lu,Un.overArgs=Ra,Un.overEvery=fu,Un.overSome=pu,Un.partial=La,Un.partialRight=Ma,Un.partition=Ca,Un.pick=Rs,Un.pickBy=Ls,Un.property=du,Un.propertyOf=function(t){return function(e){return null==t?i:Er(t,e)}},Un.pull=Qo,Un.pullAll=Zo,Un.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,co(n,2)):t},Un.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,i,n):t},Un.pullAt=ta,Un.range=hu,Un.rangeRight=gu,Un.rearg=Ha,Un.reject=function(t,e){return(Ga(t)?je:yr)(t,Pa(co(e,3)))},Un.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Xr(t,i),n},Un.rest=function(t,e){if("function"!=typeof t)throw new Tt(o);return Jr(t,e=e===i?e:gs(e))},Un.reverse=ea,Un.sampleSize=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),(Ga(t)?Zn:Zr)(t,e)},Un.set=function(t,e,n){return null==t?t:ti(t,e,n)},Un.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ti(t,e,n,r)},Un.shuffle=function(t){return(Ga(t)?tr:ri)(t)},Un.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&wo(t,e,n)?(e=0,n=r):(e=null==e?0:gs(e),n=n===i?r:gs(n)),ii(t,e,n)):[]},Un.sortBy=Sa,Un.sortedUniq=function(t){return t&&t.length?ui(t):[]},Un.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},Un.split=function(t,e,n){return n&&"number"!=typeof n&&wo(t,e,n)&&(e=n=i),(n=n===i?v:n>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&un(t)?xi(gn(t),0,n):t.split(e,n):[]},Un.spread=function(t,e){if("function"!=typeof t)throw new Tt(o);return e=null==e?0:bn(gs(e),0),Jr(function(n){var r=n[e],i=xi(n,0,e);return r&&Pe(i,r),_e(t,this,i)})},Un.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},Un.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===i?1:gs(e))<0?0:e):[]},Un.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===i?1:gs(e)))<0?0:e,r):[]},Un.takeRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!1,!0):[]},Un.takeWhile=function(t,e){return t&&t.length?hi(t,co(e,3)):[]},Un.tap=function(t,e){return e(t),t},Un.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Tt(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},Un.thru=ha,Un.toArray=ds,Un.toPairs=Ms,Un.toPairsIn=Hs,Un.toPath=function(t){return Ga(t)?Be(t,Lo):cs(t)?[t]:Ti(Ro(bs(t)))},Un.toPlainObject=ms,Un.transform=function(t,e,n){var r=Ga(t),i=r||Va(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Qa(o)?zn(Yt(t)):{}}return(i?ke:wr)(t,function(t,r,i){return e(n,t,r,i)}),n},Un.unary=function(t){return Oa(t,1)},Un.union=na,Un.unionBy=ra,Un.unionWith=ia,Un.uniq=function(t){return t&&t.length?fi(t):[]},Un.uniqBy=function(t,e){return t&&t.length?fi(t,co(e,2)):[]},Un.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?fi(t,i,e):[]},Un.unset=function(t,e){return null==t||pi(t,e)},Un.unzip=oa,Un.unzipWith=aa,Un.update=function(t,e,n){return null==t?t:di(t,e,bi(n))},Un.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:di(t,e,bi(n),r)},Un.values=Us,Un.valuesIn=function(t){return null==t?[]:tn(t,Is(t))},Un.without=sa,Un.words=Qs,Un.wrap=function(t,e){return La(bi(e),t)},Un.xor=ua,Un.xorBy=ca,Un.xorWith=la,Un.zip=fa,Un.zipObject=function(t,e){return yi(t||[],e||[],nr)},Un.zipObjectDeep=function(t,e){return yi(t||[],e||[],ti)},Un.zipWith=pa,Un.entries=Ms,Un.entriesIn=Hs,Un.extend=ws,Un.extendWith=xs,uu(Un,Un),Un.add=mu,Un.attempt=Zs,Un.camelCase=zs,Un.capitalize=qs,Un.ceil=bu,Un.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ys(n))==n?n:0),e!==i&&(e=(e=ys(e))==e?e:0),ur(ys(t),e,n)},Un.clone=function(t){return cr(t,4)},Un.cloneDeep=function(t){return cr(t,5)},Un.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:i)},Un.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:i)},Un.conformsTo=function(t,e){return null==e||lr(t,e,js(e))},Un.deburr=Ws,Un.defaultTo=function(t,e){return null==t||t!=t?e:t},Un.divide=Du,Un.endsWith=function(t,e,n){t=bs(t),e=li(e);var r=t.length,o=n=n===i?r:ur(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Un.eq=Ua,Un.escape=function(t){return(t=bs(t))&&J.test(t)?t.replace(V,an):t},Un.escapeRegExp=function(t){return(t=bs(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Un.every=function(t,e,n){var r=Ga(t)?Fe:gr;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},Un.find=ya,Un.findIndex=Wo,Un.findKey=function(t,e){return Ue(t,co(e,3),wr)},Un.findLast=ma,Un.findLastIndex=Go,Un.findLastKey=function(t,e){return Ue(t,co(e,3),xr)},Un.floor=wu,Un.forEach=ba,Un.forEachRight=Da,Un.forIn=function(t,e){return null==t?t:br(t,co(e,3),Is)},Un.forInRight=function(t,e){return null==t?t:Dr(t,co(e,3),Is)},Un.forOwn=function(t,e){return t&&wr(t,co(e,3))},Un.forOwnRight=function(t,e){return t&&xr(t,co(e,3))},Un.get=_s,Un.gt=za,Un.gte=qa,Un.has=function(t,e){return null!=t&&yo(t,e,Or)},Un.hasIn=Os,Un.head=Yo,Un.identity=iu,Un.includes=function(t,e,n,r){t=Ya(t)?t:Us(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&qe(t,e,n)>-1},Un.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),qe(t,e,i)},Un.inRange=function(t,e,n){return e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n){return t>=Dn(e,n)&&t<bn(e,n)}(t=ys(t),e,n)},Un.invoke=Fs,Un.isArguments=Wa,Un.isArray=Ga,Un.isArrayBuffer=$a,Un.isArrayLike=Ya,Un.isArrayLikeObject=Xa,Un.isBoolean=function(t){return!0===t||!1===t||ns(t)&&Sr(t)==D},Un.isBuffer=Va,Un.isDate=Ka,Un.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},Un.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Va(t)||ls(t)||Wa(t)))return!t.length;var e=vo(t);if(e==C||e==T)return!t.size;if(Co(t))return!Rr(t).length;for(var n in t)if(Pt.call(t,n))return!1;return!0},Un.isEqual=function(t,e){return Ir(t,e)},Un.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Ir(t,e,i,n):!!r},Un.isError=Ja,Un.isFinite=function(t){return"number"==typeof t&&De(t)},Un.isFunction=Qa,Un.isInteger=Za,Un.isLength=ts,Un.isMap=rs,Un.isMatch=function(t,e){return t===e||Nr(t,e,fo(e))},Un.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Nr(t,e,fo(e),n)},Un.isNaN=function(t){return is(t)&&t!=+t},Un.isNative=function(t){if(Eo(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(t)},Un.isNil=function(t){return null==t},Un.isNull=function(t){return null===t},Un.isNumber=is,Un.isObject=es,Un.isObjectLike=ns,Un.isPlainObject=os,Un.isRegExp=as,Un.isSafeInteger=function(t){return Za(t)&&t>=-9007199254740991&&t<=h},Un.isSet=ss,Un.isString=us,Un.isSymbol=cs,Un.isTypedArray=ls,Un.isUndefined=function(t){return t===i},Un.isWeakMap=function(t){return ns(t)&&vo(t)==I},Un.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==Sr(t)},Un.join=function(t,e){return null==t?"":He.call(t,e)},Un.kebabCase=Gs,Un.last=Jo,Un.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gs(n))<0?bn(r+o,0):Dn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):ze(t,Ge,o,!0)},Un.lowerCase=$s,Un.lowerFirst=Ys,Un.lt=fs,Un.lte=ps,Un.max=function(t){return t&&t.length?vr(t,iu,_r):i},Un.maxBy=function(t,e){return t&&t.length?vr(t,co(e,2),_r):i},Un.mean=function(t){return $e(t,iu)},Un.meanBy=function(t,e){return $e(t,co(e,2))},Un.min=function(t){return t&&t.length?vr(t,iu,Mr):i},Un.minBy=function(t,e){return t&&t.length?vr(t,co(e,2),Mr):i},Un.stubArray=vu,Un.stubFalse=yu,Un.stubObject=function(){return{}},Un.stubString=function(){return""},Un.stubTrue=function(){return!0},Un.multiply=Au,Un.nth=function(t,e){return t&&t.length?Wr(t,gs(e)):i},Un.noConflict=function(){return ge._===this&&(ge._=Ut),this},Un.noop=cu,Un.now=_a,Un.pad=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ve(i),n)+t+Gi(he(i),n)},Un.padEnd=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?t+Gi(e-r,n):t},Un.padStart=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?Gi(e-r,n)+t:t},Un.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(bs(t).replace(at,""),e||0)},Un.random=function(t,e,n){if(n&&"boolean"!=typeof n&&wo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=hs(t),e===i?(e=t,t=0):e=hs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=An();return Dn(t+o*(e-t+fe("1e-"+((o+"").length-1))),e)}return Vr(t,e)},Un.reduce=function(t,e,n){var r=Ga(t)?Re:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,dr)},Un.reduceRight=function(t,e,n){var r=Ga(t)?Le:Ve,i=arguments.length<3;return r(t,co(e,4),n,i,hr)},Un.repeat=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),Kr(bs(t),e)},Un.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Un.result=function(t,e,n){var r=-1,o=(e=Di(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[Lo(e[r])];a===i&&(r=o,a=n),t=Qa(a)?a.call(t):a}return t},Un.round=Eu,Un.runInContext=t,Un.sample=function(t){return(Ga(t)?Qn:Qr)(t)},Un.size=function(t){if(null==t)return 0;if(Ya(t))return us(t)?hn(t):t.length;var e=vo(t);return e==C||e==T?t.size:Rr(t).length},Un.snakeCase=Xs,Un.some=function(t,e,n){var r=Ga(t)?Me:oi;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},Un.sortedIndex=function(t,e){return ai(t,e)},Un.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},Un.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&Ua(t[r],e))return r}return-1},Un.sortedLastIndex=function(t,e){return ai(t,e,!0)},Un.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},Un.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(Ua(t[n],e))return n}return-1},Un.startCase=Vs,Un.startsWith=function(t,e,n){return t=bs(t),n=null==n?0:ur(gs(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},Un.subtract=Cu,Un.sum=function(t){return t&&t.length?Ke(t,iu):0},Un.sumBy=function(t,e){return t&&t.length?Ke(t,co(e,2)):0},Un.template=function(t,e,n){var r=Un.templateSettings;n&&wo(t,e,n)&&(e=i),t=bs(t),e=As({},e,r,Zi);var o=As({},e.imports,r.imports,Zi),a=js(o),s=tn(o,a);ke(a,function(t){if(pt.test(t))throw new Et("Invalid `imports` option passed into `_.template`")});var u,c,l=0,f=e.interpolate||xt,p="__p += '",d=Ot((e.escape||xt).source+"|"+f.source+"|"+(f===tt?ht:xt).source+"|"+(e.evaluate||xt).source+"|$","g"),h="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(d,function(e,n,r,i,o,a){return r||(r=i),p+=t.slice(l,a).replace(At,sn),n&&(u=!0,p+="' +\n__e("+n+") +\n'"),o&&(c=!0,p+="';\n"+o+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),p+="';\n";var g=Pt.call(e,"variable")&&e.variable;if(g){if(pt.test(g))throw new Et("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(c?p.replace(G,""):p).replace($,"$1").replace(Y,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Zs(function(){return Ct(a,h+"return "+p).apply(i,s)});if(v.source=p,Ja(v))throw v;return v},Un.times=function(t,e){if((t=gs(t))<1||t>h)return[];var n=v,r=Dn(t,v);e=co(e),t-=v;for(var i=Je(r,e);++n<t;)e(n);return i},Un.toFinite=hs,Un.toInteger=gs,Un.toLength=vs,Un.toLower=function(t){return bs(t).toLowerCase()},Un.toNumber=ys,Un.toSafeInteger=function(t){return t?ur(gs(t),-9007199254740991,h):0===t?t:0},Un.toString=bs,Un.toUpper=function(t){return bs(t).toUpperCase()},Un.trim=function(t,e,n){if((t=bs(t))&&(n||e===i))return Qe(t);if(!t||!(e=li(e)))return t;var r=gn(t),o=gn(e);return xi(r,nn(r,o),rn(r,o)+1).join("")},Un.trimEnd=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.slice(0,vn(t)+1);if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,0,rn(r,gn(e))+1).join("")},Un.trimStart=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.replace(at,"");if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,nn(r,gn(e))).join("")},Un.truncate=function(t,e){var n=30,r="...";if(es(e)){var o="separator"in e?e.separator:o;n="length"in e?gs(e.length):n,r="omission"in e?li(e.omission):r}var a=(t=bs(t)).length;if(un(t)){var s=gn(t);a=s.length}if(n>=a)return t;var u=n-hn(r);if(u<1)return r;var c=s?xi(s,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=Ot(o.source,bs(gt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(t.indexOf(li(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Un.unescape=function(t){return(t=bs(t))&&K.test(t)?t.replace(X,yn):t},Un.uniqueId=function(t){var e=++Rt;return bs(t)+e},Un.upperCase=Ks,Un.upperFirst=Js,Un.each=ba,Un.eachRight=Da,Un.first=Yo,uu(Un,(xu={},wr(Un,function(t,e){Pt.call(Un.prototype,e)||(xu[e]=t)}),xu),{chain:!1}),Un.VERSION="4.18.1",ke(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Un[t].placeholder=Un}),ke(["drop","take"],function(t,e){Gn.prototype[t]=function(n){n=n===i?1:bn(gs(n),0);var r=this.__filtered__&&!e?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=Dn(n,r.__takeCount__):r.__views__.push({size:Dn(n,v),type:t+(r.__dir__<0?"Right":"")}),r},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ke(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),ke(["head","last"],function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}}),ke(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}}),Gn.prototype.compact=function(){return this.filter(iu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Jr(function(t,e){return"function"==typeof t?new Gn(this):this.map(function(n){return Fr(n,t,e)})}),Gn.prototype.reject=function(t){return this.filter(Pa(co(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(v)},wr(Gn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Un[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(Un.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||Ga(e),f=function(t){var e=o.apply(Un,Pe([t],s));return r&&p?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,g=u&&!d;if(!a&&l){e=g?e:new Gn(this);var v=t.apply(e,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Wn(v,p)}return h&&g?t.apply(this,s):(v=this.thru(f),h?r?v.value()[0]:v.value():v)})}),ke(["pop","push","shift","sort","splice","unshift"],function(t){var e=Ft[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Un.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n](function(n){return e.apply(Ga(n)?n:[],t)})}}),wr(Gn.prototype,function(t,e){var n=Un[e];if(n){var r=n.name+"";Pt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}}),jn[Ui(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Dn(e,t+a);break;case"takeRight":t=bn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=Dn(u,this.__takeCount__);if(!n||!r&&i==u&&d==u)return gi(t,this.__actions__);var h=[];t:for(;u--&&p<d;){for(var g=-1,v=t[c+=e];++g<f;){var y=l[g],m=y.iteratee,b=y.type,D=m(v);if(2==b)v=D;else if(!D){if(1==b)continue t;break t}}h[p++]=v}return h},Un.prototype.at=ga,Un.prototype.chain=function(){return da(this)},Un.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Un.prototype.next=function(){this.__values__===i&&(this.__values__=ds(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Un.prototype.plant=function(t){for(var e,n=this;n instanceof qn;){var r=Ho(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Un.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ea)},Un.prototype.toJSON=Un.prototype.valueOf=Un.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},Un.prototype.first=Un.prototype.head,Qt&&(Un.prototype[Qt]=function(){return this}),Un}();ge._=mn,(r=function(){return mn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},505(t,e){"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),a=r(e[2]);null===o||null===a||o in i||(i[o]=a)}return i}},239(t){var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),s=new T(r||[]);return i(a,"_invoke",{value:S(t,n,s)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p="suspendedStart",d="suspendedYield",h="executing",g="completed",v={};function y(){}function m(){}function b(){}var D={};c(D,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(F([])));x&&x!==n&&r.call(x,a)&&(D=x);var A=b.prototype=y.prototype=Object.create(D);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function C(t,e){function n(i,o,a,s){var u=f(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,s)},function(t){n("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return n("throw",t,a,s)})}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return o=o?o.then(i,i):i()}})}function S(t,n,r){var i=p;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=_(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?g:d,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function F(t){if(null!=t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return m.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},E(C.prototype),c(C.prototype,s,function(){return this}),t.AsyncIterator=C,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new C(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(A),c(A,u,"Generator"),c(A,a,function(){return this}),c(A,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=F,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},168(t){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},732(t,e,n){"use strict";var r=n(192),i=n(975);t.exports=r.bind(null,i)},192(t){"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t,r,i){if("string"!=typeof r)throw new Error("Input must be string");for(var o,a,s=r.length,u=0,c=0;c<s;c+=1){if(o=r.charCodeAt(c),a=r[c],e(o)&&n(r.charCodeAt(c+1))&&(a+=r[c+=1]),(u+=t(a))===i)return r.slice(0,c+1);if(u>i)return r.slice(0,c-a.length+1)}return r}},571(t,e,n){"use strict";var r=n(168),i=n(505),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function f(t){return(t||"").toString().replace(o,"")}var p=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],d={hash:1,query:1};function h(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(t=t||r);if("blob:"===t.protocol)i=new y(unescape(t.pathname),{});else if("string"===o)for(e in i=new y(t,{}),d)delete i[e];else if("object"===o){for(e in t)e in d||(i[e]=t[e]);void 0===i.slashes&&(i.slashes=s.test(t.href))}return i}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=f(t)).replace(a,""),e=e||{};var n,r=c.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],s=!!r[3],u=0;return o?s?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):s?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function y(t,e,n){if(t=(t=f(t)).replace(a,""),!(this instanceof y))return new y(t,e,n);var o,s,u,c,d,m,b=p.slice(),D=typeof e,w=this,x=0;for("object"!==D&&"string"!==D&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(s=v(t||"",e=h(e))).protocol&&!s.slashes,w.slashes=s.slashes||o&&e.slashes,w.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(u=c[0],m=c[1],u!=u?w[m]=t:"string"==typeof u?~(d="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof c[2]?(w[m]=t.slice(0,d),t=t.slice(d+c[2])):(w[m]=t.slice(d),t=t.slice(0,d))):(d=u.exec(t))&&(w[m]=d[1],t=t.slice(0,d.index)),w[m]=w[m]||o&&c[3]&&e[m]||"",c[4]&&(w[m]=w[m].toLowerCase())):t=c(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(d=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,d),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(d+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}y.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,u.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(o.username=e.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var c=0;c<p.length;c++){var l=p[c];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(a+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(a+=n.hash),a}},y.extractProtocol=v,y.location=h,y.trimLeft=f,y.qs=i,t.exports=y},975(t){"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t){if("string"!=typeof t)throw new Error("Input must be string");for(var r=t.length,i=0,o=null,a=null,s=0;s<r;s++)n(o=t.charCodeAt(s))?null!=a&&e(a)?i+=1:i+=3:o<=127?i+=1:o>=128&&o<=2047?i+=2:o>=2048&&o<=65535&&(i+=3),a=o;return i}},326(t,e,n){"use strict";var r;n.r(e),n.d(e,{SaplingModule:()=>Wf});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const s=function(t){return"string"==typeof t&&a.test(t)};for(var u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));const l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(u[t[e+0]]+u[t[e+1]]+u[t[e+2]]+u[t[e+3]]+"-"+u[t[e+4]]+u[t[e+5]]+"-"+u[t[e+6]]+u[t[e+7]]+"-"+u[t[e+8]]+u[t[e+9]]+"-"+u[t[e+10]]+u[t[e+11]]+u[t[e+12]]+u[t[e+13]]+u[t[e+14]]+u[t[e+15]]).toLowerCase();if(!s(n))throw TypeError("Stringified UUID is invalid");return n};const f=function(t,e,n){var r=(t=t||{}).random||(t.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return l(r)};var p=n(571),d={SENTRY_DSN:"https://c1aab70fab174e668864c166c00749ac@o137760.ingest.sentry.io/4504958473404416",WEBSITE_URL:"https://sapling.ai",API_URL:"https://api.sapling.ai",WEBSITE_HOSTNAME:new p("https://sapling.ai").hostname,API_HOSTNAME:new p("https://api.sapling.ai").hostname,MODE:"SDK",AI_DETECT_ANYWHERE_EXTENSION:!1,CONTROL_ELEMENT:"sapling-controls-sdk"},h=n(571),g="",v="";function y(){return g}function m(){return v}var b=n(732),D=n.n(b),w=n(464),x=n.n(w),A=n(216),E=x()();function C(t){return" ".repeat(t.length)}function S(t){return t.replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\u00A9/g," ").replace(/\u00AE/g," ").replace(/&nbsp;/g," ").replace(E,C)}function O(t){return"scroll"===A(t).css("overflow-y")||"auto"===A(t).css("overflow-y")||A(t).is("textarea")||z(t)}function k(t){var e=[];e.push(t);for(var n=A(t).parentsUntil("body"),r=0;r<n.length;r+=1){var i=n[r];O(i)&&e.push(i)}return e}function T(t){for(var e=t,n=A(t).parentsUntil("body"),r=t.clientHeight,i=t.clientWidth,o=0;o<n.length;o+=1){var a=n[o],s=a.clientWidth,u=a.clientHeight;if(0!==s&&0!==u)if((u<r||s<i)&&(r=u,i=s,e=a),"absolute"===window.getComputedStyle(a).position)break}return e}function F(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;if(r.firstChild&&n)return r.firstChild;if(r.nextSibling)return r.nextSibling;for(var i=r.parentNode;null!==i&&(null===e||i!==e);){if(i.nextSibling)return i.nextSibling;i=i.parentNode}return null}function j(t){return!!t.tagName&&["script","style","xml"].includes(t.tagName.toLowerCase())}function I(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(e>n)return null;for(var a=t,s=e;null!==a;){if(i&&A(a).is("br")){if(n===s)return{domElement:a,indexSum:s,domOffset:s}}else if(a.nodeType===Node.TEXT_NODE){var u=a.data.length,c=n-s;if(c<u||o&&c===u)return{domElement:a,domOffset:c,indexSum:s};s+=u}a=F(a,r,!j(a))}return null}function N(t,e,n){for(var r=t,i=0;null!==r;){if(r===e)return i+n;r.nodeType===Node.TEXT_NODE&&(i+=r.data.length),r=F(r,t,!j(r))}return null}function B(t,e){if(!e)return null;var n=N(t,e.startContainer,e.startOffset),r=N(t,e.endContainer,e.endOffset);return null===n||null===r?null:[n,r]}function P(t){var e=getComputedStyle(t),n=e.position,r=e.top,i=e.left,o=e.height,a=e.width,s=t.getBoundingClientRect(),u={position:n,left:s.left,top:s.top,height:s.height,width:s.width};"static"!==n&&"relative"!==n||(u.position="absolute"),"absolute"===n&&(u={position:n,top:parseInt(r,10),left:parseInt(i,10),height:parseInt(o,10),width:parseInt(a,10)});var c=y();(c.endsWith("messenger.com")||c.endsWith("twitter.com")||c.endsWith("workplaceoptions.com"))&&(u.left-=1);var l=function(t){for(var e=t.parentElement;null!==e;){if("static"!==getComputedStyle(e).position)return e;e=e.parentElement}return null}(t);if("absolute"===n)return{frameDimensions:u,nonstaticParent:l};if(l){var f=l.getBoundingClientRect();u.left-=f.left-(l.scrollLeft||0),u.top-=f.top-(l.scrollTop||0)}else{var p=t.ownerDocument,d=p.defaultView||p.parentWindow,h=d.pageXOffset,g=d.pageYOffset;void 0!==h&&(u.top+=g),void 0!==g&&(u.top+=h)}return{frameDimensions:u,nonstaticParent:l}}function R(t){return A(t).is('[class*="mce-content-body"]')}function L(t){return!y().includes("gladly.")&&("true"===t.getAttribute("data-slate-editor")||A("[data-slate-leaf]",t).length>0)}function M(t){if(!t||!t.tagName)return!1;var e=t.tagName.toLowerCase();return"input"===e?"text"===t.type:"lightning-input-field"===e&&"text"===(t.getAttribute("type")||"unknown").toLowerCase()}function H(t){return A(t).attr("sapling-id")||A(t).data("sapling-id")}function U(t,e){return e||(e=f()),A(t).attr("sapling-id",e),A(t).data("sapling-id",e),e}function z(t){return A(t).attr("sapling-textarea-id")||A(t).data("sapling-textarea-id")}function q(t,e){return e||(e=f()),A(t).attr("sapling-textarea-id",e),A(t).data("sapling-textarea-id",e),e}function W(t){try{var e=getComputedStyle(t).zIndex;return isNaN(e)?W(t.parentElement):parseInt(e)}catch(t){return 0}}function G(t){return t<0?"rgb(0,0,0)":(t<=50?(e=Math.floor(225*t/50),n=225):(e=225,n=Math.floor(225*(100-t)/50)),"rgb("+e+","+n+",0)");var e,n}var $=n(216);function Y(t){return!!t.shadowRoot}function X(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"TEXTAREA"===t.tagName||e&&M(t)}function V(t){return t.isContentEditable&&"TEXTAREA"!==t.tagName}function K(t,e,n,r){for(var i,o=0;i=t[o];++o)e(i)&&r&&n.push(i),Y(i)&&K(i.shadowRoot.querySelectorAll("*"),e,n,!0)}function J(t){var e=[];return K(document.querySelectorAll("*"),t,e,!1),e}function Q(t){if((t.ownerDocument||document).contains(t))return!0;var e=function(t){return J(function(e){return e.contains(t)})}(t);return e.length>0}function Z(t){var e=t.path||t.composedPath&&t.composedPath();return e.length<1?t.target:e[0]}function tt(t){var e=null;if(t.hasFocus&&t.hasFocus())for(e=t.activeElement;Y(e);)e=e.shadowRoot.activeElement;return e}var et=n(216);function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return rt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var it={},ot={},at={},st=[],ut=[];function ct(t){ut.push(t)}function lt(t){st.push(t)}function ft(t,e,n,r,i){var o=n?ot:it,a={};t in o&&(a=o[t]),"domElement"in a||(a.domElement=e);var s=[];r in a&&(s=a[r]),s.push(i),a[r]=s,o[t]=a}function pt(t,e){var n=e?ot:it;if(t in n){var r=n[t];"intervals"in r&&r.intervals.forEach(function(t){clearInterval(t)}),"eventListeners"in r&&r.eventListeners.forEach(function(t){t.element.removeEventListener(t.event,t.handler,t.options)}),"jqueryObservers"in r&&r.jqueryObservers.forEach(function(t){et(t).off()}),"resizeObservers"in r&&r.resizeObservers.forEach(function(t){t.observer.unobserve(t.container)}),"mutationObservers"in r&&r.mutationObservers.forEach(function(t){t.disconnect()}),delete n[t]}}function dt(t){t&&(t.shadowHost&&t.shadowHost.remove(),t.badge&&t.badge.removeUIElements(),t.annotationsOverlay&&t.annotationsOverlay.removeUIElements())}function ht(){st.forEach(function(t){t.disconnect()}),st=[],ut.forEach(function(t){t.element.removeEventListener(t.event,t.handler,t.options)}),ut=[],Object.keys(it).forEach(function(t){pt(t,!1)}),Object.keys(ot).forEach(function(t){pt(t,!0)}),function(){for(var t=0,e=Object.entries(at);t<e.length;t++){var n=nt(e[t],2);n[0],dt(n[1])}}()}function gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{var i={};i.action=t,i.data=e,Ff(i,function(t){t&&t.status?(n&&t.success&&n(t.data),r&&!t.success&&r(t.data)):r&&r({message:"Error contacting background script."})},r)}catch(e){"makeToolbarIconInactive"!==t&&ht()}}var vt=n(216);function yt(t){return yt="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},yt(t)}function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach(function(e){Dt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Dt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=yt(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==yt(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={language:Ne(),browserLanguage:window.navigator.language,hostname:y(),pathname:m(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname};if(t){var n=vt("[sapling-id=".concat(t,"]")).attr("id");e.is_sapling_textbox="sapling-embedded-editable"===n}return e}function xt(t,e,n,r,i,o){gt("request/GET_AI_DETECTION_SCORES",{html:D()(t,8e3),sessionId:n,context:bt(bt({},wt()),r)},i,o)}function At(t,e,n,r,i,o,a){gt("request/POST_TONE_FEEDBACK",{html:D()(t,5e4),toneData:e,textType:n,score:r,sessionId:i,context:wt()},o,a)}function Et(t,e){gt("request/SEND_EVENT",{context:bt(bt({},wt(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)),e),eventAction:t})}function Ct(t,e,n,r){gt("request/POST_EDIT",{editHash:t,context:bt(bt({},wt(n)),r),action:e,sessionId:n})}function St(t){gt("request/POST_CHAT_EVENT",{context:t})}function _t(t){gt("request/POST_CHAT_TURN",{context:t})}function Ot(t,e,n,r){gt("request/SELECT_SNIPPET",{snippetId:t,mode:e,context:wt(),queryTerms:n,queryCount:r})}var kt=n(216),Tt=null,Ft=null,jt=null,It=null,Nt=null,Bt=null,Pt=null,Rt="en",Lt=!0,Mt=!0,Ht=!1,Ut=!0,zt=!1,qt=!0,Wt="free",Gt=null,$t=null,Yt=null,Xt=null,Vt=null,Kt=null,Jt="\\",Qt=!1,Zt=!1,te=!1,ee=!1,ne=!1,re=["en","zh","de","es","fr","he","it","jp","ja","ko","pt","ar","nl","pl","ru","sv","tl","no","hi","cs","da","el","et","fa","fi","hr","hu","id","lt","lv","ro","sk","sl","sr","th","tr","uk","vi"];function ie(t,e,n,r,i,o,a){var s=y(),u="crioenabled".concat(s),c="completeEnabled-".concat(s),l="badgeEnabled-".concat(s),f="toneEnabled-".concat(s),p="aiDetectEnabled-".concat(s),d="rephraseEnabled-".concat(s),h="advancedEditsEnabled-".concat(s),g={};g[u]=t,g[c]=e,g[l]=n,g[f]=r,g[p]=i,g[d]=o,g[h]=a;var v,m,b;kf(g),v=t,m=e,gt("request/POST_SETTINGS",{context:b=wt(),settings:[{hostname:b.hostname,enabled:v,completeEnabled:m}]})}function oe(t){return new Promise(function(e){!function(t,e,n){gt("request/GET_USER",{ignoreCache:t},e,n)}(t,function(t){ae(t),e()},function(){e()})})}function ae(t){Lt=t.is_anonymous,Mt=t.email_confirmed,Object.hasOwn(t,"email")?t.email:"",Ht=t.suggest,Kt=t.shortcuts.complete,Jt=t.shortcuts.snippet,Ut=t.snippets,zt=t.annotations,qt=t.power_button,Rt=t.lang,Object.hasOwn(t,"popup_editor")&&t.popup_editor,Object.hasOwn(t,"check_inputs")&&(Qt=t.check_inputs),Object.hasOwn(t,"rephrase")&&(Zt=t.rephrase),Object.hasOwn(t,"tone")&&(te=t.tone),Object.hasOwn(t,"ai_detect")&&(ee=t.ai_detect),Object.hasOwn(t,"multiFillin")&&(ne=t.multiFillin);var e=t.subscription;e&&(Wt=e.tier,Gt=e.end_datetime)}function se(){return Lt}function ue(){return Mt}function ce(){return"free"!==Wt}function le(){return Wt}function fe(){return Ht}function pe(){return Ut}function de(){return"SDK"===d.MODE?Sapling.advancedEdits.advanced_edits:zt}function he(){return Kt}function ge(){return Jt}function ve(){if(!Gt)return Gt;var t=new Date,e=new Date(Gt);if(e.getTime()-t.getTime()<0)return null;var n=Math.round(Math.abs((e.getTime()-t.getTime())/864e5));return Math.max(n,1)}function ye(t){var e=t.tagName.toLowerCase();return!!("textarea"===e||"lightning-textarea"===e||Qt&&M(t))}function me(){return!1!==Xt}function be(){return"SDK"===d.MODE||(null!==Yt?Yt:!(!ce()||!0!==Tt)||!1!==Tt&&me())}function De(){return"SDK"===d.MODE||(null!==Yt?Yt:!(!ce()||!0!==Pt)||!1!==Pt&&me())}function we(t){return"SDK"===d.MODE||!!be()&&("true"!==kt(t).attr("sapling-ignore")&&("To"!==kt(t).attr("aria-label")&&"Cc"!==kt(t).attr("aria-label")&&"Bcc"!==kt(t).attr("aria-label")&&(!y().includes("github.com")||"false"!==kt(t).attr("spellcheck"))))}function xe(){return"SDK"===d.MODE?Sapling.autocomplete:!!y().includes("sapling.ai")||(null!==Yt?Yt:!(!ce()||!1===Ft))}function Ae(t){return!!xe()&&(("SDK"===d.MODE||"true"!==kt(t).attr("sapling-ignore"))&&(!kt(t).is("input")||"off"!==kt(t).attr("autocomplete")&&"false"!==kt(t).attr("autocomplete")))}function Ee(){return null!==$t?$t:!(me()||be()||xe()||ce())}function Ce(){return Se()&&Zt}function Se(){return!1!==Bt}function _e(){return"SDK"===d.MODE||Be()&&ee&&Oe()}function Oe(){return"SDK"!==d.MODE&&!1!==Nt}function ke(){return"SDK"===d.MODE?Sapling.toneEnabled:Te()&&Be()&&te}function Te(){return"SDK"!==d.MODE&&!1!==It}function Fe(){return"SDK"===d.MODE?Sapling.statusBadge:!1!==jt&&!0!==Vt}function je(){return"SDK"===d.MODE||Qt}function Ie(t){re.includes(t)&&(Rt=t),function(t){gt("request/POST_SETTINGS",{context:wt(),settings:[{lang:t}]})}(Rt)}function Ne(){return Rt}function Be(){return!se()&&(!!ue()&&!!ce())}var Pe=n(820),Re=n.n(Pe),Le=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),Me="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,He=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ue="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(He):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var ze=["top","right","bottom","left","width","height","size","weight"],qe="undefined"!=typeof MutationObserver,We=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){Ue(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){Me&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),qe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Me&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;ze.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Ge=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},$e=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||He},Ye=Ze(0,0,0,0);function Xe(t){return parseFloat(t)||0}function Ve(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+Xe(t["border-"+n+"-width"])},0)}function Ke(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Ye;var r=$e(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=Xe(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xe(r.width),u=Xe(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Ve(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Ve(r,"top","bottom")+a)),!function(t){return t===$e(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Ze(i.left,i.top,s,u)}var Je="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof $e(t).SVGGraphicsElement}:function(t){return t instanceof $e(t).SVGElement&&"function"==typeof t.getBBox};function Qe(t){return Me?Je(t)?function(t){var e=t.getBBox();return Ze(0,0,e.width,e.height)}(t):Ke(t):Ye}function Ze(t,e,n,r){return{x:t,y:e,width:n,height:r}}var tn=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ze(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Qe(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),en=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),Ge(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);Ge(this,{target:t,contentRect:c})},nn=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Le,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof $e(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new tn(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof $e(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new en(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),rn="undefined"!=typeof WeakMap?new WeakMap:new Le,on=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=We.getInstance(),r=new nn(e,n,this);rn.set(this,r)};["observe","unobserve","disconnect"].forEach(function(t){on.prototype[t]=function(){var e;return(e=rn.get(this))[t].apply(e,arguments)}});const an=void 0!==He.ResizeObserver?He.ResizeObserver:on;var sn=n(216);function un(t,e){var n=function(t){for(var e=t&&t.parentNode;e;){if("[object ShadowRoot]"===e.toString())return e;e=e.parentNode}return!1}(t);return(n?e&&!function(t,e){for(var n=e.parentNode||e.host;null!=n;){if(n===t)return!0;n=n.parentNode||n.host}return!1}(e.contentDocument,n)?e.contentDocument:n:e?e.contentDocument:window).getSelection().getRangeAt(0)}function cn(t){var e,n=function(t){for(var e=null,n=t;n&&"IFRAME"===n.nodeName;){e=n;var r=n.contentDocument;if(r||(r=$(n).contents()[0]),!r)return{deepestIframe:null,deepFocusedElement:null};n=tt(r)}return{deepestIframe:e,deepFocusedElement:n}}(t),r=n.deepestIframe,i=n.deepFocusedElement;if(!i)return null;"true"===i.getAttribute("contenteditable")||""===i.getAttribute("contenteditable")||"plaintext-only"===i.getAttribute("contenteditable")?e={deepestIframe:r,isContentEditable:!0,isTextarea:!1,element:i,range:un(i,r)}:e=X(i,!0)?{deepestIframe:r,isContentEditable:!1,isTextarea:!0,element:i,start:i.selectionStart,end:i.selectionEnd}:{deepestIframe:r,isContentEditable:!1,isTextarea:!1,element:i};return e}function ln(t){var e=window.getSelection();e.getRangeAt&&e.rangeCount&&function(t,e){var n,r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=r.nodeType===Node.TEXT_NODE?r.length:r.childNodes.length,u=o.nodeType===Node.TEXT_NODE?o.length:o.childNodes.length,c=Math.min(i,s),l=Math.min(a,u);try{n=new StaticRange({startContainer:r,startOffset:c,endContainer:o,endOffset:l})}catch(t){}if(n){var f={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[n]};try{t.startContainer.dispatchEvent(new InputEvent("beforeinput",f))}catch(t){}}r===o?r.replaceData(c,l-c,e):r.insertData(c,e),t.selectNodeContents(o),t.collapse(!1)}(e.getRangeAt(0),t)}function fn(t){if("TEXTAREA"===t.nodeName||"INPUT"===t.nodeName){var e=function(t,e,n){if(!dn)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var o=document.createElement("div");o.id="input-textarea-caret-position-mirror-div",document.body.appendChild(o);var a=o.style,s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,u="INPUT"===t.nodeName;a.whiteSpace="pre-wrap",u||(a.wordWrap="break-word");a.position="absolute",r||(a.visibility="hidden");pn.forEach(function(t){if(u&&"lineHeight"===t)if("border-box"===s.boxSizing){var e=parseInt(s.height),n=parseInt(s.paddingTop)+parseInt(s.paddingBottom)+parseInt(s.borderTopWidth)+parseInt(s.borderBottomWidth),r=n+parseInt(s.lineHeight);a.lineHeight=e>r?e-n+"px":e===r?s.lineHeight:0}else a.lineHeight=s.height;else a[t]=s[t]}),hn?t.scrollHeight>parseInt(s.height)&&(a.overflowY="scroll"):a.overflow="hidden";o.textContent=t.value.substring(0,e),u&&(o.textContent=o.textContent.replace(/\s/g,"\xa0"));var c=document.createElement("span");c.textContent=t.value.substring(e)||".",o.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.fontSize)};r?c.style.backgroundColor="#aaa":document.body.removeChild(o);return l}(t,t.selectionEnd),n=t.getBoundingClientRect();return{left:n.left+e.left-sn(t).scrollLeft(),top:n.top+e.top-sn(t).scrollTop(),height:e.height}}var r=t.getRootNode().getSelection().getRangeAt(0);if(0===r.startOffset){r=r.cloneRange();try{r.setEnd(r.startContainer,1)}catch(t){var i=r.startContainer.getBoundingClientRect(),o=sn(r.startContainer),a=parseInt(o.css("padding-top"))+parseInt(o.css("border-top-width"))+parseInt(o.css("font-size")),s=parseInt(o.css("padding-left"))+parseInt(o.css("border-left-width"));return{left:i.left+s,top:i.top,height:a}}}var u=r.getBoundingClientRect();if(0===u.x&&0===u.y){var c=document.createTextNode("\ufeff");r.insertNode(c),u=r.getBoundingClientRect(),c.remove()}return u}var pn=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],dn="undefined"!=typeof window,hn=dn&&null!=window.mozInnerScreenX;var gn=n(216),vn=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","fontFamily","textAlign","textTransform","letterSpacing","wordSpacing","tabSize"];function yn(t,e){var n=getComputedStyle(t);gn(vn).each(function(t,r){e.style[r]=n[r]})}var mn=n(216);function bn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Dn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var wn=null,xn="",An="",En=null;function Cn(){mn("sapling-complete").length&&(wn=mn("sapling-complete")[0].shadowRoot,mn("#sapling-complete-div-box",wn).css("visibility","hidden"),mn(wn).text(""),En=null)}function Sn(t){var e=[],n=0;if("TEXTAREA"===t.nodeName)e=t.value.split("\n"),n=t.selectionEnd;else{if("function"!=typeof t.getRootNode().getSelection)return[e,n];var r=t.getRootNode().getSelection(),i=r.anchorNode;if(!i)return[e,n];e=i.textContent.split("\n"),n=r.focusOffset}return[e,n]}function _n(t){for(var e=bn(Sn(t),2),n=e[0],r=e[1],i=0,o="",a=0;a<n.length;a++){if(""!==o?o+=" "+n[a]:o=n[a],i+n[a].length>=r)return o;i+=n[a].length+1}return""}function On(){try{return wn=mn("sapling-complete")[0].shadowRoot,mn(wn).find("span").first().attr("completion-hash")}catch(t){return""}}function kn(t,e){var n=function(t){if(O(t))return t;for(var e=A(t).parentsUntil("body"),n=0;n<e.length;n+=1){var r=e[n];if(O(r))return r}return null}(e);if(null!==n){var r=y(),i=mn(n).css("overflow");mn(n).css("overflow","hidden"),"messenger.com"!==r&&"facebook.com"!==r||mn("html").attr("style","overflow: hidden !important;"),t(),mn(n).css("overflow",i),"facebook.com"===r&&mn("html").attr("style","")}else t()}function Tn(t,e,n){if(""!==e){var r=On();n&&"query"in n&&(xn=n.query,An=n.model_version,r=n.hash);var i=mn("sapling-complete");wn=i[0].shadowRoot;var o=he();o||(o="`");var a='<span title="Hit the backtick or tab key to use Sapling\'s completion." style="margin-left: 1em; background: #ccc; font-weight: 500; border-radius: 0.2em; line-height: 0.6em; padding: 0 0.4em 0 0.3em;">'.concat(o,"</span>");wn.innerHTML='\n <style type="text/css">\n #sapling-complete-div {\n margin: 0;\n padding: 0;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n color: #3f51b5;\n opacity: 0.5;\n\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n }\n #sapling-complete-div-box {\n z-index: 2147483647 !important;\n display: table;\n margin: 0;\n padding: 0;\n }\n </style>\n '+'<div id="sapling-complete-div-box"><div id="sapling-complete-div"><span completion-hash="'.concat(r,'">').concat(e.replace(" ","&nbsp;"),"</span>").concat(a,"</div></div>");var s=mn("#sapling-complete-div",wn),u=fn(t);if(void 0!==u){if(En=cn(t),"TEXTAREA"===t.nodeName)yn(t,s[0]);else{for(var c=t.getRootNode().getSelection().anchorNode;c.nodeType===Node.TEXT_NODE;)c=c.parentNode;yn(c,s[0])}var l=mn("#sapling-complete-div-box",wn);l.offset({top:u.top+window.scrollY,left:u.left+window.scrollX});var f=t.getBoundingClientRect(),p=l.offset().left+l.width()-(f.left+f.width);p>0?s.css("max-width",l.width()-p):s.css("max-width",""),kn(function(){l.css("visibility","visible")},t)}}else Cn()}function Fn(){try{wn=mn("sapling-complete")[0].shadowRoot}catch(t){return""}return mn(wn).find("span").first().text().replace(/\u00A0/g," ")}function jn(t){Tn(t,Fn().substring(1))}function In(t,e){var n,r=t.key,i=he();if("Tab"===r||"ArrowRight"===r||!i&&"`"===r||i&&r===i){if(!function(t,e){if(!t||!e)return!1;if(t.isContentEditable){var n=t.range,r=e.range;return n.startContainer===r.startContainer&&n.startOffset===r.startOffset&&n.endContainer===r.endContainer&&n.endOffset===r.endOffset}return!!t.isTextarea&&t.start===e.start&&t.end===e.end}(cn(e),En))return;var o=Fn();if(""===o&&"chatTextArea"!==e.getAttribute("id"))return;if(t.preventDefault(),L(e)){var a={inputType:"insertText",data:o,bubbles:!0,cancelable:!1},s=window.getSelection().getRangeAt(0);setTimeout(function(){s.startContainer.dispatchEvent(new InputEvent("beforeinput",a))},100)}else e.className.includes("ck-editor")?ln(o):(n=o,document.execCommand("insertText",!1,n));var u=On(),c=H(t.target);Cn(),function(t,e,n,r){gt("request/POST_COMPLETION",{completionHash:t,context:bt(bt({},wt(n)),r),action:"accept",sessionId:n})}(u,0,c,{query:xn,completion:o,model_version:An})}}var Nn=n(545);function Bn(){try{return window.self!==window.top}catch(t){return!0}}function Pn(t,e){t.on("load",function(){setTimeout(e,500)});var n=t.get(0);try{n&&n.contentWindow&&"complete"===n.contentWindow.document.readyState&&setTimeout(e,500)}catch(t){setTimeout(e,500)}}function Rn(t){var e,n=t.ownerDocument;if((e=n.defaultView||n.parentWindow).self===e.top)return{x:0,y:0};for(var r=document.getElementsByTagName("iframe"),i=0;i<r.length;i++)if(r[i].contentWindow===e){var o=r[i].getBoundingClientRect();return{x:o.x,y:o.y}}return{x:0,y:0}}var Ln=n(216);function Mn(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(!Bn()){var c,l=Ln("sapling-popup-controls");0===l.length?((c=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),Ln("html").append(c)):(l.is(":last-child")||l.appendTo("html"),c=l[0]);var f=c.shadowRoot;Ln(".sapling-tooltip-container",f)[0]?(Ln(".sapling-tooltip-button-primary",f).off("mousedown"),Ln(".sapling-tooltip-button-secondary",f).off("mousedown"),Ln(".sapling-tooltip-container",f).off("blur")):function(t){Ln(t).prepend(Ln('\n<style type="text/css">\n\n@media print {\n .sapling-tooltip-container {\n display: none;\n }\n}\n\n.sapling-tooltip-container {\n z-index: 2147483647 !important;\n position: fixed;\n top: 0px;\n left: 0px;\n background-color: #00FF0033;\n}\n\n.sapling-tooltip {\n position: fixed;\n padding: 10px;\n width: 220px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #eee;\n border-radius: 5px;\n background-color: #FFF;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n\n.sapling-tooltip-icon {\n margin-top: 5px;\n width: 30px;\n height: 30px;\n background-size: cover;\n background-image: url("'.concat(_f("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-tooltip-title {\n font-size: 16px;\n font-weight: 600;\n}\n\n.sapling-tooltip-body {\n font-size: 14px;\n line-height: 18px;\n}\n\n.sapling-tooltip-body{\n margin-top: 10px;\n text-align: center;\n}\n\n.sapling-tooltip-title {\n margin-top: 5px;\n text-align: center;\n}\n\n.sapling-tooltip-button-container {\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-tooltip-button {\n font-size: 16px;\n padding: 6px;\n margin: 5px;\n width: 140px;\n border-radius: 5px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: #FFF;\n transition: all .15s ease;\n user-select: none;\n}\n\n.sapling-tooltip-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-tooltip-button:active {\n transform: translateY(0px);\n}\n\n.sapling-tooltip-button-primary {\n background-color: #3f51b5;\n}\n\n.sapling-tooltip-button-secondary {\n background-color: #999;\n}\n</style>'))),Ln(t).append(Ln('\n<div class="sapling-tooltip-container">\n <div class="sapling-tooltip">\n <div class="sapling-tooltip-icon"> </div>\n <div class="sapling-tooltip-title"></div>\n <div class="sapling-tooltip-body"></div>\n <div class="sapling-tooltip-button-container">\n <div class="sapling-tooltip-button sapling-tooltip-button-primary"></div>\n <div class="sapling-tooltip-button sapling-tooltip-button-secondary"></div>\n <div>\n </div>\n</div>'))}(f);var p=t.top,d=t.left,h=window.innerHeight+window.scrollY,g=window.innerWidth+window.scrollX;null!==p&&p+190>h&&(p=h-190,t.top=Math.max(p,0)),null!==d&&d+250>g&&(d=g-250,t.left=Math.max(d,0)),Ln(".sapling-tooltip",f).css(t),e?Ln(".sapling-tooltip-icon",f).show():Ln(".sapling-tooltip-icon",f).hide(),Ln(".sapling-tooltip-title",f).html(n),Ln(".sapling-tooltip-body",f).html(r),Ln(".sapling-tooltip-button-primary",f).text(i),o?Ln(".sapling-tooltip-button-secondary",f).text(o):Ln(".sapling-tooltip-button-secondary",f).hide(),u&&Ln(".sapling-tooltip-container",f).attr("tabindex",-1).on("blur",function(){Ln(this).hide()}),Ln(".sapling-tooltip-button-primary",f).on("mousedown",function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),Ln(".sapling-tooltip-container",f).hide(),a&&a())}),Ln(".sapling-tooltip-button-secondary",f).on("mousedown",function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),Ln(".sapling-tooltip-container",f).hide(),s&&s())}),u?Ln(".sapling-tooltip-container",f).show().focus():Ln(".sapling-tooltip-container",f).show()}}function Hn(){var t,e;se()&&(t=["ToolTipLogin"],e=function(t){var e=(new Date).getTime(),n=e-864e5;(!t.ToolTipLogin||t.ToolTipLogin<n)&&Mn({right:8,bottom:8,top:"",left:""},!0,"Are you signed in?","For full access to Sapling, make sure you are on your team's enterprise plan.","Sign in","Cancel",function(){var t="".concat(d.WEBSITE_URL,"/user/sign-in");window.open(t),kf({ToolTipLogin:e})},function(){kf({ToolTipLogin:e})})},"SDK"!==d.MODE&&chrome.storage.sync.get(t,e))}function Un(){if("chrome-extension:"===window.location.protocol){if("#saplingpopup"===window.location.hash)return!0}else{if("ms-browser-extension:"===window.location.protocol)return!0;if("moz-extension:"===window.location.protocol)return!0}return!1}var zn=n(216);function qn(){return qn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$n(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},qn.apply(null,arguments)}function Wn(t,e,n){return e=$n(e),function(t,e){if(e&&("object"==Vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gn()?Reflect.construct(e,n||[],$n(t).constructor):e.apply(t,n))}function Gn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Gn=function(){return!!t})()}function $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$n(t)}function Yn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}function Vn(t){return Vn="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},Vn(t)}function Kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zn(r.key),r)}}function Qn(t,e,n){return e&&Jn(t.prototype,e),n&&Jn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zn(t){var e=function(t,e){if("object"!=Vn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vn(e)?e:e+""}var tr=function(){return"SDK"===d.MODE&&Sapling.customStyles&&Sapling.customStyles.badgeTooltipLeft?"tooltiptext-left":""},er=function(){return Qn(function t(e){Kn(this,t),this.elem=null,this.badgeDashboard=e},[{key:"shouldShow",value:function(){return!0}},{key:"refreshState",value:function(){this.shouldShow()?this.elem.show():this.elem.hide()}}])}(),nr=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"SignInButton"}},{key:"shouldShow",value:function(){return"SDK"!==d.MODE&&se()}},{key:"createElement",value:function(){return this.elem=zn('<a target="_blank" href="'.concat(d.WEBSITE_URL,'/user/sign-in">\n <div class="sapling-dashboard-icon sapling-button-profile">\n <span class="tooltiptext ').concat(tr(),' caret-mid">Sign in</span>\n </div>\n </a>')),this.elem}}])}(er),rr=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"SearchSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==d.MODE&&(!Un()&&(!se()&&pe()))}},{key:"createElement",value:function(){var t=this;return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-search">\n <span class="tooltiptext '.concat(tr(),' caret-mid">Search Snippets</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer,r=n,i=z(n);i&&(r=au(i)),r.focus(),Ff({action:"snippet-control",data:{mode:"insert"}})}}),this.elem}}])}(er),ir=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"AddSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==d.MODE&&(!se()&&pe())}},{key:"createElement",value:function(){var t=this;return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-snippets">\n <span class="tooltiptext '.concat(tr(),' caret-mid">Add Snippet</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer.textContent;n=btoa(unescape(encodeURIComponent(n)));var r=zn.param({preload:n}),i="".concat(d.WEBSITE_URL,"/snippets/new?").concat(r);window.open(i)}}),this.elem}}])}(er),or=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"AddSuggestionButton"}},{key:"shouldShow",value:function(){return"SDK"!==d.MODE&&(!se&&(!!ce()&&fe()))}},{key:"createElement",value:function(){var t=this;return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-suggest">\n <span class="tooltiptext '.concat(tr(),' caret-mid">Add Suggestion</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=zn(t.badgeDashboard.parentContainer).text().trim();n=btoa(unescape(encodeURIComponent(n)));var r=zn.param({preload:n}),i="".concat(d.WEBSITE_URL,"/suggest/new?").concat(r);window.open(i)}}),this.elem}}])}(er),ar=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"AnnotationsButton"}},{key:"shouldShow",value:function(){return"SDK"===d.MODE?de():!Un()&&(!se()&&de())}},{key:"updateIcon",value:function(){var t="Show Annotations";this.badgeDashboard.containerInfo&&this.badgeDashboard.containerInfo.annotationsOverlay&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations.summaryVisible()&&(t="Hide Annotations"),zn(this.elem).find(".tooltiptext").html(t)}},{key:"createElement",value:function(){var t=this;return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-annotations">\n <span class="tooltiptext '.concat(tr(),' caret-mid">Show Annotations</span>\n </div>')),this.elem.on("mousedown",function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.annotationsOverlay.toggleSummaryAnnotations(),t.updateIcon())}),this.elem}}])}(er),sr=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"ToneButton"}},{key:"shouldShow",value:function(){return ke()}},{key:"updateIcon",value:function(){var t=this.badgeDashboard.containerInfo.toneOverlay;if(t){var e=t.getTopTone(),n="Show Tone";zn(t.toneOverlay).is(".visible")?n="Hide Tone":e&&(zn(this.elem).find(".top-tone-emoji").html(e[2]),n="".concat(e[1]," tone<br/>See More"),zn(this.elem).css({backgroundSize:0})),zn(this.elem).find(".tooltiptext").html(n)}}},{key:"createElement",value:function(){var t=this;return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-tone">\n <span class="top-tone-emoji">\u{1f610}</span>\n <span class="tooltiptext '.concat(tr(),' caret-mid">Show Tone</span>\n </div>')),this.elem.on("mousedown",function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.toneOverlay&&t.badgeDashboard.containerInfo.toneOverlay.toggleVisibility(),t.updateIcon())}),this.elem}}])}(er),ur=function(t){function e(t){var n;return Kn(this,e),(n=Wn(this,e,[t])).isThrottled=!1,n}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"ThrottleButton"}},{key:"shouldShow",value:function(){return this.isThrottled}},{key:"createElement",value:function(){return this.elem=zn('<a target="_blank" href="'.concat(d.WEBSITE_URL,'/usage-limits">\n <div class="sapling-dashboard-icon sapling-button-throttled">\n <span class="tooltiptext ').concat(tr(),' caret-mid">Usage limit exceeded</span>\n </div>\n </a>')),this.elem}}])}(er),cr=function(t){function e(){return Kn(this,e),Wn(this,e,arguments)}return Yn(e,t),Qn(e,[{key:"getName",value:function(){return"PowerButton"}},{key:"shouldShow",value:function(){return"SDK"===d.MODE?Sapling.userToggle:qt}},{key:"refreshState",value:function(){var t,n=y(),r="off";"SDK"===d.MODE?Sapling.userToggleEnabled?(r="off",t="Disable grammar checking"):(r="on",t="Enable grammar checking"):t="Turn ".concat(r," Sapling for ").concat(n);var i,o,a,s,u,c=zn(this.elem).find(".tooltiptext").html(c);c.text(t),(i=e,o="refreshState",a=this,u=qn($n(1&(s=3)?i.prototype:i),o,a),2&s&&"function"==typeof u?function(t){return u.apply(a,t)}:u)([])}},{key:"createElement",value:function(){var t=this,e=y();return this.elem=zn('<div class="sapling-dashboard-icon sapling-button-power">\n <span class="tooltiptext '.concat(tr(),' caret-mid">Turn off Sapling for ').concat(e,"</span>\n </div>")),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.elem.offset();t.badgeDashboard.hide(),function(t,e,n){var r="Sapling",i="Disable",o="Keep Enabled";"SDK"===d.MODE&&(r="grammar checking"),t||(i="Enable",o="Keep Disabled"),Mn({top:e,left:n,right:"",bottom:""},!1,"".concat(i," ").concat(r),"".concat(i," ").concat(r," on pages of site: <b>").concat(y(),"</b>?"),i,o,function(){"SDK"===d.MODE?(Sapling.setUserToggleEnabled(!t),Af(t?"sdk-disable":"sdk-enable")):ie(!t,!t)},null,!0)}("SDK"===d.MODE?Sapling.userToggleEnabled:be(),n.top-60,n.left-110)}}),this.elem}}])}(er),lr=[nr,rr,ir,or,ar,ur,sr,cr],fr=n(216);function pr(t){return pr="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},pr(t)}function dr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return hr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function gr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vr(r.key),r)}}function vr(t){var e=function(t,e){if("object"!=pr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pr(e)?e:e+""}var yr=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parentContainer=null,this.popupControls=null,this.popupControlsJq=null,this.shadowRoot=null,this.shadowRootJq=null,this.containerId=null,this.containerInfo=null,this.badgeDashContainer=null,this.badgeDash=null,this.buttons={}},(e=[{key:"createPopupContainer",value:function(){var t;this.popupControls||(0===fr("sapling-popup-controls").length?((t=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),fr("html").append(t)):t=fr("sapling-popup-controls")[0],this.popupControls=t,this.popupControlsJq=fr(t),this.shadowRoot=t.shadowRoot,this.shadowRootJq=fr(this.shadowRoot))}},{key:"createDashboardContainer",value:function(){var t=this,e=this.popupControls.shadowRoot;if(!this.badgeDashContainer){var n=fr('\n<style type="text/css">\n\n.sapling-badge-dash-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n.sapling-badge-dash {\n position: relative;\n height: 34px;\n bottom: 2px;\n right: 2px;\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n padding-right: 5px;\n background-color: #FFFFFF;\n border-radius: 16px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.connectivity-error .sapling-badge-dash {\n background-color: #FFCCCC;\n}\n\n.sapling-dashboard-icon {\n width: 24px;\n height: 24px;\n background-color: #3f51b5;\n border-radius: 50%;\n margin-left: 5px;\n position: relative;\n transition: all .15s ease;\n}\n\n.sapling-dashboard-icon:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n\n.sapling-button-count {\n position: absolute;\n width: 24px;\n height: 24px;\n color: #fff;\n font-weight: 600;\n font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n user-select: none;\n}\n\n.sapling-button-logo {\n position: absolute;\n width: 24px;\n height: 24px;\n background-size: cover;\n background-image: url("'.concat(_f("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-button-profile {\n background-size: 10px 10px;\n background-position: center center;\n background-image: url("').concat(_f("assets/profile.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-snippets {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/scissor.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-suggest {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/chat-plus.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-search {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/magnifying-glass.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-annotations {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/fa-chart-column-solid.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-tone {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/face-flushed-regular.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-button-tone:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-tone .top-tone-emoji {\n font-size: 18px;\n margin-top: 2px;\n}\n\n.sapling-button-tone .tooltiptext {\n text-transform: capitalize;\n}\n\n.sapling-button-throttled {\n background-color: orange;\n background-size: 16px 16px;\n background-position: center center;\n background-image: url("').concat(_f("assets/throttled.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-feedback {\n background-size: 13px 13px;\n background-position: center center;\n background-image: url("').concat(_f("assets/feedback.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-power {\n background-size: 12px 12px;\n background-position: center center;\n background-image: url("').concat(_f("assets/power.svg"),'");\n background-repeat: no-repeat;\n cursor: pointer;\n}\n\n.sapling-button-edit-count:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n transition-delay: 400ms;\n}\n\n#tooltiptext-right {\n margin-left: -80px\n}\n\n.sapling-button-profile:hover .tooltiptext {\n visibility: visible;\n width: 60px;\n margin-left: -37px;\n transition-delay: 400ms;\n}\n\n.sapling-button-search:hover .tooltiptext {\n visibility: visible;\n width: 95px;\n\n margin-left: -55px;\n transition-delay: 400ms;\n}\n\n.sapling-button-snippets:hover .tooltiptext {\n visibility: visible;\n width: 80px;\n margin-left: -47px;\n transition-delay: 400ms;\n}\n\n.sapling-button-suggest:hover .tooltiptext {\n visibility: visible;\n width: 100px;\n margin-left: -57px;\n transition-delay: 400ms;\n}\n\n.sapling-button-annotations:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-throttled:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 200ms;\n}\n\n.sapling-button-feedback:hover .tooltiptext {\n visibility: visible;\n width: 140px;\n margin-left: -77px;\n transition-delay: 400ms;\n}\n\n.sapling-button-power:hover .tooltiptext {\n visibility: visible;\n width: 120px;\n margin-left: -67px;\n transition-delay: 400ms;\n}\n\n.tooltiptext {\n width: 0;\n visibility: hidden;\n font-size: 12px;\n font-family: \'Helvetica\', \'Arial\', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n padding: 7px;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n position: absolute;\n z-index: 1;\n bottom: 120%;\n left: 50%;\n margin-top: -10px;\n z-index: 1;\n}\n\n.tooltiptext.tooltiptext-left {\n right: 0;\n left: auto;\n width: 140px;\n margin-left: -77px;\n}\n\n.caret-right::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.tooltiptext-left.caret-mid::after {\n left: auto;\n right: 5%;\n}\n\n</style>'));fr(e).prepend(n),this.badgeDashContainer=fr('<div class="sapling-badge-dash-container" style="display: none;"></div>'),this.badgeDash=fr('<div class="sapling-badge-dash"></div>'),this.badgeDashContainer.append(this.badgeDash);var r,i=dr(lr);try{for(i.s();!(r=i.n()).done;){var o=new(0,r.value)(this),a=o.createElement();this.badgeDash.append(a),this.buttons[o.getName()]=o,o.refreshState()}}catch(t){i.e(t)}finally{i.f()}this.badgeDash.hover(null,function(){t.hide()}),this.shadowRootJq.append(this.badgeDashContainer)}}},{key:"createUIElements",value:function(){this.createPopupContainer(),this.createDashboardContainer()}},{key:"show",value:function(t,e,n,r){if(this.parentContainer=t,this.popupControlsJq.is(":last-child")||this.popupControlsJq.appendTo("html"),n!==this.containerId){this.containerId=n,this.containerInfo=r,this.badgeDashContainer.containerId=n;for(var i=!0,o=0,a=Object.values(this.buttons);o<a.length;o++){var s=a[o];s.refreshState(),s.shouldShow()&&(i=!1)}if(!i){var u=e.badge[0].getBoundingClientRect(),c=u.right+window.scrollX-this.badgeDashContainer.width()+6,l=u.bottom+window.scrollY-this.badgeDashContainer.height()+6;if("SDK"===d.MODE){var f=Rn(t);c+=f.x,l+=f.y}l=Math.max(l,20),c=Math.max(c,0),this.badgeDashContainer.css({left:c,top:l}),this.buttons.EditCountButton&&this.buttons.EditCountButton.setEditCount(e.editCount),this.buttons.ToneButton&&this.buttons.ToneButton.updateIcon(),this.buttons.AnnotationsButton&&this.buttons.AnnotationsButton.updateIcon(),this.badgeDashContainer.show()}}}},{key:"hide",value:function(){this.badgeDashContainer&&(this.badgeDashContainer.hide(),this.containerId=null)}}])&&gr(t.prototype,e),n&&gr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),mr=n(216);function br(t){return br="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},br(t)}function Dr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return wr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ar(r.key),r)}}function Ar(t){var e=function(t,e){if("object"!=br(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==br(e)?e:e+""}var Er=null,Cr=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showSpinner=this.regularShowSpinner,this.hideSpinner=this.regularHideSpinner,this.parentContainer=null,this.containerId=null,this.containerInfo=null,this.badgeShadowHost=null,this.badge=null,this.badgeSpinner=null,this.badgeContainer=null,this.hostname=y(),this.pathname=m(),this.editCount=0},e=[{key:"firefoxShowSpinner",value:function(){this.isEnabled()&&(this.badge.hide(),this.badgeSpinner.show())}},{key:"firefoxHideSpinner",value:function(){this.isEnabled()&&(this.badge.show(),this.badgeSpinner.hide())}},{key:"regularShowSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeOut(300),this.badgeSpinner.stop().fadeIn(300))}},{key:"regularHideSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeIn(300),this.badgeSpinner.stop().fadeOut(300))}},{key:"detectOverlappingElement",value:function(t,e){if(!this.isEnabled())return null;var n,r=Dr(document.elementsFromPoint(e.right,e.bottom));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i&&!(i===t||i.getAttribute("is-sapling-overlay")||mr(i).parents("[is-sapling-overlay]").length>0)){var o=i.getBoundingClientRect();if(o.width>0&&o.height>0){var a=window.getComputedStyle(i);if("none"!==a.display&&"hidden"!==a.visibility&&parseFloat(a.opacity)>0&&o.width<50&&o.height<50)return o}}}}catch(t){r.e(t)}finally{r.f()}return null}},{key:"createUIElements",value:function(t,e,n,r){var i=this;if(this.isEnabled()&&(this.parentContainer=t,this.containerId=n,this.containerInfo=r,"outlook.live.com"===this.hostname?(this.badgeShadowHost&&!Q(this.badgeShadowHost)&&(this.badgeShadowHost.remove(),this.badgeShadowHost=null),this.badgeShadowHost||(this.badgeShadowHost=document.createElement("div"),this.badgeShadowHost.setAttribute("is-sapling-overlay",!0),this.badgeShadowHost.attachShadow({mode:"open"}),mr(t.parentNode.parentNode).append(this.badgeShadowHost),mr(this.badgeShadowHost).css({"pointer-events":"none",position:"sticky",bottom:"0px"}))):this.badgeShadowHost=e,!this.badgeContainer)){var o=this.badgeShadowHost.shadowRoot;Er||(Er=new yr).createUIElements();var a="2px";"outlook.live.com"===this.hostname&&(a="100px");var s=2,u=8,c=8,l="#3f51b5",f="#990000";if((mr(t).height()<24||mr(t).width()<140)&&(u=6,c=4,s=1),"SDK"===d.MODE){if(Sapling.appearance.customCSS){var p=mr('<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>"));mr(o).prepend(p)}Sapling.appearance.variables.badgeSize&&(u=Sapling.appearance.variables.badgeSize),Sapling.appearance.variables.badgeMargin&&(c=Sapling.appearance.variables.badgeMargin),Sapling.appearance.variables.badgeColor&&(l=Sapling.appearance.variables.badgeColor),Sapling.appearance.variables.badgeErrorColor&&(f=Sapling.appearance.variables.badgeErrorColor)}var h=mr(function(t,e,n,r,i,o){return'\n<style type="text/css">\n.sapling-badge-container {\n position: absolute;\n bottom: '.concat(t,";\n right: 0px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n}\n\n.sapling-status-container {\n position: absolute;\n bottom: ").concat(e,"px;\n right: ").concat(e,"px;\n}\n\n.sapling-badge {\n position: absolute;\n width: ").concat(n,"px;\n height: ").concat(n,"px;\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n text-align: center;\n border-radius: 50%;\n}\n\n.errors {\n background-color: ").concat(o,";\n}\n\n.no-errors {\n background-color: ").concat(i,";\n}\n\n.connectivity-error .sapling-badge {\n background-color: ").concat(o,";\n}\n\n.throttled-error .sapling-badge {\n background-color: orange;\n}\n\n.sapling-badge-spinner {\n position: absolute;\n width: ").concat(n-4,"px;\n height: ").concat(n-4,"px;\n border: ").concat(Math.floor(n/4),"px solid ").concat(i,";\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n border-top: ").concat(Math.floor(n/4),"px solid rgba(0,0,0,0);\n border-radius: 50%;\n animation: rotation 2s infinite linear;\n}\n\n.connectivity-error .sapling-badge-spinner {\n border: 2px solid ").concat(o,";\n border-top: 2px solid rgba(0,0,0,0);\n}\n\n.sapling-badge-hud {\n position: absolute;\n top: -22px;\n left: -42px;\n transition: all 0.25s;\n}\n\n.sapling-tone-hud {\n cursor: pointer;\n pointer-events: initial;\n display: flex;\n transition: all 0.25s;\n}\n\n@keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n</style>")}(a,s,u,c,l,f));mr(o).prepend(h),this.badgeContainer=mr('<div class="sapling-badge-container"></div>');var g=mr('<div class="sapling-status-container"></div>');this.badge=mr('<div class="sapling-badge no-errors"></div>'),this.badgeSpinner=mr('<div class="sapling-badge-spinner" style="display: none;"> </div>'),this.headsUpContainer=mr('<div class="sapling-badge-hud" style=""></div>'),this.badgeContainer.append(g),g.append(this.headsUpContainer),g.append(this.badge),g.append(this.badgeSpinner),mr(o).append(this.badgeContainer),setTimeout(function(){i.adjustBadgePositionIfNeeded(t)},100)}}},{key:"adjustBadgePositionIfNeeded",value:function(t){if(this.badgeContainer&&this.isEnabled())for(var e=0,n=0;n<2;n+=1){var r=this.badgeShadowHost.getBoundingClientRect(),i={right:r.right-e,bottom:r.bottom},o=this.detectOverlappingElement(t,i);if(!o)break;e+=o.width+10,this.badgeContainer.css("right","".concat(e,"px"))}}},{key:"removeUIElements",value:function(){this.badgeShadowHost&&this.badgeShadowHost.remove()}},{key:"isEnabled",value:function(){return!!Fe()&&!["notion.so","trello.com","canva.com"].includes(this.hostname)&&!this.pathname.includes("wp-admin")}},{key:"updateBadgeCount",value:function(t){this.isEnabled()&&(0===t?(this.badge.removeClass("errors"),this.badge.addClass("no-errors")):(this.badge.removeClass("no-errors"),this.badge.addClass("errors")),this.badgeContainer&&(this.badgeContainer.removeClass("connectivity-error"),this.hideSpinner(),this.editCount=t,this.containerId===Er.badgeDashContainer.containerId&&Er.buttons.EditCountButton&&Er.buttons.EditCountButton.setEditCount(t)))}},{key:"showErrorState",value:function(){this.badgeContainer&&this.badgeContainer.addClass("connectivity-error"),this.badgeDashboard&&this.badgeDashboard.buttons&&this.badgeDashboard.buttons.EditCountButton&&this.badgeDashboard.buttons.EditCountButton.setToolTipText("Check your internet and firewall settings.")}},{key:"showThrottledState",value:function(){this.hideSpinner(),this.badgeContainer.addClass("throttled-error"),Er.buttons.ThrottleButton&&(Er.buttons.ThrottleButton.isThrottled=!0,Er.buttons.ThrottleButton.refreshState())}},{key:"showBadgeDashboard",value:function(){Er.show(this.parentContainer,this,this.containerId,this.containerInfo)}}],e&&xr(t.prototype,e),n&&xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Sr=n(216);function _r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||jr(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return kr(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(kr(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,kr(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,kr(f,"constructor",c),kr(c,"constructor",u),u.displayName="GeneratorFunction",kr(c,i,"GeneratorFunction"),kr(f),kr(f,i,"Generator"),kr(f,r,function(){return this}),kr(f,"toString",function(){return"[object Generator]"}),(Or=function(){return{w:o,m:p}})()}function kr(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}kr=function(t,e,n,r){function o(e,n){kr(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},kr(t,e,n,r)}function Tr(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Fr(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Tr(o,r,i,a,s,"next",t)}function s(t){Tr(o,r,i,a,s,"throw",t)}a(void 0)})}}function jr(t,e){if(t){if("string"==typeof t)return Ir(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ir(t,e):void 0}}function Ir(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Nr(t){Sr(t).find("*").each(function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=jr(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.attributes);try{for(r.s();!(n=r.n()).done;){var i=n.value;"data-sapling-ignore"!==i.name&&e.removeAttribute(i.name)}}catch(t){r.e(t)}finally{r.f()}})}function Br(t){if("textarea"===t.type)return t.value;var e=t.cloneNode(!0);Sr(e).find("script").remove(),Sr(e).find("style").remove(),Sr(e).find("xml").remove(),function(t){Sr(t).find(".gmail_quote").remove(),Sr(t).find(".gmail_attr").remove()}(e);for(var n=e.firstChild;null!==n;){var r=n.nodeType;if(r!==Node.TEXT_NODE&&r!==Node.ELEMENT_NODE){var i=n;if(i.nextSibling)n=i.nextSibling;else{var o=i.parentNode;if(o)for(;o!==e;){if(o.nextSibling){n=o.nextSibling;break}o=o.parentNode}else n=null}i.remove()}else n=F(n,e)}return Nr(e),S(e.innerHTML||"")}function Pr(t,e,n,r,i,o){var a=n,s=r,u=I(a,s,i.startIndex+e,t,!1,!1);if(null===u)return[a,s];var c=u.domElement,l=u.domOffset,f=I(a=c,s=u.indexSum,i.endIndex+e,t,!1,!0);if(null===f)return[a,s];var p=f.domElement,d=f.domOffset;a=p,s=f.indexSum;var h=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=document.createRange();if(s.setStart(e,n),s.setEnd(r,i),!Ho(s,o))return null;return function(t,e,n,r){var i=r,o=H(t),a=hs[o];if(!a)return;var s=a.edits;if(n.editId in a.edits){if(Ho(s[n.editId].editRange,n,!1))return void(i&&delete i[n.editId])}if(i)for(var u=0,c=Object.keys(i);u<c.length;u++){var l=c[u],f=i[l],p=f.edit,d=f.editRange;if(Qi(d,e)){if(d.toString()===e.toString()){p.editId in s&&!s[l].isHover&&Ts(o,p.editId),delete i[l];break}Ts(o,l),delete i[l]}}n.editId in s?(s[n.editId].edit=n,s[n.editId].editRange=e):s[n.editId]={editRange:e,edit:n,domElements:[],isHover:!1};ks(o,n.editId)}(t,s,o,a)}(t,c,l,p,d,i,o);return h&&(a=h,s=i.startIndex+e),[a,s]}function Rr(t,e,n){return Lr.apply(this,arguments)}function Lr(){return(Lr=Fr(Or().m(function t(e,n,r){var i,o;return Or().w(function(t){for(;;)switch(t.n){case 0:if(i=I(e,0,n,e,!1,!1)){t.n=1;break}return t.a(2,[]);case 1:if(o=I(i.domElement,i.indexSum,r,e,!1,!0)){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,Ps(e,i.domElement,i.domOffset,o.domElement,o.domOffset);case 3:return t.a(2,t.v)}},t)}))).apply(this,arguments)}function Mr(t,e,n,r){return Hr.apply(this,arguments)}function Hr(){return(Hr=Fr(Or().m(function t(e,n,r,i){var o,a,s,u,c,l,f,p,h;return Or().w(function(t){for(;;)switch(t.n){case 0:if("SDK"!==d.MODE||Sapling.edits){t.n=1;break}return t.a(2);case 1:return o=Object.keys(n).map(function(t){return n[t]}).sort(function(t,e){return t.sortId-e.sortId}),t.n=2,Rr(e,r,r+i);case 2:a=t.v,s=e,u=0,c=1,l=0;case 3:if(!(l<o.length)){t.n=5;break}if(f=o[l],p=Pr(e,r,s,u,f,a),h=_r(p,2),s=h[0],u=h[1],++c%10!=0){t.n=4;break}return t.n=4,new Promise(function(t){return setTimeout(t,0)});case 4:l+=1,t.n=3;break;case 5:return a&&Fs(e,Object.keys(a)),t.a(2,!0)}},t)}))).apply(this,arguments)}var Ur=!0;function zr(t){Ur=t}function qr(){return Ur}function Wr(){gt("makeToolbarIconActive")}function Gr(){gt("makeToolbarIconThrottled")}function $r(){gt("makeToolbarIconInactive")}function Yr(t){gt("updateToolbarIconEditCount",{editCount:t})}function Xr(){gt("updateToolbarIconDisconnected")}var Vr=n(571);new Vr("https://sapling.ai").hostname,new Vr("https://api.sapling.ai").hostname;n(571);var Kr,Jr=n(216),Qr=null;function Zr(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Jr("#slidecheck").prop("disabled",Ee()),Jr("#slidecheck").prop("checked",be()),Jr("#advanced-edits-slidecheck").prop("disabled",Ee()),Jr("#advanced-edits-slidecheck").prop("checked",De()),Jr("#complete-slidecheck").prop("disabled",!ce()),Jr("#complete-slidecheck").prop("checked",xe()),Jr("#badge-slidecheck").prop("checked",Fe()),Jr("#tone-slidecheck").prop("checked",Te()),Jr("#ai-detect-slidecheck").prop("checked",Oe()),Jr("#rephrase-slidecheck").prop("checked",Se()),Jr("#lang-select").val(Ne()),t)return se()?Jr("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Do you need to <a href="https://sapling.ai/user/sign-in">sign in</a>?'):Jr("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Contact <a href="https://sapling.ai/contact" target="_blank">Sapling Sales</a> to subscribe.'),Jr("#subscription-banner").css({"font-weight":"500",border:"2px solid #555"}),void Jr("#subscription-banner").show();be()||xe()?Wr():$r()}function ti(t){if(ce()){var e=ve();null===e||e>30?(t.html("<strong>".concat(le().toUpperCase(),"</strong>")),t.css({"background-color":"#deefde",border:"0"}),Jr("#team-premium-banner").hide()):(e<=1?t.html('<a target="_blank" href="https://sapling.ai/plans"><strong'.concat(le().toUpperCase(),"</strong></a> (<strong>1 day</strong> left)")):t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>'.concat(le().toUpperCase(),"</strong></a> (<strong>").concat(e," days</strong> left)")),t.css({"background-color":"#fff3cd",color:"#856404",border:"1px solid #ffeeba"})),t.show()}else ue()?(t.html('<a target="_blank" href="https://sapling.ai/plans"><strong>Upgrade</strong></a> or sign in to see premium edits.'),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):se()||ue()?(t.html('<strong><a target="_blank" href="'.concat(d.WEBSITE_URL,'/user/register">Sign up</a></strong>')),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})):(t.html("<strong>Please confirm your email using the link in email we sent you.</strong>"),t.css({"background-color":"#fff3cd",border:"0",color:"#856404"})),t.show()}Re().debounce(function(){Qr.postMessage(Kr.innerHTML)},200,{leading:!1,trailing:!0});var ei=n(216);function ni(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return ri(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(ri(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,ri(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,ri(f,"constructor",c),ri(c,"constructor",u),u.displayName="GeneratorFunction",ri(c,i,"GeneratorFunction"),ri(f),ri(f,i,"Generator"),ri(f,r,function(){return this}),ri(f,"toString",function(){return"[object Generator]"}),(ni=function(){return{w:o,m:p}})()}function ri(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}ri=function(t,e,n,r){function o(e,n){ri(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},ri(t,e,n,r)}function ii(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var oi=new Set;function ai(t,e,n,r){var i;return i=[],Object.keys(Mi).forEach(function(t){var e=Mi[t];Object.keys(e).forEach(function(t){i.push(e[t])})}),Object.keys(Hi).forEach(function(t){i.push(Hi[t])}),i.filter(function(t){return t.isLoading}).length>0&&function(t){var e=hs[t];if(!e||!e.badge)return;e.badge.showSpinner()}(r),gt("makeToolbarIconLoading"),function(t){var e=hs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.queryAndUpdate()}(r),function(t,e,n,r){gt("request/GET_EDITS",{html:D()(t,2097152),sessionId:e,context:wt()},n,r)}(t,r,function(){var t,i=(t=ni().m(function t(i){var o,a;return ni().w(function(t){for(;;)switch(t.n){case 0:if(!(o=i.edits).includes("throttled")){t.n=1;break}return Hn(),Gr(),Ds(r),"sapling-embedded-editable"===n.id&&Zr(!0),t.a(2);case 1:return $i(r,e),zi(),a=0,t.n=2,Yi(n,r,e,o);case 2:a=ys(n),zr(!0),a>0&&!oi.has(r)&&(Et("edits_applied",{num_edits:a},r),oi.add(r)),qr()&&("sapling-embedded-editable"===n.id?Wr():Yr(a)),bs(r),xs(r),ws(r);case 3:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){ii(o,r,i,a,s,"next",t)}function s(t){ii(o,r,i,a,s,"throw",t)}a(void 0)})});return function(t){return i.apply(this,arguments)}}(),function(t){zr(!1),Xr(),bs(r),function(t){var e=hs[t];if(!e)return;if(!e.badge)return;e.badge.showErrorState()}(r)})}function si(t,e){if(function(){if(!mn("sapling-complete").length){var t=mn("<sapling-complete></sapling-complete>");t.css({display:"inline",width:0,height:0});var e=t[0];e.attachShadow({mode:"open"}),wn=e.shadowRoot,mn("html").append(t)}}(),Cn(),!function(t){for(var e=bn(Sn(t),2),n=e[0],r=e[1],i=0,o=0;o<n.length;o++){var a=i+n[o].length;if(i<=r&&a>r)return!0;i=a+1}return!1}(t=ei(t)[0])){var n=_n(t);n&&n.trim()&&function(t,e,n,r){gt("request/GET_COMPLETION",{query:t.slice(-300),sessionId:e,context:wt()},n,r)}(n,e,function(e){if(_n(t)===n){var r=e.completion;r&&r.output&&r.output.trim()&&Tn(t,r.output,r)}else Cn()},function(){zr(!1),Xr()})}}function ui(t,e,n,r){var i={hidden:document.hidden};return Object.assign(i,r),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=wt();Object.assign(o,i),gt("request/GET_SUGGEST",{query:t.slice(-300),multiquery:e,context:o},n,r)}(t,e,function(t){n(t)},function(){},i)}function ci(t,e,n){!function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=wt();Object.assign(i,r),gt("request/GET_MATCH_SUGGEST",{inp:t.slice(-300),context:i},e,n)}(t,function(t){e(t)},function(){},n)}function li(t,e,n){if(!n.isPointInRange(t,e))return null;var r=n.cloneRange();return r.setEnd(t,e),r.toString().length}function fi(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createRange();if(n.selectNodeContents(t),e)return t.selectionStart;if(!t.getRootNode().getSelection)return 0;var r=t.getRootNode().getSelection(),i=null,o=null;return r.anchorNode&&(i=li(r.anchorNode,r.anchorOffset,n)),r.focusNode&&(o=li(r.focusNode,r.focusOffset,n)),i&&o?Math.min(i,o):i||o}var pi=n(216);function di(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return hi(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(hi(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,hi(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,hi(f,"constructor",c),hi(c,"constructor",u),u.displayName="GeneratorFunction",hi(c,i,"GeneratorFunction"),hi(f),hi(f,i,"Generator"),hi(f,r,function(){return this}),hi(f,"toString",function(){return"[object Generator]"}),(di=function(){return{w:o,m:p}})()}function hi(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}hi=function(t,e,n,r){function o(e,n){hi(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},hi(t,e,n,r)}function gi(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function vi(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){gi(o,r,i,a,s,"next",t)}function s(t){gi(o,r,i,a,s,"throw",t)}a(void 0)})}}var yi=4e3,mi=[new RegExp("[\\s\\S]{0,".concat(yi,"}</div>"),"imy"),new RegExp("[\\s\\S]{0,".concat(yi,"}</p>"),"imy"),new RegExp("[\\s\\S]{0,".concat(yi,"}<br ?/?>"),"imy"),new RegExp("[\\s\\S]{0,".concat(yi,"}(\\.|\\?|!)(?=[^>]*(<|$))"),"imy")];function bi(t,e){if(t.length-e<=2e3)return{sectionHtml:t,sectionTextLength:pi("<span>".concat(t,"</span>")).text().length,endIndex:t.length,skippedText:0};for(var n=e+yi,r=0;r<mi.length;r+=1){mi[r].lastIndex=e;var i=t.match(mi[r]);i&&(n=e+i[0].length)}for(var o=t.indexOf("<code>",e);-1!==o&&o<n;){var a=t.indexOf("</code>",o);if(a>=0){var s=t.slice(o,a+7);if(/<br\s?\/?>/i.test(s)){var u=t.slice(e,o);return{sectionHtml:u,sectionTextLength:pi("<span>".concat(u,"</span>")).text().length,endIndex:a+7,skippedText:pi("<span>".concat(s,"</span>")).text().length}}}o=t.indexOf("<code>",o+6)}var c=t.slice(e,n);return{sectionHtml:c,sectionTextLength:pi("<span>".concat(c,"</span>")).text().length,endIndex:n,skippedText:0}}function Di(t){var e=0,n=null;if(0===t.length)return e;for(n=0;n<t.length;n+=1)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function wi(t){return xi.apply(this,arguments)}function xi(){return(xi=vi(di().m(function t(e){var n,r,i,o,a,s,u,c,l;return di().w(function(t){for(;;)switch(t.n){case 0:n=[],r=0,i=0,o=0;case 1:if(!(r<e.length)){t.n=3;break}if(a=bi(e,r),s=a.sectionHtml,u=a.sectionTextLength,c=a.endIndex,l=a.skippedText,n.push({html:s,htmlLength:s.length,htmlOffset:r,htmlHash:Di(s),textOffset:i,textLength:u}),r=c,i+=u+l,++o%25!=0){t.n=2;break}return t.n=2,new Promise(function(t){return setTimeout(t,50)});case 2:t.n=1;break;case 3:return t.a(2,n)}},t)}))).apply(this,arguments)}function Ai(t,e){var n=I(t,0,e.textOffset,t,!1,!1),r=document.createRange();return r.selectNodeContents(n.domElement),r.getBoundingClientRect().top}function Ei(t,e){var n=window.innerHeight/2;t.sort(function(t,r){var i=Ai(e,t),o=Ai(e,r);return Math.abs(i-n)-Math.abs(o-n)});for(var r=0;r<t.length;r+=1){var i=t[r];i.priority=r<8?r:100}return t}function Ci(t,e){t.sort(function(t,n){return Math.abs(t.textOffset-e)-Math.abs(n.textOffset-e)});for(var n=0;n<t.length;n+=1){var r=t[n];r.priority=n<8?n:100}return t}function Si(t,e){return _i.apply(this,arguments)}function _i(){return(_i=vi(di().m(function t(e,n){var r,i;return di().w(function(t){for(;;)switch(t.n){case 0:return r=fi(n)||0,t.n=1,wi(e);case 1:if(0!==(i=t.v).length){t.n=2;break}return t.a(2,[]);case 2:return t.a(2,Ci(i,r))}},t)}))).apply(this,arguments)}function Oi(t,e){return ki.apply(this,arguments)}function ki(){return(ki=vi(di().m(function t(e,n){var r;return di().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,wi(e);case 1:if(0!==(r=t.v).length){t.n=2;break}return t.a(2,[]);case 2:return t.a(2,Ei(r,n))}},t)}))).apply(this,arguments)}var Ti=n(216);function Fi(t){return Fi="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},Fi(t)}function ji(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ii(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ii(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ni(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(Fi(t)+" is not iterable")}function Bi(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Pi(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Pi(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Pi(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,Pi(f,"constructor",c),Pi(c,"constructor",u),u.displayName="GeneratorFunction",Pi(c,i,"GeneratorFunction"),Pi(f),Pi(f,i,"Generator"),Pi(f,r,function(){return this}),Pi(f,"toString",function(){return"[object Generator]"}),(Bi=function(){return{w:o,m:p}})()}function Pi(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Pi=function(t,e,n,r){function o(e,n){Pi(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Pi(t,e,n,r)}function Ri(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Li(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Ri(o,r,i,a,s,"next",t)}function s(t){Ri(o,r,i,a,s,"throw",t)}a(void 0)})}}var Mi={},Hi={};function Ui(t,e){if(t in Mi){var n=Mi[t];e in n&&(n[e].isLoading&&(Hi[e]=n[e]),delete n[e])}}function zi(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[];Object.keys(Mi).forEach(function(t){var n=Mi[t];Object.keys(n).forEach(function(t){e.push(n[t])})});var n=(new Date).getTime(),r=e.filter(function(t){return!t.isComplete}),i=e.filter(function(t){return t.isLoading&&n-t.requestTime<15e3});r.sort(function(e,n){if(t&&e.containerId!==n.containerId){if(e.containerId===t)return-1;if(e.containerId===t)return 1}return e.priority-n.priority});var o=[];Object.keys(Hi).forEach(function(t){o.push(Hi[t])});var a=o.filter(function(t){return t.isLoading&&n-t.requestTime<15e3}),s=i.length+a.length;if(s<1)for(var u=Math.min(r.length,1-s),c=0;c<u;c+=1){var l=r[c];l.requestTime=(new Date).getTime(),l.isLoading=!0,l.htmlHash in Hi?(l.requestObj=Hi[l.htmlHash].requestObj,delete Hi[l.htmlHash]):(l.requestObj=l.requestFunction(),l.requestTime=n)}}function qi(t,e){return Wi.apply(this,arguments)}function Wi(){return(Wi=Li(Bi().m(function t(e,n){var r,i,o,a,s,u,c;return Bi().w(function(t){for(;;)switch(t.n){case 0:if(r=(r=Br(e)).replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\uFEFF/g," "),i=H(e),!n){t.n=2;break}return t.n=1,Oi(r,e);case 1:o=t.v,t.n=4;break;case 2:return t.n=3,Si(r,e);case 3:o=t.v;case 4:Mi[i]=Mi[i]||{},a=Mi[i],s={},u=Bi().m(function t(){var n,r,u,l;return Bi().w(function(t){for(;;)switch(t.n){case 0:if(n=o[c],r=Ti("<span>".concat(n.html,"</span>")).text(),0!==r.replace(/(\r\n\t|\n|\r\t)/gm,"").trim().length){t.n=1;break}return t.a(2,1);case 1:if(s[n.htmlHash]=s[n.htmlHash]||[],s[n.htmlHash].push([n.textOffset,n.textLength]),!(n.htmlHash in a)){t.n=5;break}if((u=a[n.htmlHash]).priority=n.priority,!("edits"in u)){t.n=3;break}return t.n=2,Mr(e,u.edits,n.textOffset,n.textLength);case 2:t.n=4;break;case 3:u.isComplete=!1;case 4:t.n=6;break;case 5:l=function(){return ai(n.html,n.htmlHash,e,i)},a[n.htmlHash]={requestFunction:l,containerId:i,priority:n.priority,hash:n.htmlHash,requestTime:null};case 6:return t.a(2)}},t)}),c=0;case 5:if(!(c<o.length)){t.n=8;break}return t.d(Ni(u()),6);case 6:if(!t.v){t.n=7;break}return t.a(3,7);case 7:c++,t.n=5;break;case 8:Object.keys(a).forEach(function(t){t in s?a[t].textOffsets=s[t]:Ui(i,t)});case 9:return t.a(2)}},t)}))).apply(this,arguments)}function Gi(t,e){if(t in Mi)for(var n=Mi[t],r=Object.keys(n),i=0;i<r.length;i+=1){var o=r[i];n[o].edits&&delete n[o].edits[e]}}function $i(t,e){t in Mi&&e in Mi[t]&&(Mi[t][e].isLoading=!1,Mi[t][e].isComplete=!0),e in Hi&&delete Hi[e]}function Yi(t,e,n,r){return Xi.apply(this,arguments)}function Xi(){return(Xi=Li(Bi().m(function t(e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g;return Bi().w(function(t){for(;;)switch(t.n){case 0:for(o={},a=0,s=0;s<i.length;s+=1)u=i[s],c="".concat(u.id,":").concat(u.start.offset),o[c]={sortId:a,editId:c,editHash:u.id,startIndex:u.start.offset,endIndex:u.end.offset,startText:u.start.text,endText:u.end.text,originalText:u.original_text,replacementText:u.replacement_text,replacementContext:u.replacement_context,premium:u.premium,fillin:u.replacement_text&&u.replacement_text.includes("SAPLING_FILLIN"),description:u.description,requireLogin:u.require_login,category:u.category,generalErrorType:u.general_error_type,difficulty:u.difficulty,errorType:u.error_type,dictionary:u.dictionary},a+=1;if(!Mi[n]||!(r in Mi[n])){t.n=3;break}(l=Mi[n][r]).edits=o,f=l.textOffsets,p=0;case 1:if(!(p<f.length)){t.n=3;break}return d=ji(f[p],2),h=d[0],g=d[1],t.n=2,Mr(e,o,h,g);case 2:p+=1,t.n=1;break;case 3:return t.a(2)}},t)}))).apply(this,arguments)}function Vi(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)&&t.isPointInRange(i,o)}function Ki(t,e){var n=e.endContainer,r=e.endOffset;return t.isPointInRange(n,r)}function Ji(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)||t.isPointInRange(i,o)}function Qi(t,e){return Ji(t,e)||Ji(e,t)}function Zi(t,e){return e<=(t.nodeType===Node.TEXT_NODE?t.length:t.childNodes.length)}function to(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,i=t.endOffset;return!!e&&!!r&&e.ownerDocument===r.ownerDocument&&Zi(e,n)&&Zi(r,i)}function eo(t){return!!["TEXTAREA","INPUT"].includes(t.nodeName)||!!t.isContentEditable}function no(){return!!["TEXTAREA","INPUT"].includes(document.activeElement.nodeName)||!!document.activeElement.isContentEditable}var ro=n(216);function io(t){return io="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},io(t)}function oo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ao(r.key),r)}}function ao(t){var e=function(t,e){if("object"!=io(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=io(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==io(e)?e:e+""}var so=new WeakMap,uo=function(t){var e="string"==typeof t?t.trim():"";return(e.length>0?e:"unknown").toLowerCase().replace(/\s+/g,"_")},co="\n<style>\n .sapling-ai-detect-select-button::after {\n content: 'Run AI Detection';\n position: absolute;\n display: none;\n background-color: #333;\n color: #fff;\n padding: 5px;\n border-radius: 5px;\n width: 150px;\n left: 50%;\n transform: translateX(-50%);\n bottom: -100%;\n text-align: center;\n }\n\n .sapling-ai-detect-select-button:hover::after {\n display: block;\n }\n\n .sapling-ai-detect-select-button {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-button:hover {\n opacity: 1;\n }\n\n .sapling-ai-detect-select-content {\n width: 80vw;\n min-height: 40vh;\n max-height: 90vh;\n background: white;\n border-radius: 20px;\n position: fixed;\n overflow: hidden;\n top: 5vh;\n left: 10vw;\n z-index: 9999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n font: 9pt helvetica, arial;\n display: flex;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-content-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font: 14pt helvetica, arial;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .sapling-ai-detect-select-content-header .left {\n display: flex;\n align-items: center;\n }\n\n .sapling-ai-detect-select-content-header .left img {\n height: 20px;\n padding: 5px 10px;\n border-right: 1px solid #ccc;\n padding-right: 20px;\n margin-right: 20px;\n }\n\n .sapling-ai-detect-select-content-header .right {\n display: flex;\n align-items: center;\n padding: 5px 10px;\n }\n\n .sapling-ai-detect-select-content-header .right img {\n height: 16px;\n width: 16px;\n vertical-align: middle;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner {\n padding: 5px 10px;\n margin: 0 15px;\n font-size: 10pt;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner a {\n text-decoration: none;\n }\n\n .sapling-ai-detect-select-header-button {\n cursor: pointer;\n padding: 0 5px;\n }\n\n .sapling-ai-detect-select-content-body {\n display: flex;\n flex-grow: 1;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .sapling-ai-detect-select-content-body .hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-overall {\n flex-basis: 35%;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-overall .overall-score {\n font-size: 35pt;\n }\n\n .sapling-ai-detect-select-overall .overall-message {\n text-align: center;\n font-size: 12pt;\n color: #555;\n margin: 15px;\n }\n\n .sapling-ai-detect-select-score-string {\n overflow: scroll;\n font-size: 10pt;\n padding: 20px;\n width: 100%;\n }\n\n .sapling-ai-detect-select-score-string .score-strings {\n padding: 5px;\n text-align: justify;\n border: 1px solid #999;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences {\n padding: 20px 40px;\n font-size: 12pt;\n overflow: scroll;\n max-height: 65vh;\n color: #333;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row {\n display: flex;\n margin: 15px 0;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row .sentence-text {\n flex-basis: 85%;\n margin-right: 15px;\n }\n\n .sapling-ai-detect-select-error.hidden, .sapling-ai-detect-select-waiting.hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-error {\n color: red;\n }\n\n .sapling-ai-detect-select-error,\n .sapling-ai-detect-select-waiting,\n .sapling-ai-detect-select-premium {\n color: #333;\n position: absolute;\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 12pt;\n top: 0;\n left: 0;\n text-align: center;\n background: white;\n }\n\n .sapling-ai-detect-select-premium a {\n padding: 5px 15px;\n margin: 10px;\n background-color: #535f99;\n color: white;\n text-transform: capitalize;\n text-decoration: none;\n border-radius: 5px;\n }\n\n .sapling-ai-detect-select-spinner {\n transition: all 0.25s;\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-ai-detect-select-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .sapling-ai-detect-select-analysis-mode {\n margin-left: 10px;\n font-size: 12pt;\n border: 1px solid #5c6bc0;\n padding: 5px 10px;\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-ai-detect-select-analysis-mode.inactive {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-analysis-mode:hover {\n background-color: #5c6bc0;\n color: white;\n }\n\n .sapling-ai-detect-select-edit-recheck {\n display: block;\n margin: 5px auto;\n margin-top: -10px;\n width: 100%;\n border: none;\n border-radius: 5px;\n padding: 5px;\n background-color: #535f99;\n color: white;\n font-size: 10pt;\n cursor: pointer;\n }\n</style>\n",lo=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadowHost=e,this.contentShadowHost=n,this.aiDetectSelectButton=null,this.aiDetectSelectContent=null,this.assetUrls={"xmark-solid":_f("assets/xmark-solid.svg"),"spinner-solid":_f("assets/spinner-solid.svg"),"thumbs-up-regular":_f("assets/thumbs-up-regular.svg"),"thumbs-down-regular":_f("assets/thumbs-down-regular.svg"),"sapling-logo-horizontal":_f("assets/sapling-logo-horizontal.png"),"fa-hand-sparkles-solid":_f("assets/fa-hand-sparkles-solid.svg")}},e=[{key:"positionButton",value:function(){var t=window.getSelection();if(t&&t.rangeCount&&t.toString().trim()){var e=t.getRangeAt(0).getBoundingClientRect(),n=Ce()?15:0;ro(this.aiDetectSelectButton).css({left:Math.min(e.right+10+n,window.innerWidth-50),top:Math.max(e.top-10+n,50)+window.scrollY,background:"#e8eaf6",padding:"12px 10px 7px 10px",position:"absolute",cursor:"pointer",borderRadius:"35px",border:"2px solid #535f99",zIndex:9998})}}},{key:"_getAIDetectionScores",value:function(t,e){var n,r=this;if(ro(this.aiDetectSelectContent).find(".sapling-ai-detect-select-error").addClass("hidden"),!_e())return ro(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),void ro(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").removeClass("hidden");ro(this.loadingIndicator).addClass("sapling-loading"),t=t.trim(),this.lastQueryText=t,"chat.openai.com"==window.location.hostname&&(e.openai_model=null===(n=document.querySelectorAll(".items-center.sm\\:justify-center span")[0])||void 0===n?void 0:n.innerText),xt(t,0,window.location.href,e,function(t){ro(r.loadingIndicator).removeClass("sapling-loading"),ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden");var n,i=t.aidetect,o=i.score,a=i.sentence_scores,s=i.score_string,u=i.hash;n=(o*=100)>90?"Highly likely composed by AI.":o>70?"Significant chance of AI authorship.":o>50?"Toss-up: might be AI-generated.":o>25?"Low likelihood of AI creation.":o>10?"Minimal signs of AI origin.":"Unlikely AI-authored; appears human-written.",ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html('\n <b class="overall-score" style="color: '.concat(G(o),'">\n ').concat(o.toFixed(2),'%\n </b>\n <div class="overall-message">').concat(n,'</div>\n <div>\n <a href="https://sapling.ai/ai-content-detector/').concat(u,'" target="__blank" style="color: #535f99;" title="Use to share a detailed link to this AI Detection analysis. Link will expire in 3 days.">\n Sapling AI Detection certificate</a>\n </div>\n '));var c=document.createElement("div");c.innerHTML=s,c.querySelectorAll("span").forEach(function(t){t.setAttribute("sapling-ignore","true")}),s=c.innerHTML,ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").addClass("has-backend-response").attr("sapling-ignore","true").html("".concat(s));var l=document.createRange();l.selectNodeContents(r.scoreStrings),l.collapse(!1);var f=window.getSelection();f.removeAllRanges(),f.addRange(l),ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),a.forEach(function(t){var e=t.score,n=t.sentence,i=(e*=100)>=0?"".concat(e.toFixed(2),"%"):"n/a";ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").append('\n <div class="sentence-row">\n <div class="sentence-text">'.concat(n,'</div>\n <div class="sentence-score" style="color: ').concat(G(e),'">').concat(i,"</div>\n </div>\n "))}),Et("ai_detect_select_processed_".concat(uo(null==e?void 0:e.source)))},function(t){ro(r.loadingIndicator).removeClass("sapling-loading"),ro(r.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden")})}},{key:"createUIElements",value:function(){var t=this;this.aiDetectSelectButton||(ro(this.shadowHost.shadowRoot).find(".sapling-ai-detect-select-button").remove(),this.aiDetectSelectButton=ro('\n <div class="sapling-ai-detect-select-button">\n <img src="'.concat(this.assetUrls["fa-hand-sparkles-solid"],'" style="height: 20px" />\n </div>\n ')),this.aiDetectSelectButton.hide(),ro(this.shadowHost.shadowRoot).append(co),ro(this.shadowHost.shadowRoot).append(this.aiDetectSelectButton),ro(this.contentShadowHost.shadowRoot).append(co),this.aiDetectSelectContent=ro('\n <div class="sapling-ai-detect-select-content">\n <div class="sapling-ai-detect-select-content-header">\n <div class="left">\n <img src="'.concat(this.assetUrls["sapling-logo-horizontal"],'" style="height: 20px" />\n <span style="margin-right: 10px;">AI Detector</span>\n <span class="sapling-ai-detect-select-analysis-mode" id="sapling-ai-detect-select-overall-analysis">\n Overall Analysis\n </span>\n <span class="sapling-ai-detect-select-analysis-mode inactive" id="sapling-ai-detect-select-sentence-analysis">\n Sentence-level Analysis\n </span>\n <span id="subscription-banner"></span>\n </div>\n <div class="right"></div>\n </div>\n <div class="sapling-ai-detect-select-content-body">\n <div class="sapling-ai-detect-select-overall">\n </div>\n <div class="sapling-ai-detect-select-score-string">\n <button class="sapling-ai-detect-select-edit-recheck">\n Re-check edited text\n </button>\n </div>\n <div class="sapling-ai-detect-select-sentences hidden">\n </div>\n <div class="sapling-ai-detect-select-error hidden">\n An unknown error has occurred.<br/>Please try again in some time, or contact support@sapling.ai\n </div>\n <div class="sapling-ai-detect-select-premium hidden">\n Please <a href="https://sapling.ai/pricing" target="_blank">subscribe</a> to access the AI Detection feature.\n </div>\n <div class="sapling-ai-detect-select-waiting">\n Processing your text, please wait...\n </div>\n </div>\n </div>\n ')),this.aiDetectSelectContent.hide(),ro(this.contentShadowHost.shadowRoot).append(this.aiDetectSelectContent),this.aiDetectSelectContent[0].addEventListener("mousedown",function(t){t.stopPropagation()}),this.aiDetectSelectContent[0].addEventListener("contextmenu",function(t){t.stopPropagation()}),this.loadingIndicator=document.createElement("div"),ro(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),ro(this.loadingIndicator).addClass("sapling-ai-detect-select-spinner"),ro(this.loadingIndicator).addClass("sapling-ai-detect-select-header-button"),ro(this.aiDetectSelectContent).find(".right").append(this.loadingIndicator),this.cancelButton=document.createElement("div"),ro(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),ro(this.cancelButton).addClass("sapling-ai-detect-select-cancel"),ro(this.cancelButton).addClass("sapling-ai-detect-select-header-button"),ro(this.cancelButton).on("click",function(){t.hide()}),ro(this.aiDetectSelectContent).find(".right").append(this.cancelButton),ro(document).keyup(function(e){"Escape"===e.key&&t.hide()}),this.scoreStrings=document.createElement("div"),ro(this.scoreStrings).addClass("score-strings"),ro(this.scoreStrings).attr("sapling-ignore","true"),ro(this.scoreStrings).attr("contenteditable","true"),this.scoreStringsObserver=new MutationObserver(function(e,n){ro(t.scoreStrings).is(".has-backend-response")?ro(t.scoreStrings).removeClass("has-backend-response"):ro(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n")!=t.lastQueryText&&ro(t.scoreStrings).find("span").css("background-color","white")}),this.scoreStringsObserver.observe(this.scoreStrings,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),ro(this.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").append(this.scoreStrings),this.aiDetectSelectButton[0].addEventListener("mousedown",function(e){e.preventDefault(),ro(t.aiDetectSelectContent).fadeIn(50),t._getAIDetectionScores(t._getSelectedText(),{source:"selected text"}),Et("ai_detect_select_overlay_visible_selected_text")}),ro(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-edit-recheck",function(e){t._getAIDetectionScores(ro(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n"),{source:"edited text"})}),ro(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-analysis-mode",function(e){ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-analysis-mode").addClass("inactive"),ro(e.target).removeClass("inactive"),ro(e.target).is("#sapling-ai-detect-select-overall-analysis")?(ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").removeClass("hidden"),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").removeClass("hidden"),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").addClass("hidden")):(ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").addClass("hidden"),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").addClass("hidden"),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").removeClass("hidden"))}),ti(ro(this.aiDetectSelectContent).find("#subscription-banner")))}},{key:"_getSelectedText",value:function(){return document.getSelection().toString().replace(/\n+/g,"\n\n")}},{key:"showContent",value:function(t,e){ro(this.aiDetectSelectContent).fadeIn(50),ro(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),this._getAIDetectionScores(t.replace(/\n+/g,"\n\n").trim(),{source:e}),Et("ai_detect_select_overlay_visible_".concat(uo(e)))}},{key:"show",value:function(){var t=this,e=this._getSelectedText().trim();!e||e.split(" ").length<50||setTimeout(function(){t.positionButton(),t.aiDetectSelectButton.fadeIn(50)},200)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.aiDetectSelectButton&&setTimeout(function(){t.aiDetectSelectButton.hide(),e||(t.aiDetectSelectContent.fadeOut(250),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html(""),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),ro(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").html(""))},200)}}],e&&oo(t.prototype,e),n&&oo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function fo(){if(_e()){var t=function(){var t,e,n;if(ro("sapling-ai-detect-controls").length)t=ro("sapling-ai-detect-controls")[0],e=ro("sapling-ai-detect-button")[0],n=so.get(t);else{t=ro("<sapling-ai-detect-controls></sapling-ai-detect-controls>")[0],e=ro("<sapling-ai-detect-button></sapling-ai-detect-button>")[0];try{t.attachShadow({mode:"open"}),e.attachShadow({mode:"open"})}catch(t){return{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null}}ro("html").append(t),ro("html").append(e),n=new lo(e,t),so.set(t,n),n.createUIElements()}return{aiDetectHost:t,buttonHost:e,aiDetectSelectButton:n}}(),e=t.aiDetectSelectButton;if(e){var n=window.location.hostname;"chat.openai.com"!==n&&"chatgpt.com"!==n||function(t){ro(document.body).append("\n <style>\n .sapling-run-ai-detection-button {\n position: absolute;\n border: 2px solid #535f99;\n border-radius: 5px;\n width: 100%;\n font-size: 10pt;\n text-align: center;\n color: #535f99;\n bottom: -20px;\n background: white;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-run-ai-detection-button:hover, .dark .sapling-run-ai-detection-button {\n color: white;\n background: #535f99;\n }\n </style>\n "),setInterval(function(){document.querySelectorAll('.text-message[data-message-author-role="assistant"]').forEach(function(e){if(e.querySelectorAll(".text-gray-400.flex button.rounded-md")&&!po.get(e)){var n=e.innerText.replace(/^chatgpt\s+/i,"");if(!(n.trim().split(" ").length<50)){po.set(e,n);var r=e;ro(r).append('\n <div class="sapling-run-ai-detection-button">Detect AI</div>\n ');var i=document.createElement("div");ro(i).html("Detect AI"),ro(i).addClass("sapling-run-ai-detection-button"),ro(i).on("click",function(){n=e.querySelector(".markdown").innerText.replace(/^chatgpt\s+/i,""),t.showContent(n,"chat.openai.com generated")}),ro(r).append(i)}}})},1e3)}(e),"claude.ai"===n&&function(t){var e=t.domain,n=t.textNodesSelector,r=t.customCss,i=t.aiDetectSelectButton,o=t.textExtractor;ro(document.body).append("\n <style>\n .sapling-run-ai-detection-button {\n position: absolute;\n border: 2px solid #535f99;\n border-radius: 5px;\n width: 100%;\n font-size: 10pt;\n text-align: center;\n color: #535f99;\n bottom: -20px;\n background: white;\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-run-ai-detection-button:hover, .dark .sapling-run-ai-detection-button {\n color: white;\n background: #535f99;\n }\n\n ".concat(r,"\n </style>\n ")),setInterval(function(){document.querySelectorAll(n).forEach(function(t){if(!po.get(t)){var n=o(t);if(!(n.trim().split(" ").length<50)){po.set(t,n);var r=t;ro(r).append('\n <div class="sapling-run-ai-detection-button">Detect AI</div>\n ');var a=document.createElement("div");ro(a).html("Detect AI"),ro(a).addClass("sapling-run-ai-detection-button"),ro(a).on("click",function(){n=o(t),i.showContent(n,"".concat(e," generated"))}),ro(r).append(a)}}})},1e3)}({aiDetectSelectButton:e,domain:"claude.ai",textNodesSelector:".font-claude-message",customCss:'\n .sapling-run-ai-detection-button {\n bottom: -32px;\n width: 50%;\n }\n\n [data-mode="dark"] .sapling-run-ai-detection-button {\n color: white;\n background: #535f99;\n }\n ',textExtractor:function(t){return t.querySelector("div").innerText}})}}}var po=new WeakMap;var ho=n(216);function go(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||vo(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vo(t,e){if(t){if("string"==typeof t)return yo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yo(t,e):void 0}}function yo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function mo(t,e,n){var r=e.editId,i=e.replacementText,o=Xs(t);if(o){var a=o.edits,s=o.textAreaId,u=o.containerDomElement;if(a){var c=a[r];if(c){var l=c.editRange;Ct(e.editHash,"accept",t,n),s?function(t,e,n){if(t in iu){pu(iu[t].textArea,e.startOffset,e.endOffset,n)}}(s,l,i):vu(l,i,u),Ts(t,r)}}So(),Hs()}}function bo(t,e){var n=Xs(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit.originalText;gt("request/POST_DICTIONARY",{entry:o}),Gi(t,e),Ts(t,e)}}So(),Hs()}}function Do(){if(ho("sapling-rephrase-controls").length)return[ho("sapling-rephrase-controls")[0],ho("sapling-rephrase-button")[0]];var t=ho("<sapling-rephrase-controls></sapling-rephrase-controls>");t.css({zIndex:"2147483647",font:'11pt "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute"});var e=t[0],n=ho("<sapling-rephrase-button></sapling-rephrase-button>")[0];return e.attachShadow({mode:"open"}),n.attachShadow({mode:"open"}),ho("html").append(e),ho("html").append(n),[e,n]}function wo(){var t=ho("sapling-rephrase-controls")[0],e=ho("sapling-rephrase-button")[0];if(t&&e&&t.shadowRoot&&e.shadowRoot){var n=go(Iu(t,e),2),r=n[0],i=n[1];r.hideControls(),_u()||i.hide()}}function xo(){if(Ce()){var t=go(Do(),2),e=Iu(t[0],t[1])[1];if(e)if(no())_u()?e.show():e.hide();else e.hide()}}var Ao=n(216),Eo=null,Co=null;function So(){Ao("#active-edit",Co).removeAttr("id"),Ao("#active-edit",Co).removeAttr("sapling-edit-id"),Ao("#active-edit",Co).removeAttr("sapling-container-id"),Ao(d.CONTROL_ELEMENT).remove(),Hs()}function _o(t,e,n){mo(t,e,n)}function Oo(t,e,n){!function(t,e,n){Xs(t)&&(Ct(e.editHash,"reject",t,n),Gi(t,e.editId),Ts(t,e.editId),So(),Hs(),bs(t))}(t,e,n)}function ko(t){!function(t){var e=hs[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.hideEdits()}(t),So()}function To(){window.open("".concat(d.WEBSITE_URL,"/plans#trial_pro_edit_click"))}function Fo(){window.open("".concat("https://sapling.ai","/user/sign-in#edit_click"))}function jo(t,e){if(e.description){Ao("#description-text",Co).html(e.description);var n=Math.min(e.description.length,35)/35*220;Ao("#description-text",Co).css("min-width",n),Ao("#description-row",Co).css("display","flex")}}function Io(t,e){e.category&&("SDK"===d.MODE&&Sapling.autoShowAdvancedEdits||Ao("#snooze-row",Co).show(),Ao("#type-text",Co).html(e.category.replace(/_/g," ")),Ao(".icon-sapling-type",Co).addClass(e.category),"voice"!==e.category&&"hard_to_read"!==e.category&&"profanity"!==e.category||(Ao("#text-row",Co).hide(),Ao("#accept-row",Co).hide()))}function No(t,e,n){Ao("#accept-button",Co).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Ao("#ignore-button",Co).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Ao("#snooze-button",Co).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Ao("#dictionary-button",Co).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Ao("#premium-button",Co).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Ao("#ignore-button",Co).click(function(){return Oo(t,e,n)}),Ao("#premium-button",Co).click(To),Ao("#snooze-button",Co).click(function(){return ko(t)}),Ao("#dictionary-button",Co).click(function(){return function(t,e){bo(t,e.editId)}(t,e)}),Ao("#ignore-button",Co).keyup(function(r){"Enter"===r.key?(Oo(t,e,n),Ys(t).focus()):"ArrowUp"===r.key&&Ao("#accept-button",Co).focus()}),function(t,e,n){Xs(t)&&Ct(e.editHash,"hover",t,n)}(t,e,n)}function Bo(){(function(){if(gs&&gs.containerId in hs){var t=hs[gs.containerId].edits;if(!(gs.editId in t))return!0;var e=t[gs.editId].editRange;if(!Q(e.startContainer)||!Q(e.endContainer))return!0}return!1})()&&So()}function Po(){clearTimeout(Eo),Eo=null}function Ro(t,e,n,r){var i,o,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Po(),Ao("#active-edit",Co).removeAttr("id"),function(){if(!Ao(d.CONTROL_ELEMENT).length){var t=document.createElement(d.CONTROL_ELEMENT);Ao(t).css({zIndex:"2147483647",font:'12pt "Helvetica Neue", Helvetica, Arial, sans-serif',position:"absolute",textAlign:"center"}),Ao("html").append(t),t.attachShadow({mode:"open"}),Co=t.shadowRoot,Ao(d.CONTROL_ELEMENT).hide();var e="Ignore",n="Accept",r='<style type="text/css">\n\n#sapling-edit-controls {\n border-radius: 6px;\n}\n\n.edit-controls-row {\n overflow: hidden;\n}\n\n#accept-text, #ignore-text, #snooze-text, #dictionary-text{\n line-height: 2em;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n width: 36px;\n}\n\n#accept-button, #ignore-button, #explanations, #snooze-button, #dictionary-button\n{\n background-color: #fff;\n align-items: center;\n justify-content: left;\n width: 100%;\n}\n\n#accept-text, #snooze-text, .icon-sapling-accept {\n color: #6C3082;\n}\n\n#ignore-row,\n#description-row,\n#snooze-row,\n#dictionary-row {\n border-top: 0.5px solid #ECECEC;\n}\n\n#accept-button:hover,\n#ignore-button:hover,\n#explanations:hover,\n#dictionary-button:hover,\n#snooze-button:hover {\n background-color: #ECECEC;\n}\n\n#accept-button:focus,\n#ignore-button:focus,\n#explanations:focus,\n#dictionary-button:focus,\n#snooze-button:focus {\n outline: none;\n background-color: #ECECEC;\n}\n#accept-button:active,\n#ignore-button:active,\n#explanations:active,\n#dictionary-button:active,\n#snooze-button:active {\n background-color: #DDD;\n}\n\n.icon-sapling-description {\n padding: 0px 8px 0px 4px;\n display: flex;\n align-items: center;\n}\n\n.icon-sapling-description:before {\n font-family: \'icomoon\' !important;\n color: #ffc107;\n content: "\\f071";\n}\n#description-row {\n padding: 8px;\n}\n#description-text {\n margin-left: 2px;\n}\n </style>',i="";"SDK"===d.MODE&&(e=Sapling.appearance.variables.ignoreText,n=Sapling.appearance.variables.acceptText,Sapling.appearance.compact||(r='<style type="text/css">\n\n#sapling-edit-controls #type-row,\n#sapling-edit-controls #text-row,\n#sapling-edit-controls #description-row {\n display: flex;\n}\n\n#sapling-edit-controls {\n position: relative;\n padding: 15px 20px;\n border-radius: 10px;\n min-width: 210px;\n box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);\n}\n\n#accept-row,\n#ignore-row {\n border: none;\n position: absolute;\n bottom: 15px;\n user-select: none;\n}\n\n#accept-row {\n left: 20px;\n}\n\n#ignore-row {\n right: 20px;\n}\n\n.icon-sapling-accept,\n.icon-sapling-reject {\n width: 24px;\n}\n\n.icon-sapling-accept,\n#accept-text {\n color: white;\n}\n\n#accept-text,\n#ignore-text {\n padding: 0px;\n padding-right: 8px;\n padding-left: 4px;\n}\n\n#accept-button,\n#ignore-button {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 33px;\n padding: 7px 5px;\n border-radius: 10px;\n transition: all .15s ease;\n}\n\n#accept-button {\n border: none;\n background-color: #6C3082;\n}\n\n#accept-button:hover,\n#ignore-button:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n max-height: none;\n}\n\n#accept-button:active,\n#ignore-button:active {\n transform: translateY(0px);\n}\n\n#ignore-button {\n border: 1px solid #A9A9A9;\n background-color: transparent;\n color: #657786;\n}\n\n#description-text {\n font-size: 0.9em;\n line-height: 1.5em;\n color: #666;\n margin-bottom: 50px;\n}\n\n#text-row.gated-text-row {\n color: #6C3082;\n cursor: pointer;\n margin-bottom: 45px;\n margin-left: 5px;\n}\n\n </style>'),Sapling.appearance.customCSS&&(i=Sapling.appearance.customCSS)),Ao(Co).html("\n ".concat('<style type="text/css">\n#sapling-edit-controls {\n z-index: 2147483647 !important;\n background-color: #fff;\n color: #333;\n border: 0.5px solid #ECECEC;\n overflow: hidden;\n}\n.edit-controls-row {\n max-width: 500px;\n display: flex;\n}\n#explanations {\n font-size: 14px;\n color: #8f8f8f;\n padding: 7px 12px 0px 12px;\n}\n#accept-button, #ignore-button {\n line-height: 1.1em;\n}\n#accept-button,\n#ignore-button,\n#explanations,\n#dictionary-button,\n#snooze-button {\n cursor: pointer;\n}\n\n#premium-button {\n cursor: pointer;\n background-color: #ffc107;\n}\n#premium-button:hover {\n background-color: #ffb006;\n}\n#accept-button {\n float: left;\n}\n\n.sapling-right-arrow {\n color:red;\n}\n\n.icon-sapling-right-arrow {\n background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="sapling-right-arrow"><polygon points="8.59,16.59 13.17,12 8.59,7.41 10,6 16,12 10,18 8.59,16.59" fill="%23A9A9A9"/><polygon points="3,13 13,13 13,11 3,11" fill="%23A9A9A9"/></svg>\');\n background-size: 24px 24px;\n background-position: center;\n background-repeat: no-repeat;\n width: 24px;\n height: 24px;\n margin-left: 5px;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n#snooze-text {\n font-size: 14px;\n}\n#accept-button,\n#ignore-button,\n#premium-button,\n#dictionary-button,\n#snooze-button {\n display: flex;\n}\n#ignore-text,\n#snooze-text,\n#dictionary-text,\n.icon-sapling-reject {\n color: #A9A9A9;\n}\n\n#accept-text,\n#ignore-text,\n#dictionary-text,\n#snooze-text {\n display: table-cell;\n text-align: left;\n white-space: nowrap;\n padding-right: 8px;\n}\n#description-row {\n display: flex;\n font-size: 12px;\n color: #8f8f8f;\n}\n\n#description-text {\n flex-grow: 1;\n width: min-content;\n text-align: left;\n}\n#premium-text {\n padding: 4px 8px 4px 8px;\n line-height: 1.2em;\n font-size: 90%;\n color: #fff;\n}\n\n.advanced-edit {\n color: #d4af37;\n text-decoration: none;\n}\n.register-edit {\n color: #6C3082;\n text-decoration: none;\n font-weight: 500;\n}\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^="icon-sapling-"], [class*=" icon-sapling-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#type-row,\n#text-row,\n#description-row,\n#snooze-row,\n#dictionary-row,\n#premium-banner-row\n{\n display: none;\n}\n\n.icon-sapling-accept:before {\n font-family: \'icomoon\' !important;\n content: "\\f00c";\n}\n.icon-sapling-close:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-remove:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-reject:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n\n#type-row,\n#text-row {\n margin-bottom: 10px;\n}\n\n#type-text {\n text-transform: uppercase;\n font-size: 10px;\n color: #A9A9A9;\n}\n\n#original-text-row,\n#replacement-text-row,\n#text-row {\n align-items: center;\n}\n\n#original-text-row,\n#replacement-text-row {\n max-width: 200px;\n word-wrap: break-word;\n}\n\n#text-row {\n justify-content: flex-start;\n}\n\n#description-text:empty {\n margin-bottom: 40px;\n}\n\n.icon-sapling-type {\n border-radius: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n\n.grammar,\n.spelling,\n.punctuation,\n.fluency,\n.other,\n.voice,\n.adverbs,\n.simplifications,\n.hard_to_read,\n.qualifiers,\n.profanity,\n.dei\n{\n width: 6px;\n height: 6px;\n margin: 3px;\n background-color: #6C3082;\n}\n\n </style>',"\n ").concat(r,'\n <style type="text/css">\n ').concat(i,'\n </style>\n <div id="sapling-edit-controls" role="menu">\n\n <div id="type-row">\n <div class="icon-sapling-type"></div>\n <div id="type-text"></div>\n </div>\n\n <div id="text-row">\n <div id="original-text-row">\n <div class="icon-sapling-original-text"></div>\n <div id="original-text"></div>\n </div>\n\n <div class="icon-sapling-right-arrow"></div>\n\n <div id="replacement-text-row">\n <div class="icon-sapling-replacement-text"></div>\n <div id="replacement-text"></div>\n </div>\n </div>\n\n <div id="accept-row" class="edit-controls-row">\n <div id="accept-button" tabindex="-1" role="menuitem" aria-keyshortcuts="Enter ArrowDown">\n <div class="icon-sapling-accept"></div>\n <div id="accept-text" aria-label="Accept">').concat(n,'</div>\n </div>\n </div>\n\n <div id="ignore-row" class="edit-controls-row">\n <div id="ignore-button" tabindex="-1" role="menuitem" aria-keyshortcuts="Enter ArrowUp">\n <div class="icon-sapling-reject"></div>\n <div id="ignore-text" aria-label="Reject">').concat(e,'</div>\n </div>\n </div>\n\n <div id="description-row" class="edit-controls-row">\n <div class="icon-sapling-description"></div>\n <div id="description-text"></div>\n </div>\n\n <div id="snooze-row" class="edit-controls-row">\n <div id="snooze-button" tabindex="-1">\n <div class="icon-sapling-reject"></div>\n <div id="snooze-text">Hide Advanced Edits</div>\n </div>\n </div>\n\n <div id="dictionary-row" class="edit-controls-row">\n <div id="dictionary-button" tabindex="-1">\n <div class="icon-sapling-reject"></div>\n <div id="dictionary-text">Add to Dictionary</div>\n </div>\n </div>\n\n <div id="premium-banner-row" class="edit-controls-row">\n <div id="premium-button" tabindex="-1">\n <div id="premium-text">\n Your trial ends in 1 day\n </div>\n </div>\n </div>\n\n <span id="hide-control" tabindex="-1"></span>\n </div>')),Ao("#accept-button",Co).on("blur",function(){}),Ao("#ignore-button",Co).on("blur",function(){}),Ao("#sapling-edit-controls",Co).on("keydown",function(t){if("Escape"===t.key){var e=Ys(Ao(d.CONTROL_ELEMENT).attr("sapling-container-id")),n=z(e);n&&(e=au(n)),So(),e.focus()}}),Ao("#hide-control",Co).focus(function(t){t.preventDefault(),t.stopPropagation();var e=Ys(Ao(d.CONTROL_ELEMENT).attr("sapling-container-id")),n=z(e);n&&(e=au(n)),So(),e.focus()})}}(),Ao("#accept-button",Co).off("click mousedown keyup"),Ao("#ignore-button",Co).off("click mousedown keyup"),Ao("#snooze-button",Co).off("click mousedown keyup"),Ao("#dictionary-button",Co).off("click mousedown keyup"),Ao("#premium-button",Co).off("click mousedown keyup"),Ao("#type-text",Co).html(""),Ao("#description-text",Co).html(""),Ao("#snooze-row",Co).hide(),Ao("#dictionary-row",Co).hide(),Ao("#accept-row",Co).show(),Ao("#ignore-row",Co).show(),Ao("#text-row",Co).hide(),Ao("#description-row",Co).hide(),Ao(".icon-sapling-type",Co).attr("class","icon-sapling-type"),"SDK"!==d.MODE||Sapling.appearance.compact||(Ao("#text-row",Co).css("display","flex"),Ao("#description-row",Co).show()),"SDK"===d.MODE?function(t,e){var n=e.replacementText,r=e.originalText;""===e.replacementText?n="<del> ".concat(e.originalText," </del>"):r="<del> ".concat(e.originalText," </del>");var i=Ao("#accept-button",Co),o={is_premium:e.premium,is_enabled:!0};i.click(function(){return _o(t,e,o)}),i.keyup(function(n){"Enter"===n.key?_o(t,e,o):"ArrowDown"===n.key&&Ao("#ignore-button",Co).focus()}),Ao("#type-text",Co).html(e.generalErrorType),Ao("#original-text",Co).html(r),Ao("#replacement-text",Co).html(n),Ao("#description-text",Co).html(e.description);var a=e.generalErrorType;a&&(a=a.split(" ")[0].split("/")[0].toLowerCase()),Ao(".icon-sapling-type",Co).addClass(a);var s=null;e.premium&&null==e.replacementText&&(se()?(n="[Sign in to see premium edit]",i.off("click").click(Fo),s=Fo,i.off("keyup"),o.is_enabled=!1):ue()?ce()||(n="[Pro Edit: Only in Sapling Pro]",i.off("click").click(To),s=To,i.off("keyup"),o.is_enabled=!1):(n="[Confirm email to see premium edit]",i.off("click").click(Fo),s=Fo,i.off("keyup"),o.is_enabled=!1)),Sapling.appearance.compact?Ao("#accept-text",Co).html(n):(s&&(Ao("#text-row",Co).addClass("gated-text-row").html(n),Ao("#text-row",Co).click(s),Ao("#description-text",Co).hide()),Ao("#accept-text",Co).html(Sapling.appearance.variables.acceptText)),Io(0,e),jo(0,e),Sapling.addToDictionary&&"Grammar"!==e.generalErrorType&&e.dictionary&&Ao("#dictionary-row",Co).show(),No(t,e,o)}(t,e):function(t,e){var n=e.replacementText;""===e.replacementText&&(n="<del> ".concat(e.originalText," </del>"));var r=Ao("#accept-button",Co),i={is_premium:e.premium,is_enabled:!0};r.keyup(function(n){"Enter"===n.key?_o(t,e,i):"ArrowDown"===n.key&&Ao("#ignore-button",Co).focus()}),r.click(function(){return _o(t,e,i)}),y()===d.WEBSITE_HOSTNAME||(se()&&(e.requireLogin||e.premium)?(n="[Sign in to see premium edit]",r.off("click").click(Fo),r.off("keyup"),i.is_enabled=!1):e.premium&&(ue()?ce()||(n="[Pro Edit: Only in Sapling Pro]",r.off("click").click(To),r.off("keyup"),i.is_enabled=!1):(n="[Confirm email to see premium edit]",r.off("click").click(Fo),r.off("keyup"),i.is_enabled=!1))),Ao("#accept-text",Co).html(n),Io(0,e),jo(0,e),No(t,e,i)}(t,e),i=e.premium,null!==(o=ve())&&i&&o<4?(1===o?Ao("#premium-text",Co).html("Your trial ends in 1 day"):o<4&&Ao("#premium-text",Co).html("Your trial ends in ".concat(o," days")),Ao("#premium-banner-row",Co).show()):Ao("#premium-banner-row",Co).hide(),Ao(d.CONTROL_ELEMENT).attr("sapling-edit-id",e.editId),Ao(d.CONTROL_ELEMENT).attr("sapling-container-id",t);var s=n[0];if(Ao(s).attr("id","active-edit"),s){var u=s.getBoundingClientRect(),c=u.left-18;c=Math.min(c,window.innerWidth+window.scrollX-Ao(d.CONTROL_ELEMENT).width()-16),c=Math.max(c,8);for(var l=u.top+Ao(s).height(),f=1;f<n.length;f++){var p=n[f],h=p.getBoundingClientRect().top+Ao(p).height();h>l&&(l=h)}var g=l+window.scrollY;if(g+Ao(d.CONTROL_ELEMENT).height()>window.innerHeight+window.scrollY){var v=u.top-Ao(d.CONTROL_ELEMENT).height()+window.scrollY;v>=0&&(g=v)}if("SDK"===d.MODE){var m=Rn(s);c+=m.x,g+=m.y}var b=function(t){var e,n=T(t),r={height:(e=n).clientHeight,width:e.clientWidth},i=A(n).offset();return{top:i.top,bottom:i.top+r.height,left:i.left,right:i.left+r.width}}(T(r));Ao(d.CONTROL_ELEMENT).data("bounds",b),Ao(d.CONTROL_ELEMENT).data("defaultHeight",Ao(d.CONTROL_ELEMENT).outerHeight()),Ao(d.CONTROL_ELEMENT).data("defaultOrigin",{left:c,top:g}),Ao(d.CONTROL_ELEMENT).css({left:c,top:g}),Ao(d.CONTROL_ELEMENT).fadeIn(200),a&&Ao("#accept-button",Co).focus()}}function Lo(){Eo||(Eo=setTimeout(So,300))}function Mo(t){return t.match(/^[0-9a-z]+$/)}function Ho(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=S(t.toString()),i=S(e.startText),o=S(e.endText),a=r.substring(0,i.length),s=r.substring(r.length-o.length);if(a!==i||s!==o)return n&&"Incorrect inner text |".concat(a,"|!=|").concat(i,"||").concat(s,"|!=|").concat(o,"|"),!1;if(function(t,e){return!(void 0===t||t.length<=e||0===e)&&Mo(S(t.substr(e,1)))&&Mo(S(t.substr(e-1,1)))}(t.endContainer.data,t.endOffset)){var u=Ne();return u&&(u=u.toLowerCase()),"jp"===u||"zh"===u||"ko"===u||"ar"===u}return!0}var Uo={voice:{"background-image":"linear-gradient(to right, rgba(22, 112, 49, 0.8), rgb(22, 112, 49, 0.8))","background-color":"rgba(22, 112, 49, 0.2)"},adverbs:{"background-image":"linear-gradient(to right, rgba(0, 170, 193, 0.8), rgba(0, 170, 193, 0.8))","background-color":"rgba(0, 170, 193, 0.2)"},simplifications:{"background-image":"linear-gradient(to right, rgba(51, 146, 255, 0.8),rgba(51, 146, 255, 0.8))","background-color":"rgba(51, 146, 255, 0.2)"},qualifiers:{"background-image":"linear-gradient(to right, rgba(35, 62, 143, 0.8),rgba(35, 62, 143, 0.8))","background-color":"rgba(35, 62, 143, 0.2)"},dei:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},profanity:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},hard_to_read:{"background-image":"linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2))","background-image2":"linear-gradient(to right, rgba(255, 255, 50, 0.4), rgba(255, 255, 50, 0.4))","background-color":"rgba(255, 100, 100, 0.2)","background-color2":"rgba(255, 255, 200, 0.2)"}};function zo(){return'<style type="text/css">\n .sapling-edit {\n position: absolute;\n box-sizing: content-box;\n display: inline;\n min-width: 0.5em;\n opacity: 0.85;\n background-position: 0px calc(100% + 1px);\n background-repeat: no-repeat;\n background-size: calc(100% + 1px) 2px;\n border-bottom: 2px solid transparent;\n background-image: linear-gradient(to right, #ff0000, #ff0000);\n }\n\n .sapling-edit:hover {\n background-color: #ffb2b2;\n background-image: linear-gradient(to right, #ffb2b2, #ffb2b2);\n -webkit-transition: background-color 200ms linear;\n -ms-transition: background-color 200ms linear;\n transition: background-color 200ms linear;\n }\n</style>'}var qo=n(216);function Wo(t){return Wo="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},Wo(t)}function Go(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$o(r.key),r)}}function $o(t){var e=function(t,e){if("object"!=Wo(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Wo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Wo(e)?e:e+""}var Yo=function(){return t=function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.draggableJq=e,this.dragJq=n||e,this.ignoreJqSelector=r,this.ignoreScroll=i,this.dragMove=this.dragMove.bind(this),this.dragMouseUp=this.dragMouseUp.bind(this),this.dragMouseDown=this.dragMouseDown.bind(this),this.posX=0,this.posY=0,this.dragJq.on("mousedown",this.dragMouseDown),window.addEventListener("mouseup",this.dragMouseUp,!1)},e=[{key:"dragMove",value:function(t){var e=t.clientY+this.posY,n=t.clientX+this.posX;this.ignoreScroll||(e+=window.scrollY,n+=window.scrollX),this.draggableJq.css({top:e,left:n,bottom:"",right:""})}},{key:"dragMouseUp",value:function(){window.removeEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grab"})}},{key:"dragMouseDown",value:function(t){if(!this.ignoreJqSelector||!qo(t.target).is(this.ignoreJqSelector)){t.preventDefault();var e=this.draggableJq[0].getBoundingClientRect();this.posX=e.left-t.clientX,this.posY=e.top-t.clientY,window.addEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grabbing"})}}}],e&&Go(t.prototype,e),n&&Go(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Xo=n(216);function Vo(t){return Vo="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},Vo(t)}function Ko(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Jo(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jo(t,e){if(t){if("string"==typeof t)return Qo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qo(t,e):void 0}}function Qo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Zo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ta(r.key),r)}}function ta(t){var e=function(t,e){if("object"!=Vo(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Vo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vo(e)?e:e+""}var ea=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.annotationsOverlay=n,this.summaryWrapper=null,this.summaryList=null,this.annotationsSpinner=null,this.annotationsError=null,this.shadowRoot=null,this.summaryAnnotationsContainer=null,this.summaryDragger=null,this.annotationsCache=[],this.statisticsCache={}},e=[{key:"handleDismiss",value:function(t){1===t.which&&this.annotationsOverlay.hideSummaryAnnotations()}},{key:"maybeEmbedSaplingSummaryAnnotations",value:function(){var t,e=Xo("sapling-summary-annotations");if(e.length&&(this.summaryAnnotationsContainer||(this.summaryAnnotationsContainer=e.first(),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot)),!this.summaryAnnotationsContainer){this.summaryAnnotationsContainer=Xo("<sapling-summary-annotations>\n </sapling-summary-annotations>");var n="\n ".concat((t="","SDK"===d.MODE&&Sapling.appearance.customCSS&&(t='<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>")),"".concat(t,'<style type="text/css">\n\n/* Structures */\n\n.summary-annotations-wrapper {\n width: 400px;\n min-height: 80px;\n opacity: 0.9;\n background-color: #fff;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n}\n\n.annotations-dismiss {\n cursor: pointer;\n margin-left: auto;\n position: absolute;\n right: 0px;\n top: -1px;\n width: 1.5em;\n height: 1.5em;\n line-height: 1.5em;\n text-align: center;\n user-select: none;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n color: rgba(110, 115, 128, 0.95);\n transition: all .15s ease;\n}\n\n.summary-annotations {\n display: block;\n padding: 0.5em;\n padding-bottom: 0;\n}\n.sapling-summary-annotation {\n background-color: #eef;\n padding: 5px;\n border-radius: 5px;\n margin-bottom: 0.5em;\n}\n.sapling-annotation-count {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n background-color: #6200ea;\n color: #fff;\n font-weight: bold;\n}\n\n\n/* begin toggle css */\n\n.sapling-annotation-toggle.switch {\n position: relative;\n display: inline-block;\n width: 28px;\n height: 18px;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle.switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.sapling-annotation-toggle .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #ccc;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle .slider:before {\n position: absolute;\n content: "";\n height: 10px;\n width: 10px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle input:checked + .slider {\n background-color: #6200ea;\n}\n\n.sapling-annotation-toggle input:focus + .slider {\n box-shadow: 0 0 1px #2196F3;\n}\n\n.sapling-annotation-toggle input:checked + .slider:before {\n -webkit-transform: translateX(10px);\n -ms-transform: translateX(10px);\n transform: translateX(10px);\n}\n\n/* end toggle css */\n\n.sapling-annotation-toggle-row {\n width: 200px;\n margin-bottom: 10px;\n padding-left: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sapling-annotation-explanation .toggle-text {\n left-margin: 5px;\n cursor: pointer;\n padding-left: 4px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-right: 8px;\n}\n\n.sapling-annotation-type {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n align-items:center;\n color: #fff;\n font-weight:bold;\n}\n.sapling-annotation-explanation {\n display: inline;\n padding: 5px;\n line-height: 1.5em;\n}\n.sapling-annotations-error {\n padding: 0.2em 0.4em;\n background-color: #ffebee;\n text-align: right;\n color: #d32f2f;\n}\n\n\n/* Spinner */\n\n.sapling-annotations-spinner {\n position: absolute;\n right: 5px;\n bottom: 5px;\n display: inline-block;\n}\n.sapling-annotations-spinner img {\n display: block;\n height: 12px;\n width: 12px;\n\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n}\n@keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n}\n\n/* Statistics */\n\ndiv.dl-cols {\n display: grid;\n padding: 1em 1em 0.5em 1em;\n grid-template-columns: max-content auto;\n}\ndl {\n display: grid;\n grid-template-columns: max-content auto;\n margin: 0;\n line-height: 1.5;\n}\ndt {\n font-weight: bold;\n grid-column-start: 1;\n}\ndd {\n grid-column-start: 2;\n}\ndl + dl {\n margin-left: 4em;\n}\n</style>')),'\n <div class="summary-annotations-wrapper">\n <span class="annotations-dismiss">\xd7</span>\n <div class="dl-cols summary-annotations-statistics">\n <dl>\n <dt>Characters</dt>\n <dd class="summary-chars">-</dd>\n <dt >Words</dt>\n <dd class="summary-words">-</dd>\n <dt>Sentences</dt>\n <dd class="summary-sentences">-</dd>\n </dl>\n <dl>\n <dt>Readability (Grade)</dt>\n <dd class="summary-readability">-</dd>\n <dt>Reading Time (min)</dt>\n <dd class="summary-reading_time_min">- min</dd>\n <dt>&nbsp;</dt>\n <dd>&nbsp;</dd>\n </dl>\n </div>\n <div class="summary-annotations">\n </div>\n <div class="sapling-annotations-error"></div>\n <div class="sapling-annotations-spinner" style=""><img src="').concat(_f("assets/fa-spinner-solid.svg"),'" /></div>\n </div>');this.summaryAnnotationsContainer[0].attachShadow({mode:"open"}),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot,Xo(this.shadowRoot).html(n),Xo("html").append(this.summaryAnnotationsContainer)}this.summaryWrapper=Xo(this.shadowRoot).find(".summary-annotations-wrapper").first(),this.summaryList=Xo(this.shadowRoot).find(".summary-annotations").first(),this.annotationsSpinner=Xo(this.shadowRoot).find(".sapling-annotations-spinner").first(),this.annotationsError=Xo(this.summaryWrapper).find(".sapling-annotations-error").first(),Xo(this.summaryWrapper).find(".annotations-dismiss").on("mousedown",this.handleDismiss.bind(this)),this.annotationsError.hide(),this.summaryDragger=new Yo(this.summaryWrapper,this.summaryWrapper,null,!1)}},{key:"summaryVisible",value:function(){return this.summaryAnnotationsContainer.attr("container-id")===this.containerId}},{key:"showSummary",value:function(t){this.summaryAnnotationsContainer&&(this.updateAnnotationsDOM(),this.summaryAnnotationsContainer.attr("container-id",this.containerId),this.updateToggle(t),this.summaryAnnotationsContainer.show())}},{key:"hideSummary",value:function(){this.summaryAnnotationsContainer&&(this.summaryAnnotationsContainer.hide(),this.summaryAnnotationsContainer.attr("container-id",""))}},{key:"buildSummaryElement",value:function(t,e,n){var r=Uo[t]["background-color"].replace("0.2)","1.0)"),i=t.replaceAll(" ","-"),o=t.replaceAll("_"," ");return"dei"===o&&(o="DEI"),Xo('\n <div class="sapling-summary-annotation">\n <span class="sapling-annotation-count">'.concat(e,'</span>\n <span class="sapling-annotation-type ').concat(i,'" style="background-color: ').concat(r,';">').concat(o,'</span>\n <span class="sapling-annotation-explanation">\n ').concat(n,"\n </span>\n </div>\n "))}},{key:"setSummaryAnnotations",value:function(t){this.annotationsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"setStatistics",value:function(t){this.statisticsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"updateAnnotationsDOM",value:function(){if(this.summaryWrapper)for(var t=0,e=Object.entries(this.statisticsCache);t<e.length;t++){var n=Ko(e[t],2),r=n[0],i=n[1];this.summaryWrapper.find(".summary-".concat(r)).text(i)}this.clear(),this.annotationsError.hide();var o,a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Jo(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.annotationsCache);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=this.buildSummaryElement(s.type,s.count,s.explanation);this.summaryList.append(u)}}catch(t){a.e(t)}finally{a.f()}"SDK"===d.MODE&&Sapling.freemium&&!Be()||(this.summaryList.append(Xo('\n <div>\n <label class="sapling-annotation-toggle-row">\n <div class="sapling-annotation-toggle switch">\n <input type="checkbox">\n <span class="slider"></span>\n </div>\n <span class="sapling-annotation-explanation">\n <span class="toggle-text">Hide Advanced Edits</span>\n </span>\n </label>\n </div>\n ')),Xo("input",this.summaryList).change(this.editsToggled.bind(this)))}},{key:"editsToggled",value:function(t){var e=t.currentTarget.checked;this.updateToggle(e),e?this.annotationsOverlay.showEdits():this.annotationsOverlay.hideEdits()}},{key:"updateToggle",value:function(t){Xo("input",this.summaryList).prop("checked",t),t?Xo(".toggle-text",this.summaryList).text("Advanced Edits Shown"):Xo(".toggle-text",this.summaryList).text("Advanced Edits Hidden")}},{key:"clear",value:function(){this.summaryList&&this.summaryList.html("")}},{key:"setErrorStatus",value:function(t){this.annotationsError.text(t),this.annotationsError.show()}},{key:"showSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.show()}},{key:"hideSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.hide()}}],e&&Zo(t.prototype,e),n&&Zo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),na=n(216);function ra(t){return ra="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},ra(t)}function ia(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return oa(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oa(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function oa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function aa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,sa(r.key),r)}}function sa(t){var e=function(t,e){if("object"!=ra(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ra(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ra(e)?e:e+""}var ua=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.shadowHost=n,this.annotationsContainer=null,this.summaryAnnotations=null,this.annotationsAlwaysVisible=!1,this.editsVisible=!0,this.annotationEditInfos={},this.lastQueryText=null},(e=[{key:"createUIElements",value:function(){if(de()){De()||(this.editsVisible=!1);var t=this.shadowHost.shadowRoot;this.annotationsContainer=na(".sapling-annotations-container",t),this.annotationsContainer.length||(this.annotationsContainer=na('\n <div class="sapling-annotations-container">\n </div>\n ')),na(t).append(this.annotationsContainer),this.summaryAnnotations||(this.summaryAnnotations=new ea(this.containerId,this),this.summaryAnnotations.maybeEmbedSaplingSummaryAnnotations()),this.hideSummaryAnnotations(),"SDK"===d.MODE&&Sapling.autoShowAdvancedEdits&&(this.annotationsAlwaysVisible=!0)}}},{key:"positionAnnotations",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=this.summaryAnnotations.summaryWrapper,n=t.left+window.scrollX+t.width-e.width()-6,r=t.bottom+window.scrollY-e.height()-25;r=Math.max(r,20),n=Math.max(n,0),e.css({position:"absolute",left:n,top:r})}},{key:"updateAnnotationSummary",value:function(){for(var t={},e=0,n=Object.values(this.annotationEditInfos);e<n.length;e++){var r=n[e],i=r.edit.category;if(i){var o=r.edit.description;t[i]||(t[i]={type:i,count:0,explanation:o}),t[i].count++}}this.summaryAnnotations.setSummaryAnnotations(Object.values(t)),this.positionAnnotations(),this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"updateAnnotationForOverlay",value:function(t,e){this.annotationEditInfos[t]=e;var n,r=ia(e.domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.annotationsAlwaysVisible||this.editsVisible?na(i).show():na(i).hide()}}catch(t){r.e(t)}finally{r.f()}}},{key:"clearAnnotationForOverlay",value:function(t){delete this.annotationEditInfos[t]}},{key:"queryAndUpdate",value:function(){var t=this;if(de()){this.summaryAnnotations.showSpinner();var e=na(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id]").first()[0];if(void 0!==e&&e){var n=e.innerHTML.trim();if(n&&this.lastQueryText!==n){this.lastQueryText=n;var r=na(this.shadowHost).prev().attr("sapling-id");r||(r=na(this.shadowHost).prev().attr("sapling-textarea-id")),function(t,e,n,r,i){gt("request/GET_STATISTICS",{html:D()(t,5e4),sessionId:n,context:wt()},r,i)}(n,0,r,function(e){t.summaryAnnotations.setStatistics(e.statistics)},function(e){e&&t.setErrorStatus(e.toString())}),this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}}},{key:"toggleSummaryAnnotations",value:function(){this.summaryAnnotations.summaryVisible()?this.hideSummaryAnnotations():this.showSummaryAnnotations()}},{key:"showEdits",value:function(){this.editsVisible=!0;for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=ia(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;na(i).show()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"hideEdits",value:function(){if(this.editsVisible=!1,!this.annotationsAlwaysVisible){for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=ia(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;na(i).hide()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}}},{key:"showSummaryAnnotations",value:function(){this.summaryAnnotations.showSummary(this.editsVisible),this.positionAnnotations()}},{key:"hideSummaryAnnotations",value:function(){this.summaryAnnotations.hideSummary()}},{key:"removeUIElements",value:function(){this.shadowHost&&this.shadowHost.remove(),this.annotationEditInfos={}}}])&&aa(t.prototype,e),n&&aa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),ca=n(216);function la(t){return la="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},la(t)}function fa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,da(r.key),r)}}function pa(t,e,n){return(e=da(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function da(t){var e=function(t,e){if("object"!=la(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=la(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==la(e)?e:e+""}var ha="\n .sapling-utility-overlay {\n background-color: rgba(255, 255, 255, 0.9);\n border-radius: 20px;\n display: none;\n position: absolute;\n z-index: 999;\n box-shadow: 0 1px 2px 0 rgb(65 69 73 / 30%), 0 3px 6px 2px rgb(65 69 73 / 15%);\n border-radius: 8px;\n font: 9pt helvetica, arial;\n flex-direction: column;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-empty-message {\n display: block;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-data {\n display: none;\n }\n\n .sapling-utility-empty-message {\n display: none;\n padding: 10px;\n }\n\n .sapling-utility-overlay.visible {\n display: flex;\n }\n\n .sapling-utility-sentence-overlays {\n display: none;\n z-index: 999;\n }\n\n .sapling-utility-sentence-overlays.visible {\n display: inherit;\n }\n\n .sapling-utility-sentence-overlays.sapling-loading {\n opacity: 0.5;\n transition: all 0.25s;\n }\n\n .sapling-utility-header-button {\n position: absolute;\n top: 10px;\n cursor: pointer;\n width: 12px;\n }\n\n .sapling-utility-overlay-cancel {\n right: 10px;\n }\n\n .sapling-utility-overlay-drag {\n right: 30px;\n }\n\n .sapling-utility-overlay-spinner {\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-utility-overlay-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 3s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .utility-overlay-header {\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 14px;\n padding: 8px;\n border-bottom: 1px solid #ccc;\n display: flex;\n align-items: center;\n cursor: grab;\n }\n\n .sapling-utility-data {\n padding: 8px;\n padding-top: 4px;\n }\n\n .sapling-utility-data-row {\n padding: 4px;\n padding-left: 0;\n display: flex;\n width: 100%;\n justify-content: space-between;\n }\n\n .sapling-utility-data-row span {\n margin-right: 4px;\n }\n\n .sapling-utility-beta {\n background-color: rgba(92, 107, 192, 0.5);\n color: #fff;\n padding: 2px;\n border-radius: 2px;\n text-transform: uppercase;\n font-size: 9px;\n margin-left: 8px;\n }\n",ga=function(){return t=function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=n,this.shadowHost=e,this.badge=r,this.queryAndUpdate=_.debounce(function(){return i._queryAndUpdate()},100),this.inDOM=document.documentElement.contains(this.shadowHost),this.overlayDragger=null,this.queryEl=null,this.hudEl=null,this.assetUrls={"xmark-solid":_f("assets/xmark-solid.svg"),"spinner-solid":_f("assets/spinner-solid.svg"),"thumbs-up-regular":_f("assets/thumbs-up-regular.svg"),"thumbs-down-regular":_f("assets/thumbs-down-regular.svg")};var o=this.utilityName().toLowerCase().replace(/\s+/g,"-");if(ca("sapling-".concat(o,"-overlays-container")).length){var a=ca("sapling-".concat(o,"-overlays-container")).first();this.utilityContainerShadowRoot=ca(a[0].shadowRoot)}else{var s=document.createElement("sapling-".concat(o,"-overlays-container"));ca("html").append(ca(s)),s.attachShadow({mode:"open"}),this.utilityContainerShadowRoot=ca(s.shadowRoot),ca(this.utilityContainerShadowRoot).append("\n <style>".concat(ha).concat(this.utilityCSS(),"</style>\n "))}this._setupStyleMutationObserver(),this._setupContainerRemovedObserver()},(e=[{key:"utilityName",value:function(){throw new Error("Method not implemented.")}},{key:"renderUtilityData",value:function(){throw new Error("Method not implemented")}},{key:"utilityCSS",value:function(){return""}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){throw new Error("Method not implemented")}},{key:"getUtilityData",value:function(t,e,n,r,i){throw new Error("Method not implemented")}},{key:"updateHud",value:function(t){var e=this,n=t.hudEmoji,r=t.hudWarning,i=t.hudTitle;if(null!=n||null!=r?(null==this.hudEl&&(this.hudEl=document.createElement("div"),ca(this.hudEl).addClass("sapling-tone-hud"),ca(this.hudEl).attr("style","opacity: 0")),i?ca(this.hudEl).attr("title",i):ca(this.hudEl).attr("title",""),ca(this.hudEl).html(""),ca(this.hudEl).append(n),ca(this.hudEl).append(r)):this.hudEl=null,ca(this.badge.headsUpContainer).html(this.hudEl),this.hudEl){ca(this.hudEl).on("click",function(){e.toggleVisibility()});var o=this.hudEl.getBoundingClientRect(),a=o.height,s=o.width,u=this.badge.badge[0].getBoundingClientRect().width;ca(this.badge.headsUpContainer).css({left:"".concat(-12-Math.max(u,8)-s,"px"),top:"".concat(-.9*a,"px")}),ca(this.hudEl).attr("style","opacity: 1")}}},{key:"_setupStyleMutationObserver",value:function(){var t=this;new MutationObserver(function(e){t.renderUtilityData()}).observe(this.shadowHost,{attributes:!0,attributeOldValue:!0,attributeFilter:["style"],childList:!0,subtree:!0})}},{key:"_setupContainerRemovedObserver",value:function(){var t=this;ca(this.shadowHost).parent(),setInterval(function(){t.inDOM&&!document.documentElement.contains(t.shadowHost)&&t.toggleVisibility()},50)}},{key:"createUIElements",value:function(){var t=this;this.utilityOverlay||(this.utilityOverlay=document.createElement("div"),ca(this.utilityOverlay).addClass("sapling-utility-overlay"),ca(this.utilityOverlay).addClass("sapling-utility-empty"),ca(this.utilityOverlay).attr("id","utility-overlay-".concat(this.containerId)),this.cancelButton=document.createElement("div"),ca(this.cancelButton).html('<img src="'.concat(this.assetUrls["xmark-solid"],'" />')),ca(this.cancelButton).addClass("sapling-utility-overlay-cancel"),ca(this.cancelButton).addClass("sapling-utility-header-button"),ca(this.cancelButton).on("click",function(){t.toggleVisibility()}),this.loadingIndicator=document.createElement("div"),ca(this.loadingIndicator).html('<img src="'.concat(this.assetUrls["spinner-solid"],'" />')),ca(this.loadingIndicator).addClass("sapling-utility-header-button"),ca(this.loadingIndicator).addClass("sapling-utility-overlay-spinner"),this.overlayHeader=document.createElement("div"),ca(this.overlayHeader).addClass("utility-overlay-header"),ca(this.overlayHeader).html("\n ".concat(this.utilityName(),"\n ").concat(this.isBeta()?'<span class="sapling-utility-beta">beta</span>':"","\n ")),this.overlayDragger=new Yo(ca(this.utilityOverlay),ca(this.overlayHeader),null),ca(this.utilityOverlay).append(this.overlayHeader),ca(this.utilityOverlay).append(this.loadingIndicator),ca(this.utilityOverlay).append(this.cancelButton),ca(this.utilityOverlay).append('<div class="sapling-utility-data"></div>'),ca(this.utilityOverlay).append('<div class="sapling-utility-empty-message">Waiting for text...</div>'),ca(this.utilityContainerShadowRoot).append(this.utilityOverlay),this.sentenceOverlays=document.createElement("div"),ca(this.sentenceOverlays).addClass("sapling-utility-sentence-overlays"),ca(this.sentenceOverlays).attr("id","utility-sentence-overlay-".concat(this.containerId)),ca(this.shadowHost.shadowRoot).append("<style>".concat(ha).concat(this.utilityCSS(),"</style>")),ca(this.shadowHost.shadowRoot).append(this.sentenceOverlays))}},{key:"updateOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=t.bottom,n=t.right,r=e-2*this.constructor.HEIGHT-this.constructor.PADDING+window.scrollY,i=n-this.constructor.WIDTH-this.constructor.PADDING+window.scrollX,o=Math.max(W(this.shadowHost.parentNode),9999);ca(this.utilityOverlay).css({zIndex:o});var a=getComputedStyle(this.shadowHost).fontSize;ca(this.sentenceOverlays).css({zIndex:o,fontSize:a}),ca(this.utilityOverlay).css({top:r,left:i,width:this.constructor.WIDTH,minHeight:this.constructor.HEIGHT}),this.updateSentenceOverlayPosition()}},{key:"updateSentenceOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect();ca(this.sentenceOverlays).css({position:"absolute",top:0,left:0,width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),pointerEvents:"none"})}},{key:"toggleVisibility",value:function(){if(this.updateOverlayPosition(),ca(this.utilityOverlay).toggleClass("visible"),ca(this.sentenceOverlays).toggleClass("visible"),this.inDOM=ca(this.utilityOverlay).is(".visible"),ca(this.utilityOverlay).is(".visible")){var t=this.utilityName().toLowerCase().replace(/\s+/g,"_");Et("".concat(t,"_overlay_visible"))}}},{key:"initForCheckOnce",value:function(){this.showOverlay(),this.hideOnTextChange()}},{key:"showOverlay",value:function(){this.updateOverlayPosition(),ca(this.utilityOverlay).addClass("visible"),ca(this.sentenceOverlays).addClass("visible"),this.inDOM=!0}},{key:"hideOnTextChange",value:function(){var t=this;this.textChangeCheckInterval=setInterval(function(){t._getQueryText()!==t.lastQueryText&&(ca(t.sentenceOverlays).html(""),clearInterval(t.textChangeCheckInterval))},500)}},{key:"getTextNodes",value:function(t,e){var n=this;t.nodeType!==Node.TEXT_NODE?t.childNodes.forEach(function(t){return n.getTextNodes(t,e)}):e.push({node:t,text:t.data})}},{key:"_getQueryText",value:function(){if(this.queryEl=ca(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id],[contenteditable]").first()[0],void 0===this.queryEl||!this.queryEl)return null;var t=this.queryEl.innerHTML;return this.queryEl.innerText.trim()?t:(this.resetUIElements(),null)}},{key:"_queryAndUpdate",value:function(){var t=this,e=this._getQueryText();null!=e&&(this.lastQueryText!=e?this.isUtilityEnabled()&&(this.lastQueryText=e,ca(this.loadingIndicator).addClass("sapling-loading"),ca(this.sentenceOverlays).addClass("sapling-loading"),this.getUtilityData(e,"en",this.containerId,function(e){ca(t.utilityOverlay).removeClass("sapling-utility-empty"),t.renderUtilityData(),ca(t.loadingIndicator).removeClass("sapling-loading"),ca(t.sentenceOverlays).removeClass("sapling-loading")},function(e){ca(t.loadingIndicator).removeClass("sapling-loading"),ca(t.sentenceOverlays).removeClass("sapling-loading")})):this.renderUtilityData())}},{key:"removeUIElements",value:function(){ca(this.utilityOverlay).remove()}},{key:"resetUIElements",value:function(){ca(this.sentenceOverlays).html(""),ca(this.utilityOverlay).addClass("sapling-utility-empty"),this.hudEl=null,ca(this.badge.headsUpContainer).html(this.hudEl)}},{key:"_getRanges",value:function(t,e){for(var n=0,r=0,i=0,o=[];r<t.length&&n<e.length;){for(var a=t[r],s=e[n].text.indexOf(a[0],i);s<0;){if(i=0,++n===e.length)return[];s=e[n].text.indexOf(a[0],i)}var u=n;i=s;for(var c=Math.max(0,a.length-(e[n].text.length-i)),l=i+a.length;c;){if(++n===e.length)return[];l=c,c=Math.max(0,c-e[n].text.length)}var f=n;o.push({startingTextIndex:u,startingOffset:s,endingTextIndex:f,endingOffset:l,sentenceIndex:r}),l<e[n].text.length-1?i=l:(i=0,n++),r++}return o}}])&&fa(t.prototype,e),n&&fa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function va(t){switch(t){case"admiring":case"amused":case"approving":case"confident":case"eager":case"excited":case"grateful":case"joyful":case"loving":case"optimistic":case"relieved":return"joy";case"angry":case"annoyed":case"repulsed":case"disappointed":case"disapproving":return"anger";case"aware":case"neutral":case"sympathetic":return"neutral";case"confused":case"curious":case"surprised":return"surprise";case"fearful":return"fear";case"embarassed":case"mournful":case"remorseful":case"sad":case"worried":return"sadness"}return"neutral"}function ya(t){switch(va(t)){case"joy":case"neutral":case"surprise":case"fear":case"sadness":return"#535f99";case"anger":return"red"}}pa(ga,"WIDTH",300),pa(ga,"HEIGHT",50),pa(ga,"PADDING",15);var ma=n(216);function ba(t){return ba="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},ba(t)}function Da(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return wa(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wa(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function wa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Aa(r.key),r)}}function Aa(t){var e=function(t,e){if("object"!=ba(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ba(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ba(e)?e:e+""}function Ea(t,e,n){return e=_a(e),function(t,e){if(e&&("object"==ba(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ca()?Reflect.construct(e,n||[],_a(t).constructor):e.apply(t,n))}function Ca(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ca=function(){return!!t})()}function Sa(){return Sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_a(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Sa.apply(null,arguments)}function _a(t){return _a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_a(t)}function Oa(t,e){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oa(t,e)}var ka='\n .sapling-utility-data-row .tone-feedback {\n display: flex;\n justify-content: space-between;\n width: 60px;\n height: 20px;\n }\n\n .sapling-utility-data-row.hide-feedback-buttons .tone-feedback {\n display: none;\n }\n\n .sapling-utility-data-row .tone-feedback.feedback-recorded {\n font-size: 8px;\n text-transform: uppercase;\n text-align: center;\n color: #999;\n line-height: 10px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n\n .sapling-utility-data-row .tone-name {\n text-transform: capitalize;\n }\n\n .tone-sentence-feedback.feedback-recorded {\n display: none !important;\n }\n\n .tone-sentence-feedback {\n right: -4.75em;\n top: 0px;\n display: none;\n width: 74px;\n height: 38px;\n justify-content: space-between;\n background: white;\n padding: 5px;\n border: 2px solid #535f99;\n border-radius: 5px;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n margin-left: 4px;\n padding-top: 3px;\n }\n\n .tone-sentence-feedback:before {\n content: "";\n position: absolute;\n top: 4px;\n left: 0.9em;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid #535f99;\n }\n\n .tone-sentence-feedback.hide-feedback-buttons {\n justify-content: center;\n }\n\n .tone-sentence-feedback-title {\n text-transform: uppercase;\n font-size: 8px;\n width: 74px;\n text-align: center;\n }\n\n .tone-sentence-feedback-button-container {\n display: flex;\n width: 100%;\n justify-content: space-around;\n }\n\n .hide-feedback-buttons .tone-sentence-feedback-button-container {\n display: none;\n }\n\n .tone-feedback-button {\n display: flex;\n align-items: center;\n }\n\n .tone-feedback-button img {\n width: 15px;\n opacity: 0.25;\n cursor: pointer;\n padding: 1px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n',Ta=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=Ea(this,e,[t,n,r])).topTone=null,i.toneData=null,i.feedbackDisplayClass="SDK"!==d.MODE||Sapling.toneFeedbackEnabled?"":"hide-feedback-buttons",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oa(t,e)}(e,t),n=e,r=[{key:"utilityName",value:function(){return"Tone"}},{key:"utilityCSS",value:function(){return"".concat(ka)}},{key:"isBeta",value:function(){return!1}},{key:"isUtilityEnabled",value:function(){return ke()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;!function(t,e,n,r,i){gt("request/GET_TONE",{html:D()(t,25e3),sessionId:n,context:wt()},r,i)}(t,0,n,function(t){o.toneData=t.tone,r(t)},function(t){i(t)})}},{key:"_updateToneHud",value:function(t,e){var n,r=null,i=null;t.length>0&&(this.topTone=t[0],"neutral"!==this.topTone[1].toLowerCase()&&(r='<span style="padding-top: 0.1rem;">'.concat(this.topTone[2],"</span>")));var o,a=Da(e);try{for(a.s();!(o=a.n()).done;)"anger"===va(o.value[0][1])&&(n="Angry sentence detected",i='\n <div style="margin-left: 3px; transform: rotate(10deg); padding-top: 0.15rem;">\n <svg fill="red" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 512">\x3c!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"/></svg>\n </div>\n ')}catch(t){a.e(t)}finally{a.f()}this.updateHud({hudEmoji:r,hudWarning:i,hudTitle:n})}},{key:"createUIElements",value:function(){var t,n,r,i,o,a=this;(t=e,n="createUIElements",r=this,o=Sa(_a(1&(i=3)?t.prototype:t),n,r),2&i&&"function"==typeof o?function(t){return o.apply(r,t)}:o)([]),ma(this.utilityOverlay).on("click",".tone-feedback-button img",function(t){var e=ma(t.target),n=ma(e).is(".selected");ma(e).parents(".tone-feedback").find("img").removeClass("selected"),n||ma(e).addClass("selected");var r=JSON.parse(ma(e).parents(".sapling-tone-data-row").attr("data-tone")),i=ma(e).is(".thumbs-up")?1:-1;At(a.lastQueryText,r,"overall",i,a.containerId,function(t){ma(e).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")},function(t){ma(e).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")})})}},{key:"renderUtilityData",value:function(){var t=this,e=this.toneData,n=this.queryEl;if(e&&n){var r=e.overall,i=e.sents,o=e.results;if(r){var a=r.filter(function(t){return t[0]>.05}).sort(function(t,e){return e[0]-t[0]});this._updateToneHud(a,o);var s,u="",c=Da(a);try{for(c.s();!(s=c.n()).done;){var l=s.value,f=5*Math.round(100*l[0]/5);u+='\n <div class="sapling-utility-data-row '.concat(this.feedbackDisplayClass,"\" data-tone='").concat(JSON.stringify(l),'\'>\n <div>\n <span class="tone-emoji">').concat(l[2],'</span>\n <span class="tone-name">').concat(l[1],' -</span>\n <span class="tone-percentage">').concat(f,'%</span>\n </div>\n <div class="tone-feedback">\n <span class="tone-feedback-button"><img class="thumbs-up" src="').concat(this.assetUrls["thumbs-up-regular"],'" /></span>\n <span class="tone-feedback-button"><img class="thumbs-down" src="').concat(this.assetUrls["thumbs-down-regular"],'" /></span>\n </div>\n </div>\n ')}}catch(t){c.e(t)}finally{c.f()}ma(this.utilityOverlay).find(".sapling-utility-data").html(u),this.updateSentenceOverlayPosition();var p=this.shadowHost.getBoundingClientRect(),d=document.createElement("sapling-sentence-tones"),h=[];this.getTextNodes(n,h);for(var g=this._getRanges(i,h),v=function(){var e=g[m],n=e.startingTextIndex,r=e.startingOffset,a=e.endingTextIndex,s=e.endingOffset,u=e.sentenceIndex,c=i[u],l="."===c.slice(-1)?5:0,f=y().includes("zendesk")?8:0,v=document.createRange();v.setStart(h[n].node,r),v.setEnd(h[a].node,s);var b=v.getClientRects(),D=b.item(b.length-1);if(null==D)return 1;var w=document.createElement("div");ma(w).css({position:"absolute",pointerEvents:"auto",left:"".concat(D.x-p.x+D.width-l,"px"),top:"".concat(D.y-p.y-10+f,"px"),width:"20px",height:"20px",cursor:"pointer",opacity:.5,display:"flex"}),ma(w).attr("data-sentence",c),ma(w).attr("data-tone",JSON.stringify(o[m][0])),w.innerHTML="\n ".concat(o[m][0][2],'\n <div class="tone-sentence-feedback ').concat(t.feedbackDisplayClass,'">\n <div class="tone-sentence-feedback-title">').concat(o[m][0][1],'</div>\n <div class="tone-sentence-feedback-button-container">\n <div class="tone-feedback-button"><img class="thumbs-up" src="').concat(t.assetUrls["thumbs-up-regular"],'" /></div>\n <div class="tone-feedback-button"><img class="thumbs-down" src="').concat(t.assetUrls["thumbs-down-regular"],'" /></div>\n </div>\n </div>\n '),w.rects=[];var x,A={},E=Da(b);try{for(E.s();!(x=E.n()).done;){var C=x.value;if(!A.hasOwnProperty(JSON.stringify(C))){A[JSON.stringify(C)]=1;var S=ya(o[m][0][1].toLowerCase()),_=document.createElement("div");ma(_).css({position:"absolute",left:"".concat(C.x-p.x-1,"px"),top:"".concat(C.y-p.y-1,"px"),width:"".concat(C.width+2,"px"),height:"".concat(C.height+2,"px"),backgroundColor:S,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),ma(d).append(_),w.rects.push(_)}}}catch(t){E.e(t)}finally{E.f()}ma(d).append(w),w.addEventListener("mouseenter",function(){ma(w).css({opacity:1}),ma(w).find(".tone-sentence-feedback").css({display:"flex"}),w.rects.forEach(function(t){return t.style.opacity=.25})}),w.addEventListener("mouseleave",function(){ma(w).css({opacity:.75}),ma(w).find(".tone-sentence-feedback").css({display:"none"}),w.rects.forEach(function(t){return t.style.opacity=.1})}),ma(w).on("click",".tone-feedback-button img",function(e){var n=ma(e.target),r=ma(n).is(".selected");ma(n).parents(".tone-sentence-feedback").find("img").removeClass("selected"),r||ma(n).addClass("selected");var i=JSON.parse(ma(w).attr("data-tone")),o=ma(n).is(".thumbs-up")?1:-1;At(c,i,"sentence",o,t.containerId,function(t){ma(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")},function(t){ma(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")})})},m=0;m<g.length;m++)v();ma(this.sentenceOverlays).html("<style>".concat(ka,"</style>")),ma(this.sentenceOverlays).append(d)}}}},{key:"getTopTone",value:function(){return this.topTone}}],r&&xa(n.prototype,r),i&&xa(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(ga),Fa=n(216);function ja(t){return ja="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},ja(t)}function Ia(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Na(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Na(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Na(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Pa(r.key),r)}}function Pa(t){var e=function(t,e){if("object"!=ja(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ja(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ja(e)?e:e+""}function Ra(t,e,n){return e=Ha(e),function(t,e){if(e&&("object"==ja(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,La()?Reflect.construct(e,n||[],Ha(t).constructor):e.apply(t,n))}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(La=function(){return!!t})()}function Ma(){return Ma="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ha(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Ma.apply(null,arguments)}function Ha(t){return Ha=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ha(t)}function Ua(t,e){return Ua=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ua(t,e)}var za=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=Ra(this,e,[t,n,r])).aiDetectionData=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ua(t,e)}(e,t),n=e,r=[{key:"utilityName",value:function(){return"AI Detect"}},{key:"utilityCSS",value:function(){return"".concat("\n\n")}},{key:"isBeta",value:function(){return!1}},{key:"isUtilityEnabled",value:function(){return _e()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;xt(t,0,n,{source:"sdk"},function(t){o.aiDetectionData=t.aidetect,r(t)},function(t){i(t)})}},{key:"createUIElements",value:function(){var t,n,r,i,o;(t=e,n="createUIElements",r=this,o=Ma(Ha(1&(i=3)?t.prototype:t),n,r),2&i&&"function"==typeof o?function(t){return o.apply(r,t)}:o)([])}},{key:"renderUtilityData",value:function(){var t=this.aiDetectionData,e=this.queryEl;if(t&&e){var n=this.aiDetectionData,r=n.score,i=n.sentence_scores;if(r){var o='\n <div class="sapling-utility-data-row">\n Percentage fake: '.concat((100*r).toFixed(2),"%\n </div>\n ");Fa(this.utilityOverlay).find(".sapling-utility-data").html(o),this.updateSentenceOverlayPosition();var a=this.shadowHost.getBoundingClientRect(),s=document.createElement("sapling-sentence-ai-detections"),u=[];this.getTextNodes(e,u);for(var c=i.map(function(t){return t.sentence}),l=this._getRanges(c,u),f=function(){var t=l[p],e=t.startingTextIndex,n=t.startingOffset,r=t.endingTextIndex,o=t.endingOffset,c=t.sentenceIndex,f=i[c],d=document.createRange();d.setStart(u[e].node,n),d.setEnd(u[r].node,o);var h,g=d.getClientRects(),v=[],y={},m=Ia(g);try{for(m.s();!(h=m.n()).done;){var b=h.value;if(!y.hasOwnProperty(JSON.stringify(b))){y[JSON.stringify(b)]=1;var D="rgba(255, 0, 0, ".concat(f.score,")"),w=document.createElement("div");Fa(w).css({position:"absolute",left:"".concat(b.x-a.x-1,"px"),top:"".concat(b.y-a.y-1,"px"),width:"".concat(b.width+2,"px"),height:"".concat(b.height+2,"px"),backgroundColor:D,border:"1px solid black",borderRadius:"5px",cursor:"pointer",opacity:.1}),Fa(s).append(w),v.push(w)}}}catch(t){m.e(t)}finally{m.f()}v.forEach(function(t){t.addEventListener("mouseenter",function(){v.forEach(function(t){return t.style.opacity=.25})})}),v.forEach(function(t){t.addEventListener("mouseleave",function(){v.forEach(function(t){return t.style.opacity=.1})})})},p=0;p<l.length;p++)f();Fa(this.sentenceOverlays).html("<style>".concat("\n\n","</style>")),Fa(this.sentenceOverlays).append(s)}}}}],r&&Ba(n.prototype,r),i&&Ba(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(ga);function qa(t,e){var n=t.editRange,r=e.editRange;return Vi(n,r)?e:Vi(r,n)||Ki(n,r)?t:Ki(r,n)?e:t}function Wa(t){for(var e=t[0],n=1;n<t.length;n++)e=qa(e,t[n]);return e}function Ga(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ya(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ya(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ya(t,e){if(t){if("string"==typeof t)return Xa(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xa(t,e):void 0}}function Xa(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Va=!0,Ka=null,Ja=[],Qa=null,Za=!1;function ts(){Ka&&(Ka.removeEventListener("keydown",is),Ka.removeEventListener("paste",os),Ka=null),Ja=[],Qa=null,Za=!1,document.removeEventListener("selectionchange",ns)}function es(t,e,n){if(ts(),ne){for(var r=[],i=0,o=Object.values(n);i<o.length;i++){var a=o[i];e.edit.originalText===a.edit.originalText&&e.edit.editId!==a.edit.editId&&r.push(a.editRange)}r.length&&function(t,e,n){if(Va=!0,Za=!1,Ja=[],ye(Ka=t)){Qa=[e.startOffset,e.endOffset];var r,i=$a(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;Ja.push([o.startOffset,o.endOffset])}}catch(t){i.e(t)}finally{i.f()}}else{if(null===(Qa=B(Ka,e)))return void(Ka=null);var a,s=$a(n);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=B(Ka,u);null!==c&&Ja.push(c)}}catch(t){s.e(t)}finally{s.f()}}Ja.sort(function(t,e){return e[0]-t[0]}),Ka.addEventListener("keydown",is),Ka.addEventListener("paste",os),document.addEventListener("selectionchange",ns)}(t,e.editRange,r)}}function ns(t){if(ye(Ka)){var e=Qa[0],n=Qa[1];n++;var r=Ka,i=r.selectionStart,o=r.selectionEnd;if(e<=i&&i<=n||e<=o&&o<=n)return}else{var a=window.getSelection();if(a){var s=a.getRangeAt(0),u=Qa[0],c=Qa[1];c++;var l=B(Ka,s);if(u<=l[0]&&l[0]<=c||u<=l[1]&&l[1]<=c)return}}ts()}function rs(t,e){for(var n=t.length,r=Qa[1]-Qa[0],i=0;i<Ja.length;i++)Qa[0]<=Ja[i][0]&&(Va?(Ja[i][0]-=r,Ja[i][1]-=r,e||(Ja[i][0]+=n,Ja[i][1]+=n)):e?(Ja[i][0]--,Ja[i][1]--):(Ja[i][0]+=n,Ja[i][1]+=n));for(var o=0;o<Ja.length;o++){var a=Ga(Ja[o],2),s=a[0],u=a[1],c=void 0;if(!ye(Ka)){c=document.createRange();var l=I(Ka,0,s,Ka),f=I(Ka,0,u,Ka);c.setStart(l.domElement,l.domOffset),c.setEnd(f.domElement,f.domOffset)}if(Va){var p="",d=-r;e||(d+=(p=t).length),ye(Ka)?pu(Ka,s,u,p):vu(c,p,Ka),Ja[o][1]+=d,Qa[0]>s&&(Qa[0]+=d,Qa[1]+=d);for(var h=0;h<o;h++)Ja[h][0]+=d,Ja[h][1]+=d}else{if(e){if(ye(Ka)&&u>s)pu(Ka,u-1,u,""),Ja[o][1]--;else if(c.toString().length){var g=I(Ka,0,u-1,Ka);c.setStart(g.domElement,g.domOffset),vu(c,"",Ka),Ja[o][1]--}for(var v=0;v<o;v++)Ja[v][0]--,Ja[v][1]--}else{ye(Ka)?pu(Ka,u,u,t):(c.collapse(),vu(c,t,Ka)),Ja[o][1]+=n;for(var y=0;y<o;y++)Ja[y][0]+=n,Ja[y][1]+=n}Qa[0]>Ja[o][0]&&(e?(Qa[0]--,Qa[1]--):(Qa[0]+=n,Qa[1]+=n))}}if(Va&&(Va=!1,Qa[1]=Qa[0]),e?Qa[1]--:Qa[1]+=n,ye(Ka))Ka.selectionStart=Qa[1],Ka.selectionEnd=Qa[1];else{var m=document.createRange(),b=I(Ka,0,Qa[0],Ka),D=I(Ka,0,Qa[1],Ka);m.setStart(b.domElement,b.domOffset),m.setEnd(D.domElement,D.domOffset),gu(m)}setTimeout(function(){return document.addEventListener("selectionchange",ns)},0)}function is(t){var e=t.key;if(1===e.length||"Backspace"===e){document.removeEventListener("selectionchange",ns);var n="Backspace"===e;setTimeout(function(){Za||rs(e,n)},10)}}function os(t){Za=!0,document.removeEventListener("selectionchange",ns);var e=(t.clipboardData||window.clipboardData).getData("text");setTimeout(function(){rs(e,!1),Za=!1},10)}var as=n(216);function ss(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return us(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(us(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,us(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,us(f,"constructor",c),us(c,"constructor",u),u.displayName="GeneratorFunction",us(c,i,"GeneratorFunction"),us(f),us(f,i,"Generator"),us(f,r,function(){return this}),us(f,"toString",function(){return"[object Generator]"}),(ss=function(){return{w:o,m:p}})()}function us(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}us=function(t,e,n,r){function o(e,n){us(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},us(t,e,n,r)}function cs(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||ps(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ls(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function fs(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ps(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ps(t,e){if(t){if("string"==typeof t)return ds(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ds(t,e):void 0}}function ds(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var hs={},gs=null,vs={};function ys(t){var e=H(t);if(e){var n=hs[e];if(n)return Object.keys(n.edits).length}return 0}function ms(t){var e=hs[t];if(e){var n=e.shadowHost,r=e.badge,i=e.annotationsOverlay,o=e.toneOverlay,a=e.aiDetectOverlay;n&&n.remove(),r&&r.removeUIElements(),i&&i.removeUIElements(),o&&o.removeUIElements(),a&&a.removeUIElements()}}function bs(t){var e=hs[t];if(e&&e.badge){var n=Object.keys(e.edits).length||0;e.badge.updateBadgeCount(n)}}function Ds(t){var e=hs[t];e&&e.badge&&e.badge.showThrottledState()}function ws(t){var e=hs[t];e&&e.annotationsOverlay&&e.annotationsOverlay.updateAnnotationSummary()}function xs(t){var e=hs[t];e&&e.toneOverlay&&e.toneOverlay.queryAndUpdate()}function As(t,e,n){if(n&&!vs[t]){var r=new MutationObserver(function(t){!function(t,e){var n,r=fs(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(as(i.target).hasClass("notion-text-block"))return void Es(t)}}catch(t){r.e(t)}finally{r.f()}}(e,t)});r.observe(n,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0}),vs[t]=r,ft(t,e,!1,"mutationObservers",r)}}function Es(t){if(!("SDK"!==d.MODE&&t.hasAttribute("sapling-ignore")||as(t).parents(".codex-editor").length)){var e=H(t);if(e){var n=hs[e]||{edits:{}},r=n.shadowHost,i=n.badge;if(r&&!Q(r)&&(r.remove(),r=null),!r){var o=t;if(as(t).is("td")&&t.parentNode)o=t.parentNode.parentNode;else for(var a=o.nextSibling;a&&a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("is-sapling-overlay");){var s=a;a=a.nextSibling,s.remove()}(r=document.createElement("div")).setAttribute("is-sapling-overlay",!0),as(r).css({"pointer-events":"none"}),as(o).after(r),r.attachShadow({mode:"open"});var u=document.createElement("div");if(as(u).addClass("tag-container"),as(u).css({position:"absolute"}),as(r.shadowRoot).prepend(zo),r.shadowRoot.appendChild(u),i||(i=new Cr).createUIElements(t,r,e,n),n.badge=i,!n.annotationsOverlay&&de()&&(n.annotationsOverlay=new ua(e,r),n.annotationsOverlay.createUIElements()),!n.toneOverlay&&ke()&&(n.toneOverlay=new Ta(r,e,i),n.toneOverlay.createUIElements()),n.shadowHost=r,n.overlayDomElement=u,n.containerDomElement=t,n.textAreaId=z(t),function(t,e){var n=new MutationObserver(function(e,n){!function(t,e){var n=hs[t];if(!n)return void e.disconnect();document.contains(n.shadowHost)||(e.disconnect(),$s(t))}(t,n)}),r={childList:!0,subtree:!1};n.observe(e.shadowHost.parentNode,r),e.shadowHostObserver=e}(e,n),"notion.so"===y())As(e,t,P(t).nonstaticParent)}var c,l=P(t).frameDimensions,f=W(t),p=Math.max(f+1,100);as(r).css({overflow:"hidden","padding-bottom":"2px","z-index":p,position:l.position,left:l.left,top:l.top,height:l.height,width:l.width}),n.annotationsOverlay&&n.annotationsOverlay.queryAndUpdate(),n.toneOverlay&&n.toneOverlay.queryAndUpdate(),n.aiDetectOverlay&&n.aiDetectOverlay.queryAndUpdate(),yn(t,r),hs[e]=n,c=n,at[e]=c}}}function Cs(t,e){return t}function Ss(t,e){var n=t.premium;if(t.category in Uo){var r="background-image";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-image2"),Uo[t.category][r]}return n?e?"linear-gradient(to right, rgba(255, 214, 51, 0.15), rgba(255, 214, 51, 0.15))":"linear-gradient(to right, #eeb122, #ffd633)":e?"linear-gradient(to right, rgba(255, 0, 0, 0.15), rgba(255, 0, 0, 0.15))":"linear-gradient(to right, #ff0000, #ff0000)"}function _s(t,e){var n=t.premium;if(e){if(t.category in Uo){var r="background-color";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-color2"),Uo[t.category][r]}return n?"#eeb122":"#ff0000"}return""}function Os(t,e){if(!t.edit.fillin){t.isHover=e;var n={opacity:.85,transition:"","background-color":_s(t.edit,e),"background-image":Ss(t.edit,e),"-webkit-transition":"","-ms-transition":""};e&&(n={"background-color":_s(t.edit,e),"background-image":Ss(t.edit,e)},t.edit.category||(n.opacity=.15,n.transition="background-color 200ms linear",n["-webkit-transition"]="background-color 200ms linear",n["-ms-transition"]="background-color 200ms linear")),t.domElements.forEach(function(t){as(t).css(n)})}}function ks(t,e){var n=hs[t];if(n){var r=n.edits[e];if(r){var i=r.editRange;if(!r.edit.category||n.annotationsOverlay){var o=function(t,e){for(var n=e.shadowHost.getBoundingClientRect(),r=[],i=t.getClientRects(),o=0;o<i.length;o+=1){var a=Cs(i[o]);r.push({left:a.left-n.left,top:a.top-n.top,height:a.height,width:a.width})}return r}(i,n),a=o.length-r.domElements.length;if(a>0)for(var s=function(){var i=document.createElement("span");i.classList.add("sapling-edit"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label","Sapling Edit for: ".concat(r.edit.originalText,". Replacement: ").concat(r.edit.replacementText,".")),i.setAttribute("aria-keyshortcuts","Enter"),i.setAttribute("role","button"),i.setAttribute("sapling-edit-id",e),i.setAttribute("sapling-container-id",t),i.onfocus=function(){return function(t,e,n){as(t).on("keyup",function(t){if("Enter"===t.key){var r=hs[e],i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(!i)return;var s=i[n];t.preventDefault(),t.stopPropagation(),Us(n,e,s,a,o,!0)}})}(i,t,e)},i.onblur=function(){return function(t){as(t).off("keyup")}(i)},n.overlayDomElement.appendChild(i),r.domElements.push(i)},u=0;u<a;u++)s();else if(a<0)for(var c=0;c>a;c--){r.domElements.pop().remove()}for(var l=0;l<o.length;l+=1){var f=o[l],p=r.domElements[l];as(p).css({left:f.left,top:f.top,height:f.height,width:f.width}),r.edit.fillin?as(p).css({border:"1px solid #6f68f7","border-radius":"0.4em"}):r.edit.annotation?r.edit.annotationStyle&&as(p).css(r.edit.annotationStyle):as(p).css({"background-image":Ss(r.edit,!1)})}r.edit.category&&n.annotationsOverlay&&n.annotationsOverlay.updateAnnotationForOverlay(e,r),r.isHover&&Os(r,!0)}}}}function Ts(t,e){var n=hs[t];if(n){var r=n.edits,i=n.annotationsOverlay;r[e]&&(r[e].domElements.forEach(function(t){return t.remove()}),r[e].isHover&&Lo(),delete r[e],i&&i.clearAnnotationForOverlay(e))}}function Fs(t,e){for(var n=H(t),r=0;r<e.length;r+=1)Ts(n,e[r])}function js(t,e,n){for(var r=0,i=0;i<n.length;i+=1){var o=n[i],a=o.textContent.length;if(o.contains(e))return r+t;r+=a}return null}function Is(t,e,n,r,i){var o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset;if(!Q(e)||!Q(r))return null;if(null!==n){var c=I(e,0,n,r,!1,!1);c&&(o=c.domElement,a=c.domOffset)}if(null!==i){var l=I(e,0,i,r,!1,!0);l&&(s=l.domElement,u=l.domOffset)}var f=document.createRange();return!Q(o)||!Q(s)||o.length<=a||s.length<=u||a<0||u<0?null:(f.setStart(o,a),f.setEnd(s,u),f)}function Ns(t,e){if(t in hs){var n=e.removedNodes;if(0!==n.length){var r=hs[t].edits;Object.keys(r).forEach(function(i){var o=r[i],a=o.edit,s=o.editRange,u=js(s.startOffset,s.startContainer,n),c=js(s.endOffset,s.endContainer,n);if(null!==u||null!==c){var l=e.previousSibling||e.target,f=Is(s,l,u,e.target,c);if(f&&Ho(f,a,!1))r[i].editRange=f,ks(t,i);else{var p=e.target.textContent.length-function(t){for(var e=0,n=t.previousSibling;n;)e+=n.textContent.length,n=n.previousSibling;for(var r=t.nextSibling;r;)e+=r.textContent.length,r=r.nextSibling;for(var i=0;i<t.removedNodes.length;i+=1)e+=t.removedNodes[i].textContent.length;return e}(e),d=Is(s,l,u+p,e.target,c+p);d&&Ho(d,a,!1)&&(r[i].editRange=d,ks(t,i))}}})}}}function Bs(t,e){if(t in hs){var n=hs[t].edits;Object.keys(n).forEach(function(r){var i=n[r],o=i.edit,a=i.editRange;if(a.startContainer===e.target){if(to(a)){var s=a.cloneRange();if(Ho(s,o,!1))return void(n[r].editRange=s)}var u=e.target.length-e.oldValue.length,c=a.startOffset+u,l=a.endOffset;if(a.endContainer===e.target&&(l+=u),c>=0&&c<=a.startContainer.length&&l>=0&&l<=a.endContainer.length){var f=document.createRange();f.setStart(a.startContainer,c),f.setEnd(a.endContainer,l),Ho(f,o,!1)&&(n[r].editRange=f,ks(t,r))}to(n[r].editRange)||Ts(t,r)}})}}function Ps(t,e,n,r,i){return Rs.apply(this,arguments)}function Rs(){var t;return t=ss().m(function t(e,n,r,i,o){var a,s,u,c,l,f,p,d,h;return ss().w(function(t){for(;;)switch(t.n){case 0:if((a=document.createRange()).setStart(n,r),a.setEnd(i,o),s=H(e),hs[s]){t.n=1;break}return t.a(2);case 1:u=hs[s].edits,c={},l=Object.entries(u),f=0,p=0;case 2:if(!(p<l.length)){t.n=4;break}if(d=l[p][0],Q((h=l[p][1].editRange).startContainer)&&Q(h.endContainer)&&Qi(h,a)&&(c[d]=u[d]),++f%100!=0){t.n=3;break}return t.n=3,new Promise(function(t){return setTimeout(t,50)});case 3:p++,t.n=2;break;case 4:return t.a(2,c)}},t)}),Rs=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){ls(o,r,i,a,s,"next",t)}function s(t){ls(o,r,i,a,s,"throw",t)}a(void 0)})},Rs.apply(this,arguments)}function Ls(t,e){var n=hs[t];if(!n||!n.badge||!n.badge.badge)return!1;var r=n.badge.badge[0].getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right;return a<=e.clientX&&e.clientX<=s&&i<=e.clientY&&e.clientY<=o}function Ms(t,e,n){var r=null,i=Z(n);if(i){var o=H(i);if(o)r=o;else for(var a=as(i).parents(),s=0;s<a.length;s++){var u=H(a[s]);if(u){r=u;break}}}if(r&&!hs[r]&&(r=null),!r||r===e)for(var c=t.getClientRects(),l=(hs[e],0);l<c.length;l+=1){var f=Cs(c[l]);if(f.top<=n.clientY&&f.bottom>=n.clientY&&f.left<=n.clientX&&f.right>=n.clientX)return!0}return!1}function Hs(){if(gs){if(gs.containerId in hs){var t=hs[gs.containerId].edits;if(gs.editId in t)Os(t[gs.editId],!1)}gs=null}}function Us(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=n.edit,s=n.domElements;if(n.edit.category){if(!r)return!1;if(!r.annotationsAlwaysVisible&&!r.editsVisible)return!1}else if(n.edit.fillin)return!1;return gs&&t===gs.editId||(Hs(),Os(n,!0),gs={editId:t,containerId:e},Ro(e,a,s,i,o)),!0}function zs(t){var e=as(d.CONTROL_ELEMENT).get(0);if(!e)return!1;for(var n=e.getClientRects(),r=0;r<n.length;r+=1){var i=n[r];if(i.top<=t.clientY&&i.top+i.height>=t.clientY&&i.left<=t.clientX&&i.left+i.width>=t.clientX)return!0}return!1}function qs(t){var e=cs(Fu(),2),n=e[0],r=(e[1],H(t)),i=hs[r];if(i){var o=i.edits;if(ye(t))n&&n.hideControls(),r in hs&&Object.keys(o).forEach(function(e){var n=o[e],r=n.editRange,i=!1,a=fi(t,!0);r.startOffset+2<=a&&a+2<=r.endOffset&&(i=!0),i&&n.edit.fillin&&(t.setSelectionRange(r.startOffset,r.endOffset),es(t,n,o))});else{n&&n.hideControls();var a=t.getRootNode().getSelection(),s=a.rangeCount&&a.getRangeAt(0);if(!s)return;Object.keys(o).forEach(function(e){var n=o[e],r=n.editRange,i=!1,a=!1;if(1!==r.compareBoundaryPoints(Range.START_TO_START,s)&&(i=!0),-1!==r.compareBoundaryPoints(Range.END_TO_END,s)&&(a=!0),i&&a&&n.edit.fillin){var u=window.getSelection();u.removeAllRanges(),u.addRange(r),es(t,n,o)}})}}}function Ws(t){var e=!1,n=H(t),r=hs[n];if(r){var i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(i){var s=[];if(ye(t))for(var u=0,c=Object.values(i);u<c.length;u++){var l=c[u],f=l.editRange,p=!1,d=fi(t,!0);f.startOffset<=d&&d<=f.endOffset&&(p=!0),p&&s.push(l)}else{var h;try{h=t.getRootNode().getSelection()}catch(t){return}var g=h.rangeCount&&h.getRangeAt(0);if(!g)return;for(var v=0,y=Object.values(i);v<y.length;v++){var m=y[v],b=m.editRange,D=!1,w=!1;1!==b.compareBoundaryPoints(Range.START_TO_START,g)&&(D=!0),-1!==b.compareBoundaryPoints(Range.END_TO_END,g)&&(w=!0),D&&w&&s.push(m)}}if(s.length){e=!0;var x=Wa(s),A=Us(x.edit.editId,n,x,a,o);e=e||A}e||Lo()}}}function Gs(t){var e=hs[t];if(e){var n=e.edits;Object.keys(n).forEach(function(e){ks(t,e)})}}function $s(t){t in hs&&(hs[t].overlayDomElement.remove(),hs[t].summaryAnnotationsContainer&&hs[t].summaryAnnotationsContainer.removeUIElements(),delete hs[t])}function Ys(t){return t in hs?hs[t].containerDomElement:null}function Xs(t){return hs[t]}var Vs=n(216);function Ks(t){return Ks="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},Ks(t)}var Js=["targetRanges"];function Qs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Zs(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Ks(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ks(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ks(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=nu(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function eu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||nu(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nu(t,e){if(t){if("string"==typeof t)return ru(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ru(t,e):void 0}}function ru(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var iu={};function ou(t){var e=z(t);iu[e]=iu[e]||{};var n=iu[e].overlayDomElement;if(n&&!Q(n)&&(n.remove(),n=null),!n){for(var r=t.nextSibling;r&&r.nodeType===Node.ELEMENT_NODE&&z(r);){var i=r;r=r.nextSibling,i.remove()}(n=document.createElement("div")).setAttribute("contenteditable",!0),"SDK"===d.MODE&&n.setAttribute("sapling-ignore",!0),q(n,e),Vs(t).after(n),iu[e].overlayDomElement=n,iu[e].textArea=t}var o=P(t).frameDimensions,a=o.width,s=o.height;if("content-box"===Vs(t).css("box-sizing")){var u=parseInt(Vs(t).css("padding-left"))||0,c=parseInt(Vs(t).css("padding-right"))||0,l=parseInt(Vs(t).css("padding-top"))||0,f=parseInt(Vs(t).css("padding-bottom"))||0;a=a-u-c-(parseInt(Vs(t).css("border-left-width"))||0)-(parseInt(Vs(t).css("border-right-width"))||0),s=s-l-f-(parseInt(Vs(t).css("border-top-width"))||0)-(parseInt(Vs(t).css("border-bottom-width"))||0)}var p=document.defaultView.getComputedStyle(t);return Vs(n).css({"z-index":p.getPropertyValue("z-index"),spellcheck:!1,"font-style":Vs(t).css("font-style"),"font-weight":Vs(t).css("font-weight"),"font-size":Vs(t).css("font-size"),"font-family":Vs(t).css("font-family"),"text-align":Vs(t).css("text-align"),"line-height":Vs(t).css("line-height"),"letter-spacing":Vs(t).css("letter-spacing"),"word-spacing":Vs(t).css("word-spacing"),color:"transparent",opacity:0,background:Vs(t).css("background"),"overflow-x":Vs(t).css("overflowX"),"overflow-y":Vs(t).css("overflowY"),"background-color":"transparent","white-space":Vs(t).css("whiteSpace"),"pointer-events":"none","border-top-width":Vs(t).css("border-top-width"),"border-top-style":Vs(t).css("border-top-style"),"border-top-color":"transparent","border-left-width":Vs(t).css("border-left-width"),"border-left-style":Vs(t).css("border-left-style"),"border-left-color":"transparent","box-sizing":Vs(t).css("boxSizing"),padding:Vs(t).css("padding"),"padding-top":Vs(t).css("padding-top"),"padding-left":Vs(t).css("padding-left"),overflow:Vs(t).css("overflow"),display:Vs(t).css("display"),position:o.position,left:o.left,top:o.top,height:s,width:a}),"input"===t.nodeName.toLowerCase()&&Vs(n).css({display:"flex","align-items":"center","white-space":"nowrap",overflow:"hidden","text-overflow":"clip"}),"linkedin.com"===y()&&Vs(t).css({"line-height":p.getPropertyValue("line-height")}),n}function au(t){return t in iu?iu[t].textArea:null}function su(t,e){if(t in iu){var n=iu[t].overlayDomElement,r=n.firstChild,i=n.textContent,o="".concat(e,"\n");if(i!==o)if(Math.abs(o.length-i.length)>250)n.textContent=o;else if(r&&r.nodeType===Node.TEXT_NODE)for(var a=(0,Nn.diffChars)(i,o),s=0,u=0;u<a.length;u+=1){var c=a[u],l=c.value.length,f=n.textContent;if(c.added)r.insertData(s,c.value),s+=l;else{if(c.value!==f.substr(s,l)){n.textContent=o;break}c.removed?r.deleteData(s,l):s+=l}}else n.textContent=o}}function uu(t){if(t in iu){var e=iu[t],n=e.textArea,r=e.overlayDomElement;r.scrollTop=n.scrollTop,r.scrollLeft=n.scrollLeft,Gs(H(r))}}function cu(t){if(t in iu){var e=iu[t],n=e.textArea,r=e.overlayDomElement,i=P(n).frameDimensions;Vs(r).css({left:i.left,top:i.top,height:i.height,width:i.width}),Gs(H(r))}}function lu(t){var e=z(t);e&&function(t){t in iu&&(iu[t].overlayDomElement.remove(),delete iu[t])}(e)}function fu(t){var e=window.getSelection();e.removeAllRanges(),e.addRange(t),window.getSelection().setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}function pu(t,e,n,r){t.focus();var i=t.value;t.selectionStart=e,t.selectionEnd=n;var o,a=i.slice(0,e)+r+i.slice(n),s=y(),u=s.endsWith("vinted.net")||s.endsWith("vinted.com");try{s.endsWith("overleaf.com")||u||document.execCommand("insertText",!1,r)}catch(t){}if(!(o=t,o&&o.parentElement&&o.parentElement.parentElement&&o.parentElement.parentElement.classList.contains("CodeMirror")||t.value===a))if(u){var c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"),l=Object.getOwnPropertyDescriptor(t,"value"),f=c&&c.set||l&&l.set;f?f.call(t,a):t.value=a}else t.value=a;t.selectionStart=e,t.selectionEnd=e,t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1})),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}function du(t,e,n,r,i){if(L(r))hu(t,e);else{fu(t);var o=y();o.includes("gladly.")&&setTimeout(function(){fu(t)},10);var a,s=R(r),u=n;if(s&&n){var c=function(t){t&&Array.from(t.childNodes).forEach(function(e){if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()){var n=document.createElement("span");n.setAttribute("style",l),n.textContent=e.textContent,t.replaceChild(n,e)}else if(e.nodeType===Node.ELEMENT_NODE){if("span"===e.tagName.toLowerCase()&&e.getAttribute("style"))return;c(e)}})},l=Object.entries(i).map(function(t){var e=eu(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(r,";")}).join(" "),f=document.createElement("div");f.innerHTML=n,(a=f)&&Array.from(a.querySelectorAll("p")).forEach(function(t){var e=t.innerHTML,n=document.createElement("span");n.innerHTML=e+"<br><br>",t.parentNode.replaceChild(n,t)}),c(f),u=f.innerHTML;try{r.focus(),t.deleteContents();var p=document.createDocumentFragment(),d=document.createElement("div");for(d.innerHTML=u;d.firstChild;)p.appendChild(d.firstChild);t.insertNode(p);var h=t.endContainer,g=function(t){for(var e={},n=t;n&&n!==r;){if(n.nodeType===Node.ELEMENT_NODE&&"span"===n.tagName.toLowerCase()&&n.getAttribute("style")){var i,o=tu(n.getAttribute("style").split(";").filter(Boolean));try{for(o.s();!(i=o.n()).done;){var a=eu(i.value.split(":").map(function(t){return t.trim()}),2),s=a[0],u=a[1];s&&u&&!e[s]&&(e[s]=u)}}catch(t){o.e(t)}finally{o.f()}}n=n.parentNode}return e}(h),v=Object.entries(g).map(function(t){var e=eu(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(r)}).join("; ");if(v){var m=function(t){for(var e=t;e&&e!==r;){var n=e.nextSibling;if(n)if(n.nodeType!==Node.ELEMENT_NODE||"br"!==n.tagName.toLowerCase())if(n.nodeType===Node.TEXT_NODE&&n.textContent.trim()){var i=document.createElement("span");i.setAttribute("style",v),i.textContent=n.textContent,n.parentNode.replaceChild(i,n),e=i}else if(n.nodeType!==Node.ELEMENT_NODE||n.getAttribute("style")||"inline"!==window.getComputedStyle(n).display)e=n;else{var o=document.createElement("span");o.setAttribute("style",v),n.parentNode.replaceChild(o,n),o.appendChild(n),e=o}else e=n;else e=e.parentNode}};if(h.nodeType===Node.TEXT_NODE&&h.textContent.trim()){var b=document.createElement("span");if(b.setAttribute("style",v),b.textContent=h.textContent,h.parentNode)h.parentNode.replaceChild(b,h),m(b)}else if(h.nodeType===Node.ELEMENT_NODE&&h.getAttribute("style")!=v){var D=[],w=function(t){if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim())D.push(t);else if(t.nodeType===Node.ELEMENT_NODE){if("span"===t.tagName.toLowerCase()&&t.getAttribute("style")==v)return;Array.from(t.childNodes).forEach(w)}};w(h),D.forEach(function(t){var e=document.createElement("span");e.setAttribute("style",v),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}),m(h)}else m(h)}t.collapse(!1);var x=window.getSelection();return x.removeAllRanges(),x.addRange(t),r.dispatchEvent(new Event("input",{bubbles:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),void document.dispatchEvent(new KeyboardEvent("keyup",{bubbles:!0}))}catch(t){}}var A=new DataTransfer;A.setData("text/plain",e),n&&A.setData("text/html","<meta charset='utf-8'>".concat(s?u:n));var E=new InputEvent("beforeinput",{inputType:"insertFromPaste",dataTransfer:A,bubbles:!0,cancelable:!0,isComposing:!1}),C=r.innerText;if(setTimeout(function(){t.startContainer.dispatchEvent(E),E.defaultPrevented&&C!==r.innerText||(document.body.dataset.saplingSnippetInsert=!0,document.execCommand("paste"),delete document.body.dataset.saplingSnippetInsert)},100),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),o.includes("force.com")&&!s)for(var S=0,_=Object.entries(i);S<_.length;S++){var O=eu(_[S],2),k=O[0],T=O[1];r.style[k]=T}}}function hu(t,e){var n={inputType:"insertReplacementText",data:e,bubbles:!0,cancelable:!1};fu(t),setTimeout(function(){t.startContainer.dispatchEvent(new InputEvent("beforeinput",n))},0)}function gu(t){var e=window.getSelection();if("function"==typeof e.setBaseAndExtent)e.setBaseAndExtent(t.endContainer,t.endOffset,t.endContainer,t.endOffset);else{var n=document.createRange();n.setStart(t.endContainer,t.endOffset),e.addRange(n)}}function vu(t,e,n){if(L(n))hu(t,e);else{var r=y();if(r.endsWith("facebook.com")||r.endsWith("messenger.com")||r.endsWith("whatsapp.com")||r.endsWith("workplace.com")||r.endsWith("instagram.com")||(i=n.getAttribute("class"))&&i.includes("DraftEditor")||function(t){var e=t.getAttribute("class");return e&&e.includes("ql-editor")}(n)||function(t){return!!t.getAttribute("data-lexical-editor")}(n))!function(t,e){fu(t);var n={inputType:"insertText",data:e,bubbles:!0,cancelable:!1};fu(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),setTimeout(function(){var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=Math.min(i,r.nodeType===Node.TEXT_NODE?r.length:r.childNodes.length),u=Math.min(a,o.nodeType===Node.TEXT_NODE?o.length:o.childNodes.length);try{r===o?r.replaceData(s,u-s,e):(t.deleteContents(),r.insertData(s,e))}catch(t){}t.startContainer.dispatchEvent(new InputEvent("input",n)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))},50)}(t,e);else{var i,o,a=t.startContainer,s=t.startOffset,u=t.endContainer,c=t.endOffset,l=Math.min(s,a.nodeType===Node.TEXT_NODE?a.length:a.childNodes.length),f=Math.min(c,u.nodeType===Node.TEXT_NODE?u.length:u.childNodes.length);try{o=new StaticRange({startContainer:a,startOffset:l,endContainer:u,endOffset:f})}catch(t){}fu(t);var p=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qs(Object(n),!0).forEach(function(e){Zs(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({inputType:"insertText",data:e,bubbles:!0,cancelable:!1},o?{targetRanges:[o]}:{});try{t.startContainer.dispatchEvent(new InputEvent("beforeinput",p))}catch(t){}gu(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),a===u?"function"==typeof a.replaceData?a.replaceData(l,f-l,e):(t.deleteContents(),""!==e&&t.insertNode(document.createTextNode(e))):(t.deleteContents(),"function"==typeof a.insertData?a.insertData(l,e):""!==e&&t.insertNode(document.createTextNode(e)));p.targetRanges;var d=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(p,Js);t.startContainer.dispatchEvent(new InputEvent("input",d)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),(function(t){return A(t).is('[class*="PSPDFKit"]')}(n)||R(n))&&(n.blur(),n.focus())}}}var yu=n(216);function mu(t){return mu="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},mu(t)}function bu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Du(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Du(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Du(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function wu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Eu(r.key),r)}}function Au(t,e,n){return e&&xu(t.prototype,e),n&&xu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eu(t){var e=function(t,e){if("object"!=mu(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=mu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==mu(e)?e:e+""}var Cu=void 0===Cu?null:Cu,Su=void 0===Su?null:Su;function _u(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&!document.activeElement.checkVisibility())return!1;if(t&&!no())return!1;var e=getSelection();return e.rangeCount&&!e.isCollapsed&&e.getRangeAt(0)}function Ou(t){return!(!t||!t.toString().trim()||t.toString().length>250)}var ku=function(){function t(e){wu(this,t),this.shadowHost=e,this.rephraseButton=null,this.rephraseShortcut=null,this.rephraseSpinner=null,this.rephraseWand=null}return Au(t,[{key:"createUIElements",value:function(){var e=this;Ce()&&(this.rephraseButton||(yu(this.shadowHost.shadowRoot).find(".sapling-rephrase-button").remove(),gt("request/GET_REPHRASE_SHORTCUT",{},function(n){e.rephraseShortcut=n.shortcut,e.rephraseButton=yu('\n <div class="sapling-rephrase-button">\n '.concat('<style type="text/css">\n .sapling-rephrase-button {\n z-index: 2147483646 !important;\n position: absolute;\n display: flex;\n width: '.concat(32,"px;\n height: ").concat(32,"px;\n margin: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n border-radius: ").concat(16,"px;\n background-color: #303f9f;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n cursor: pointer;\n }\n .sapling-rephrase-button img {\n transform: scale(0.5);\n fill: #fff;\n }\n .sapling-rephrase-spinner {\n padding: 8px;\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n }\n</style>"),"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div style="margin-left: -47px; margin-bottom: 3px;" class="tooltiptext caret-mid">\n Rephrase').concat(e.rephraseShortcut?'&nbsp;<span class="shortcut-key">'+e.rephraseShortcut+"</span>":"",'\n </div>\n <img class="sapling-rephrase-wand" src="').concat(_f("assets/fa-wand-magic-sparkles-solid.svg"),'" />\n <img class="sapling-rephrase-spinner" src="').concat(_f("assets/fa-spinner-solid-white.svg"),'" />\n </div>\n ')),e.rephraseWand=e.rephraseButton.find(".sapling-rephrase-wand").first(),e.rephraseSpinner=e.rephraseButton.find(".sapling-rephrase-spinner").first(),e.rephraseSpinner.hide();var r=e.shadowHost.shadowRoot;yu(r).append(e.rephraseButton),e.rephraseButton.get(0).addEventListener("mousedown",function(t){1===t.which&&(Cu.toggleControls(),t.preventDefault(),t.stopPropagation())}),t.positionButton()},function(t){})))}},{key:"show",value:function(){var e=this;setTimeout(function(){Ou(_u())&&(t.positionButton(),e.rephraseButton.fadeIn(50))},200)}},{key:"hide",value:function(){this.rephraseButton&&this.rephraseButton.hide()}}],[{key:"positionButton",value:function(){var t=_u();if(Ou(t)){var e=function(){var t=document.activeElement;if(!eo(t))return null;for(;t.parentElement;){var e=t.parentElement;if(!eo(e))break;t=e}return t}();if(e){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();n.top>r.top-32?yu("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y+window.scrollY,position:"absolute"}):yu("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y-5-32+window.scrollY,position:"absolute"})}}}}])}(),Tu=function(){function t(e){wu(this,t),this.shadowHost=e,this.activeRange=null,this.rephraseContainer=null,this.rephraseCandidatesContainer=null,this.rephraseStatusMessage=null,this.rephraseType="paraphrase",this.toneMapping="straightforward"}return Au(t,[{key:"setRephraseType",value:function(t){var e=yu(t).attr("data-rephrase-type");this.rephraseType=e,yu(t).parent().find(".sapling-rephrase-type-active").removeClass("sapling-rephrase-type-active"),yu(t).addClass("sapling-rephrase-type-active"),this.queryAndUpdate()}},{key:"setToneMapping",value:function(t){var e=yu(t).attr("data-tone-mapping");this.toneMapping=e,yu(t).parent().find(".sapling-tone-mapping-active").removeClass("sapling-tone-mapping-active"),yu(t).addClass("sapling-tone-mapping-active"),this.queryAndUpdate()}},{key:"createUIElements",value:function(){if(Ce()&&!this.rephraseContainer){yu(this.shadowHost.shadowRoot).find(".sapling-rephrase-container").remove(),this.rephraseContainer=yu('\n <div class="sapling-rephrase-container" style="display: none;">\n '.concat('<style type="text/css">\n.sapling-rephrase-container {\n z-index: 2147483646;\n display: block;\n max-width: 500px;\n min-width: 300px;\n margin: 0;\n padding: 0;\n border: 1px solid rgba(0, 0, 93, 0.1);\n border-radius: 0.5em;\n background-color: #fff;\n box-shadow: 5px 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n font-size: .875rem;\n font-weight: 500;\n font-family: roboto, helvetica, arial;\n}\n.sapling-rephrase-candidates {\n}\n.sapling-rephrase-candidate {\n display: block;\n padding: 0.8em;\n border-bottom: 1px solid #c5cae9;\n background-color: #fff;\n color: #3f51b5;\n pointer-events: auto;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover {\n background-color: #e8eaf6;\n}\n.sapling-rephrase-status-bar {\n display: flex;\n justify-content: space-between;\n text-align: right;\n background-color: #e8eaf6;\n color: #5c6bc0;\n font-size: 0.9em;\n padding: 0.4em;\n}\n.sapling-rephrase-types {\n display: block;\n padding: 0.4em 0.6em;\n border-bottom: 1px solid #ccc;\n pointer-events: auto;\n}\n.sapling-rephrase-type {\n display: inline-block;\n height: 16px;\n width: 16px;\n opacity: 0.9;\n padding: 0.4em;\n border: 1px solid #fff;\n border-radius: 0.2em;\n cursor: pointer;\n}\n.sapling-rephrase-type img {\n height: 16px;\n width: 16px;\n}\n.candidate-copy-icon {\n display: inline-block;\n visibility: hidden;\n opacity: 0.5;\n height: 15px;\n width: 15px;\n float: right;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover .candidate-copy-icon {\n visibility: visible;\n color: #c5cae9;\n}\n.sapling-rephrase-type:hover {\n background-color: #c5cae9;\n}\n.sapling-rephrase-type-active {\n border: 1px solid #7986cb;\n background-color: #c5cae9;\n}\n.sapling-rephrase-type .tooltiptext {\n margin-left: -47px !important;\n margin-bottom: 5px;\n}\n.sapling-rephrase-status-message {\n display: inline-block;\n font-size: 9pt;\n}\n\n.dropdown-menu {\n display: none;\n position: absolute;\n top: 28px;\n left: -2px;\n margin: 0;\n padding: 3px;\n background-color: #fff;\n border: 1px solid #eee;\n border-radius: 3px;\n font: 10pt "San Francisco", "Segoe UI", arial;\n box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);\n}\n.dropdown-menu li {\n display: block;\n padding: 5px;\n margin: 0;\n border-radius: 2px;\n}\n.dropdown-menu li:hover {\n background-color: #eee;\n}\n.sapling-rephrase-type {\n position: relative;\n}\n.sapling-rephrase-type-active .dropdown-menu {\n list-style-type: none;\n}\n.sapling-rephrase-type-active:hover .dropdown-menu {\n display: block;\n}\n.sapling-tone-mapping-active {\n background-color: #eee;\n}\n</style>',"\n ").concat("<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n transition-delay: 500ms;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: 80px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n\n margin-bottom: -3px;\n padding: 7px;\n\n font-size: 12px;\n font-family: 'Helvetica', 'Arial', sans-serif;\n background-color: black;\n color: #fff;\n text-align: center;\n border-radius: 7px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: \" \";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: black transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n background-color: #555;\n color: #fff;\n font-family: monospace;\n padding: 0.2em;\n border-radius: 0.2em;\n}\n</style>",'\n <div class="sapling-rephrase-types">\n <div class="sapling-rephrase-type sapling-rephrase-type-paraphrase" data-rephrase-type="paraphrase" title="Paraphrase">\n <div style="margin-left: -176px" class="tooltiptext caret-mid">Paraphrase</div>\n <img src="').concat(_f("assets/fa-rotate-solid.svg"),'" />\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-formal" data-rephrase-type="informal_to_formal" title="Formal">\n <img src="').concat(_f("assets/fa-black-tie.svg"),'" />\n <div style="margin-left: -141px" class="tooltiptext caret-mid">Make formal</div>\n </div>\n \x3c!--<div class="sapling-rephrase-type sapling-rephrase-type-informal" data-rephrase-type="formal_to_informal" title="Informal">\n <img src="').concat(_f("assets/fa-shirt-solid.svg"),'" />\n </div>--\x3e\n <div class="sapling-rephrase-type sapling-rephrase-type-split" data-rephrase-type="sentence_split" title="Split">\n <img src="').concat(_f("assets/fa-scissors-solid.svg"),'" />\n <div style="margin-left: -107px" class="tooltiptext caret-mid">Split</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-tone" data-rephrase-type="switch_tone" title="Tone">\n <div class="dropdown-toggle">\n <img src="').concat(_f("assets/fa-smile-solid.svg"),'" />\n <div style="margin-left: -74px" class="tooltiptext caret-mid">Switch Tone</div>\n <div class="dropdown-menu-wrapper">\n <ul class="dropdown-menu">\n <li class="sapling-tone-mapping" data-tone-mapping="straightforward">Straightforward</li>\n <li class="sapling-tone-mapping" data-tone-mapping="confident">Confident</li>\n <li class="sapling-tone-mapping" data-tone-mapping="friendly">Friendly</li>\n <li class="sapling-tone-mapping" data-tone-mapping="empathetic">Empathetic</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n <div class="sapling-rephrase-candidates">\n </div>\n <div class="sapling-rephrase-status-bar">\n <div style="display: flex"><img src="').concat(_f("assets/sapling-logo-small-white.svg"),'" style="height: 16px" /></div>\n <div class="sapling-rephrase-status-message"></div>\n </div>\n </div>\n '));var t=this.shadowHost.shadowRoot;yu(t).append(this.rephraseContainer),this.rephraseCandidatesContainer=this.rephraseContainer.find(".sapling-rephrase-candidates").first(),this.rephraseStatusMessage=this.rephraseContainer.find(".sapling-rephrase-status-message").first(),this.rephraseSpinner=this.rephraseContainer.find(".sapling-rephrase-spinner").first(),Cu=this,this.rephraseContainer.find(".sapling-rephrase-type").each(function(t,e){yu(e).attr("data-rephrase-type")===Cu.rephraseType?yu(e).addClass("sapling-rephrase-type-active"):yu(e).removeClass("sapling-rephrase-type-active");yu(e).on("mousedown",{el:e},function(t){t.preventDefault(),t.stopPropagation(),Cu.setRephraseType(t.data.el)})}),this.rephraseContainer.find(".sapling-tone-mapping").each(function(t,e){yu(e).attr("data-tone-mapping")===Cu.toneMapping?yu(e).addClass("sapling-tone-mapping-active"):yu(e).removeClass("sapling-tone-mapping-active");yu(e).on("mousedown",{el:e},function(t){t.preventDefault(),t.stopPropagation(),Cu.setToneMapping(t.data.el)})}),this.showControls()}}},{key:"positionControls",value:function(){if(this.activeRange){var t=this.activeRange.getBoundingClientRect(),e=yu("sapling-rephrase-controls").height();t.y<window.innerHeight-e||t.y<e/2?yu("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y+t.height+window.scrollY,position:"absolute"}):yu("sapling-rephrase-controls").css({left:t.x+window.scrollX,top:t.y-e+window.scrollY-2,position:"absolute"})}}},{key:"showControls",value:function(){this.activeRange=_u(),Ou(this.activeRange)&&(this.queryAndUpdate(),this.rephraseContainer.show(),this.positionControls())}},{key:"hideControls",value:function(){this.activeRange=null,this.rephraseContainer&&this.rephraseContainer.hide()}},{key:"toggleControls",value:function(){this.rephraseContainer&&(this.rephraseContainer.is(":visible")?this.hideControls():this.showControls())}},{key:"loadingOn",value:function(){var t,e;this.setStatus("Loading suggestions..."),this.rephraseCandidatesContainer.html(""),null!==(t=Su)&&void 0!==t&&null!==(t=t.rephraseWand)&&void 0!==t&&t.length&&Su.rephraseWand.hide(),null!==(e=Su)&&void 0!==e&&null!==(e=e.rephraseSpinner)&&void 0!==e&&e.length&&Su.rephraseSpinner.show()}},{key:"loadingOff",value:function(){var t,e;this.setStatus("Ready."),null!==(t=Su)&&void 0!==t&&null!==(t=t.rephraseSpinner)&&void 0!==t&&t.length&&Su.rephraseSpinner.hide(),null!==(e=Su)&&void 0!==e&&null!==(e=e.rephraseWand)&&void 0!==e&&e.length&&Su.rephraseWand.show()}},{key:"queryAndUpdate",value:function(){var t=this;this.loadingOn();var e,n,r,i,o,a,s=this.activeRange.toString();e=s,n=this.rephraseType,r={tone_mapping:this.toneMapping},i="TODO-SESSION-ID",o=function(e){t.updateCandidates(e.rephrases.results),t.loadingOff()},a=function(e){t.loadingOff(),e&&s.length>250?t.setStatus("Error: selected text too long"):t.setStatus("Unexpected error")},gt("request/GET_REPHRASE",{html:D()(e,256),mapping:n,metadata:r,sessionId:i,context:wt()},o,a)}},{key:"updateCandidates",value:function(e){var n=this;this.rephraseCandidatesContainer.html("");var r,i=bu(e);try{var o=function(){var e=r.value,i=yu('<div class="sapling-rephrase-candidate" data-candidate-hash="'.concat(e.hash,'">\n <span>').concat(e.replacement,'</span>\n <img class="candidate-copy-icon" src="').concat(_f("assets/fa-copy-regular.svg"),'" title="Copy" />\n </div>'));i.find(".candidate-copy-icon").first().mousedown(function(e){t.copyCandidate(i,e)}),n.rephraseCandidatesContainer.append(i)};for(i.s();!(r=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}this.rephraseCandidatesContainer.find(".sapling-rephrase-candidate").each(function(t,e){var n=e.innerText;e.addEventListener("mousedown",function(t){Cu.acceptCandidate(n,document.activeElement,yu(e).attr("data-candidate-hash")),t.preventDefault(),t.stopPropagation()})}),this.positionControls()}},{key:"acceptCandidate",value:function(t,e,n){if(this.activeRange){var r=this.activeRange,i=z(e),o=H(e)||i;i?pu(e,r.startOffset,r.endOffset,t):vu(r,t,e),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];gt("request/POST_REPHRASE",{rephraseHash:t,context:bt(bt({},wt(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}(n,!0,o,{}),this.hideControls()}}},{key:"setStatus",value:function(t){this.rephraseStatusMessage.text(t)}}],[{key:"copyCandidate",value:function(t,e){e.preventDefault(),e.stopPropagation(),function(t){function e(e){e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t),e.preventDefault()}document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}(t[0].querySelector("span").innerText),Cu.setStatus("Text copied.")}}])}();function Fu(){return[Cu,Su]}function ju(){Cu&&Cu.hideControls(),Su&&Su.hide()}function Iu(t,e){return Su||(Su=new ku(e)).createUIElements(),Cu||(Cu=new Tu(t)).createUIElements(),[Cu,Su]}n(216);function Nu(t){return Nu="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},Nu(t)}function Bu(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Pu(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Pu(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Pu(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,Pu(f,"constructor",c),Pu(c,"constructor",u),u.displayName="GeneratorFunction",Pu(c,i,"GeneratorFunction"),Pu(f),Pu(f,i,"Generator"),Pu(f,r,function(){return this}),Pu(f,"toString",function(){return"[object Generator]"}),(Bu=function(){return{w:o,m:p}})()}function Pu(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Pu=function(t,e,n,r){function o(e,n){Pu(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Pu(t,e,n,r)}function Ru(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Lu(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ru(Object(n),!0).forEach(function(e){Mu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ru(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Mu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Nu(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Nu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Nu(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hu(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Uu(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Hu(o,r,i,a,s,"next",t)}function s(t){Hu(o,r,i,a,s,"throw",t)}a(void 0)})}}function zu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return qu(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function qu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Wu=["font-family","font-size","font-style","font-weight","color","line-height","letter-spacing","word-spacing"],Gu=["fontFamily","fontSize","fontStyle","fontWeight","color","lineHeight","letterSpacing","wordSpacing"];function $u(t){var e,n={},r=zu(t.childNodes);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.style){var o,a=i.style,s=zu(Gu);try{for(s.s();!(o=s.n()).done;){var u=o.value;a[u]&&"default"!==a[u]&&(n[u]=a[u])}}catch(t){s.e(t)}finally{s.f()}}if(Object.keys(n).length>0)return n;var c=$u(i);if(Object.keys(c).length>0)return c}}catch(t){r.e(t)}finally{r.f()}return{}}function Yu(t,e){return Xu.apply(this,arguments)}function Xu(){return(Xu=Uu(Bu().m(function t(e,n){var r,i,o,a,s,u,c,l,f,p;return Bu().w(function(t){for(;;)switch(t.n){case 0:if(r=new DOMParser,i=r.parseFromString(e,"text/html"),o=$u(i.body),a={},0===Object.keys(o).length){if(n&&(u=n.getRootNode().getSelection()))for(s=u.anchorNode||u.focusNode;s&&s.nodeType!==Node.ELEMENT_NODE&&s.parentElement;)s=s.parentElement;if(s=s||n){c=window.getComputedStyle(s),l=zu(Wu);try{for(l.s();!(f=l.n()).done;)(p=f.value)in c&&(a[p]=c[p])}catch(t){l.e(t)}finally{l.f()}"font-size"in c&&(c["font-size"].startsWith("0")||(a["font-size"]=c["font-size"]))}}return t.n=1,jf({action:"copy-snippet",html:e,fontStyle:a});case 1:return t.a(2,Lu(Lu({},o),a))}},t)}))).apply(this,arguments)}function Vu(){try{return!("undefined"==typeof window||!window.__SAPLING_DEBUG__)||!("undefined"==typeof localStorage||!localStorage.getItem("__SAPLING_DEBUG__"))}catch(t){return!1}}function Ku(t,e){Vu()}var Ju=n(216);function Qu(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Zu(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Zu(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Zu(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,Zu(f,"constructor",c),Zu(c,"constructor",u),u.displayName="GeneratorFunction",Zu(c,i,"GeneratorFunction"),Zu(f),Zu(f,i,"Generator"),Zu(f,r,function(){return this}),Zu(f,"toString",function(){return"[object Generator]"}),(Qu=function(){return{w:o,m:p}})()}function Zu(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Zu=function(t,e,n,r){function o(e,n){Zu(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Zu(t,e,n,r)}function tc(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ec(t){return ec="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},ec(t)}function nc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rc(r.key),r)}}function rc(t){var e=function(t,e){if("object"!=ec(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ec(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ec(e)?e:e+""}var ic=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Tab","Delete","Escape","Home","End","PageUp","PageDown"]),oc=new Set(["ArrowUp","ArrowDown","Enter","Escape"]),ac=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.children={},this.end=!1}return e=t,n=[{key:"insert",value:function(e){for(var n=this,r=0;r<e.length;r++)n.children[e[r]]||(n.children[e[r]]=new t),n=n.children[e[r]],r===e.length-1&&(n.end=!0)}},{key:"contains",value:function(t){for(var e=this,n=0;n<t.length;n++){if(!e.children[t[n]])return 0;e=e.children[t[n]]}return e.end?2:1}}],n&&nc(e.prototype,n),r&&nc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),sc="\\",uc=!1,cc=new ac,lc={},fc=[];function pc(){var t;Ku(),t=function(t){!function(t){if(t){for(var e=new ac,n={},r=0;r<t.length;r++){var i=t[r],o=i.shortcut;if(o){var a=o.toLowerCase();e.insert(a),n[a]=i}}cc=e,lc=n,Ku(0,t.length)}else Ku()}(t)},gt("request/GET_SHORTCUT_SNIPPETS",{},t,function(t){Ku()});var e=ge();null!=e&&(sc=e),Ku()}function dc(){fc=[],uc&&(uc=!1,Ku(),Ff({action:"snippet-control",data:{show:!1}}))}function hc(){var t;return t=Qu().m(function t(e){var n,r,i,o,a,s,u,c;return Qu().w(function(t){for(;;)switch(t.n){case 0:if(n=fc.join(""),fc=[],r=lc[n]){t.n=1;break}return Ku(),t.a(2);case 1:if("true"!==(i=e&&e.getAttribute&&e.getAttribute("contenteditable"))&&""!==i&&"plaintext-only"!==i){t.n=5;break}if(Ku(0,r.id),o=un(e,null),a=Math.max(0,o.startOffset-n.length+1),o.setStart(o.startContainer,a),""===r.rich_text){t.n=4;break}return t.n=2,jf({action:"cache-clipboard"});case 2:return t.n=3,Yu(r.rich_text,e);case 3:s=t.v,du(o,r.plain_text,r.rich_text,e,s),Ff({action:"pop-cached-clipboard"});case 4:Ot(r.id,"shortcut",n,0),t.n=6;break;case 5:e&&X(e,!0)?(Ku(0,(r.id,e.tagName)),u=Math.max(0,e.selectionStart-n.length+1),c=u+r.plain_text.length,y().endsWith("figma.com")&&window.dispatchEvent(new CustomEvent("sapling-figma-selection",{detail:{bufferLength:n.length-1}})),pu(e,u,e.selectionEnd,r.plain_text),e.setSelectionRange(c,c),Ot(r.id,"shortcut",n,0)):Ku(0,e&&e.tagName);case 6:return t.a(2)}},t)}),hc=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){tc(o,r,i,a,s,"next",t)}function s(t){tc(o,r,i,a,s,"throw",t)}a(void 0)})},hc.apply(this,arguments)}function gc(t,e){return uc&&oc.has(e)?(Ku(),Ff({action:"snippet-control",data:{key:e}}),!1):function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("textarea"===e||"input"===e)return null!=t.selectionStart&&t.selectionStart!==t.selectionEnd}var n=window.getSelection();if(!n||0===n.rangeCount||n.isCollapsed)return!1;var r=n.getRangeAt(0).commonAncestorContainer;return t&&(t.contains(r)||t===r)}(t)?(fc=[],vc(),!0):("Backspace"===e?(fc.pop(),vc()):ic.has(e)&&(fc=[]),!0)}function vc(){if(uc){var t,e=fc.join("");if(t=e.length,e.startsWith(sc)){var n=e.substring(sc.length);Ku(),Ff({action:"snippet-control",data:{query:n}})}else Ku(),uc=!1,Ff({action:"snippet-control",data:{show:!1}})}}function yc(t,e){if(e.length>1)return!1;fc.push(e.toLowerCase());var n=cc.contains(fc);if(2===n)return Ku(0,fc.join("")),function(t){hc.apply(this,arguments)}(t),!0;if(fc.join("")===sc){var r=fn(t),i=r.top,o=r.top+r.height+10,a=r.left,s=Ju(window).height();Bn()?Ff({action:"get-iframe-bounding-rect",href:window.location.href,name:window.name,x:a,y:o,caretY:i,frameIds:[]}):function(t,e,n,r){var i={top:"",bottom:"",left:t};n-e<300?i.bottom=n-r+10:i.top=e,Ff({action:"snippet-control",data:{coordinates:i,mode:"inline",show:!0}}),uc=!0,vc()}(a,o,s,i)}else vc();if(1===n);else if(0===n&&!uc)for(;;){var u=fc.indexOf(" ");if(!(u>=0))return!1;if(0===(fc=fc.slice(u+1,fc.length)).length)return!1;if(0!==cc.contains(fc))return!1}}var mc=n(216);function bc(t,e,n){t.observe(mc("#chatLog")[0],e),t.observe(mc("#chatTextArea")[0],e),n&&n()}function Dc(){var t;0===mc("sapling-chat-controls").length?((t=document.createElement("sapling-chat-controls")).attachShadow({mode:"open"}),mc("#chatInput").after(t)):t=mc("sapling-chat-controls")[0];var e=t.shadowRoot;mc(".sapling-chat-container",e)[0]||(mc(e).prepend(mc('\n<style type="text/css">\n.sapling-chat-container{\n}\n.sapling-chat-suggestion{\n width: 305px;\n margin: 5px;\n border: 1px solid rgba(82, 95, 153, 0.8);\n color: rgba(82, 95, 153, 0.8);\n background-color: #fff;\n border-radius: 5px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 5px;\n padding-bottom: 5px;\n user-select: none;\n font-family: Helvetica, Arial, sans-serif;\n font-size: 12px;\n transition: all .15s ease;\n}\n.sapling-chat-suggestion:hover {\n transform: translateY(-1px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);\n}\n.sapling-chat-suggestion:active {\n transform: translateY(0px);\n background-color: rgba(82, 95, 153, 0.5);\n}\n.sapling-chat-suggestion .sapling-suggestion-send img {\n z-index: 10;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0px; right: 0px;\n padding-top: 5px; padding-right: 5px;\n color: rgba(82, 95, 153, 0.8);\n visibility: hidden;\n}\n.sapling-chat-suggestion:hover .sapling-suggestion-send img {\n visibility: visible;\n}\n</style>')),mc(e).append(mc("\n<div class='sapling-chat-container'>\n</div>\n")))}function wc(t){for(var e=mc("#chatLog div"),n=[],r=function(){var r=mc(e[i]);if(r.hasClass("agentMessage"));else if(r.hasClass("chasitorMessage")){var o=mc(".messageText",r).text();o||(o=r.text()),n.push(o),t&&(mc(r).off("click"),mc(r).css("cursor","pointer"),mc(r).on("click",function(){return t(o)}))}},i=0;i<e.length;i+=1)r();return n}function xc(t,e){pu(mc("#chatTextArea")[0],0,0,t);try{mc("#chatInputSend").click()}catch(t){}e(z(mc("#chatTextArea")),mc("#chatTextArea")[0].value)}function Ac(t){pu(mc("#chatTextArea")[0],0,0,t)}function Ec(){return!!location.hostname.endsWith("salesforce.com")&&("/liveagent/chatlog.apexp"===location.pathname&&!!mc("#chatLog")[0])}function Cc(){return mc("#chatTextArea")[0]?{sessionId:z(mc("#chatTextArea"))}:""}var Sc=n(216);function _c(t){return function(t){if(Array.isArray(t))return kc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Oc(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oc(t,e){if(t){if("string"==typeof t)return kc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kc(t,e):void 0}}function kc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}window.log_last_mutated=void 0===window.log_last_mutated?new Date:window.log_last_mutated,window.sendEvent=Et;var Tc,Fc=null,jc=null,Ic=null,Nc=null,Bc=null,Pc=null,Rc=null,Lc=null,Mc=!1,Hc=void 0===Hc?null:Hc,Uc=void 0===Uc?"":Uc,zc=void 0===zc?"":zc,qc=void 0===qc?null:qc,Wc=void 0!==Wc&&Wc,Gc=void 0===Gc?null:Gc;window.lastResponseTimestamp="undefined"==typeof lastResponseTimestamp?null:lastResponseTimestamp;function $c(t){for(var e=t.split(" "),n=new Set,r=0;r<=e.length&&(n.add(e.slice(r,r+3).join(" ")),!(r+3>=e.length));r++);return n}function Yc(){var t=[];return new Date-log_last_mutated>6e4&&t.push({id:"helper-still-connected",doc:"Are we still connected?",confidence:null}),t}function Xc(t){log_last_mutated=new Date;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Oc(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("childList"===r.type){return el(),void Qc()}if("attributes"===r.type&&"disabled"===r.attributeName)return void ul()}}catch(t){n.e(t)}finally{n.f()}}function Vc(t){Gc&&(Gc.agent_message=t,function(t){var e=t.suggestion_id,n=t.index,r=(t.helper,t.suggest_text),i=t.agent_message,o=t.confidence,a=t.quick_send,s=$c(r),u=$c(i),c=new Set(_c(s).filter(function(t){return u.has(t)})),l=Ic(),f={hostname:y(),pathname:m(),suggest_index:n,confidence:o,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,ng_size:3,ng_select:s.size,ng_sent:u.size,ng_overlap:c.size,quick_send:a,click_query:Wc};Object.assign(f,l),p={context:f,suggestion_id:e,action:"send"},gt("request/POST_SUGGESTION_EVENT",p),Gc=null,Wc=!1;var p}(Gc))}function Kc(t){var e=t.suggestion_id,n=t.index,r=t.helper,i=t.confidence,o=t.quick_send,a=Ic(),s={hostname:y(),pathname:m(),suggest_index:n,confidence:i,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,quick_send:o,click_query:Wc,helper:r};Object.assign(s,a),gt("request/POST_SUGGESTION_SELECT",{suggestionId:e,context:s}),o?(Gc=null,Wc=!1):Gc=t}function Jc(t){var e=t.split(":");return 3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2])}var Qc=Re().debounce(function(){Pc(St)},300);function Zc(){return{inpEl:null,inp:""}}function tl(t){for(var e=null,n=null,r=null,i=null,o=Sc("#chatLog div"),a=0;a<o.length;a+=1){var s=Sc(o[a]);s.hasClass("agentMessage")?(r=e,e="agent",i=n,n=Sc(".timestamp",s).text()):s.hasClass("chasitorMessage")&&(r=e,e="visitor",i=n,n=Sc(".timestamp",s).text())}if(n!==lastResponseTimestamp&&(lastResponseTimestamp=n,"agent"===e&&"visitor"===r)){var u=Jc(n)-Jc(i),c=Ic(),l={hostname:y(),pathname:m(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,response_time:u,action:"agent_response"};Object.assign(l,c),Et("chat_event",l,""),t(l)}}var el=Re().debounce(function(){var t=Ic(),e=Fc(function(e){Wc=!0,ui(e,null,sl,t)},_t),n=e[e.length-1];e&&n&&n!==Uc&&(Uc=n,ul(),Mc=!1,ol(),Wc=!1,ui(n,e,sl,t))},200);var nl=Re().debounce(function(){var t=Ic(),e=Lc(),n=(e.inpEl,e.inp);n&&n!==zc&&(zc=n,Mc=!1,Wc=!1,ci(n,sl,t))},200);function rl(t,e,n){var r=t.doc,i=t.id;if(i!==qc){var o=Rc().shadowRoot,a=Sc("<div class='sapling-chat-suggestion'>".concat(r,"</div>"));if("confidence"in t&&null!==t.confidence){var s=t.confidence.toFixed(2),u="low";s>.25&&(u="med"),s>.75&&(u="high");var c=Sc('<div class="sapling-suggestion-conf sapling-conf-'.concat(u,'">').concat(s,"</div>"));a.append(c)}n?Sc(".sapling-helper-container",o).append(a):Sc(".sapling-chat-container",o).append(a),a.on("mousedown",function(o){1===o.which&&(log_last_mutated=new Date,qc=i,ul(),jc(r),Kc({suggestion_id:i,index:e,helper:n,suggest_text:r,agent_message:r,confidence:t.confidence,quick_send:!1}))})}else qc=null}function il(t){for(var e=new Set,n=[],r=0;r<t.length;r++)e.has(t[r].doc)||(e.add(t[r].doc),n.push(t[r]));return n}function ol(){if(!Mc){var t=Rc();if(null===t&&Bc(),null!==(t=Rc())){var e=Nc();if(e.length){var n=t.shadowRoot;0===Sc(".sapling-response-wrapper-close",n).length&&Sc(".sapling-response-wrapper",n).prepend('<div class="sapling-response-wrapper-close">&times;</div>'),Sc(".sapling-response-wrapper-close",n).click(ul),Sc(".sapling-helper-container",n).html(""),e=il(e);for(var r=0;r<e.length;r++)rl(e[r],r,!0)}}}}function al(){var t=Sc("sapling-chat-controls");return t.length?t[0]:null}function sl(t){if(t.length){var e=Rc().shadowRoot;0===Sc(".sapling-response-wrapper-close",e).length&&Sc(".sapling-response-wrapper",e).prepend('<div class="sapling-response-wrapper-close">&times;</div>'),Sc(".sapling-response-wrapper-close",e).click(ul),Sc(".sapling-chat-container",e).html(""),t=il(t);for(var n=0;n<Math.min(3,t.length);n+=1)rl(t[n],n,!1);var r={num_responses:t.length,hidden:document.hidden},i=Ic();Object.assign(r,i),Et("show_suggest_responses",r,"")}}function ul(){Mc=!0;var t=Rc();if(null!==t){var e=t.shadowRoot;Sc(".sapling-chat-suggestion",e).remove(),Sc(".sapling-response-wrapper-close",e).remove()}}function cl(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(fe()&&((e=location.hostname)&&!e.includes("zendesk.com")&&!e.includes("ujet.co")&&!e.includes("force.com")&&(e.includes("connect.aws")||e.includes("awsapps")||e.includes("amazonaws.com")||(e.includes("intercom.com")||e.includes("sapling.ai")||e.includes("kustomer")||e.includes("gorgias"),0)))&&!(n<1)){"function"!=typeof shouldInitializeChatObserverOverride&&setTimeout(function(){cl(t,n-1)},1e3);if(null!==Hc&&Hc.disconnect(),("function"==typeof shouldInitializeChatObserverOverride?shouldInitializeChatObserverOverride:Ec)()){var r="function"==typeof getLastClientChatMessagesOverride?getLastClientChatMessagesOverride:wc,i="function"==typeof injectChatResponseOverride?injectChatResponseOverride:xc,o="function"==typeof editChatResponseOverride?editChatResponseOverride:Ac,a="function"==typeof observeChatEventsOverride?observeChatEventsOverride:bc;Bc="function"==typeof injectChatUIOverride?injectChatUIOverride:Dc;var s="function"==typeof getContextOverride?getContextOverride:Cc,u="function"==typeof getHelperResponsesOverride?getHelperResponsesOverride:Yc,c="function"==typeof getResponseTimeHelperOverride?getResponseTimeHelperOverride:tl,l="function"==typeof getResponseWrapperOverride?getResponseWrapperOverride:al,f="function"==typeof getInpOverride?getInpOverride:Zc;Fc=r,jc=function(t){return o(t)},Ic=s,Nc=u,Pc=c,Rc=l,Lc=f,null==Hc&&(Hc=new MutationObserver(Xc)),Bc(),a(Hc,{attributes:!0,childList:!0,characterData:!0,subtree:!0},el,Vc),el(),clearInterval(Tc),Tc=setInterval(ol,3e3);var p=Lc(),d=p.inpEl;p.inp;d&&Sc(d).on("input",nl)}}}var ll=n(216);function fl(t){return fl="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},fl(t)}function pl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return dl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dl(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function dl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function gl(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=fl(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=fl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fl(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vl,yl,ml={},bl={},Dl={};function wl(t,e){vl=t,yl=e,y().includes("figma.com")&&(ll(function(){ll('div[name="propertiesPanelContainer"]').css("z-index",1)}),window.addEventListener("sapling-figma-text-nodes-updated",function(t){xl(t.detail.figmaTextNodes)}),window.addEventListener("sapling-figma-viewport-updated",function(t){var e,n;e=t.detail.figmaViewport,n=t.detail.figmaTextNodes,bl=e,xl(n)}))}function xl(t){bl.viewportBounds&&bl.zoom&&t&&(Object.keys(ml).filter(function(e){0===t.filter(function(t){return t.figmaId===e}).length&&(ml[e].overlayDomElement.remove(),delete ml[e])}),t.forEach(function(t){return function(t){var e=t.figmaId;ml.hasOwnProperty(e)||(ml[e]=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hl(Object(n),!0).forEach(function(e){gl(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t));var n=function(t){var e=t.figmaId,n=t.characters,r=t.textBounds,i=t.style;if(!ml.hasOwnProperty(e))return;var o=ml[e].overlayDomElement;if(!o){(o=document.createElement("div")).setAttribute("contenteditable",!0),ll(o).attr("id","sapling-figma-text-".concat(e)),ll(o).attr("sapling-figma-text-id",e),ll(o).data("sapling-figma-text-id",e),document.getElementsByTagName("body")[0].appendChild(o),ml[e].overlayDomElement=o,o.addEventListener("input",function(t){window.dispatchEvent(new CustomEvent("sapling-figma-edit-accepted",{detail:{figmaId:e,updatedText:Al(o.innerHTML)}}))})}var a=bl.canvasRect.top,s=bl.canvasRect.left,u=bl.viewportBounds.y,c=bl.viewportBounds.x,l=bl.zoom;ll(o).data("figma-zoom",l);var f=r.y,p=r.x,d=r.width,h=r.height,g=s+(p-c)*l,v=a+(f-u)*l,y=d*l,m=h*l,b=i.textAlignHorizontal,D=i.textAlignVertical,w=i.paragraphSpacing,x=i.paragraphIndent,A=i.listSpacing,E=i.textSegments,C=w,S=A;o.innerHTML="";var _=document.createElement("span");function O(t,e){var n=new RegExp("[".concat(e.join(""),"]"),"g");return t.split(n)}ll(_).css({zoom:l}),Gs(ll(o).attr("sapling-id"));var k,T,F,j=String.fromCodePoint(8232),I=O(n.trim(),["\n",j]),N=0,B=0,P=pl(I);try{for(P.s();!(F=P.n()).done;){var R=F.value;T=0===R.length;var L=document.createElement("div"),M="NONE"!==(k=E[B]).listOptions.type,H={};M||(H["text-indent"]="".concat(x,"px")),0===N||(M?"NONE"!==E[B-1].listOptions.type?H["margin-top"]="".concat(C,"px"):H["margin-top"]="".concat(S,"px"):H["margin-top"]="".concat(C-1,"px"));var U=k.lineHeight,z="inherit";"PERCENT"===U.unit?z=Math.trunc(U.value)/100:"PIXELS"===U.unit?z="".concat(U.value-1,"px"):"AUTO"===U.unit&&(z=1),H["line-height"]=z,ll(L).css(H),T&&ll(L).attr("sapling-figma-empty-line",!0);for(var q=N+R.length;T||N<q&&k;){var W=document.createElement("span"),G=k,$=G.characters,Y=G.start,X=G.end,V=G.fontName,K=G.fontSize,J=G.fontWeight,Q=G.letterSpacing,Z=G.textCase,tt=V.family.split(" ").join("+")+":wght@".concat(J);Dl.hasOwnProperty(tt)||(document.getElementsByTagName("head")[0].innerHTML+='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family='.concat(tt,'" />'),Dl[tt]=1);var et=K,nt="inherit";"UPPER"===Z||"LOWER"===Z?nt=Z.toLowerCase()+"case":"TITLE"===Z&&(nt="capitalize");var rt="inherit";"PERCENT"===Q.unit?rt="".concat(Math.trunc(100*Q.value)/1e4,"em"):"PIXELS"===Q.unit&&(rt="".concat(Q.value,"px")),ll(W).css({"font-family":V.family,"font-style":V.style,"font-size":"".concat(et,"px"),"text-transform":nt,"letter-spacing":rt,"font-weight":J});var it=N-Y,ot=it+(Math.min(X,q)-N);W.textContent=$.slice(it,ot),T&&(W.textContent="\u200b"),L.appendChild(W),N=Math.min(q,X),q>=X?B++:N++,k=E[B],T=!1}_.appendChild(L)}}catch(t){P.e(t)}finally{P.f()}o.appendChild(_);var at="flex-start",st=b.toLowerCase();"CENTER"===b?at="center":"RIGHT"===b?at="flex-end":"JUSTIFIED"===b&&(st="justify");var ut="flex-start";"CENTER"===D?ut="center":"BOTTOM"===D&&(ut="flex-end");return ll(o).css({spellcheck:!1,color:"red",opacity:0,"pointer-events":"none",position:"fixed",top:"".concat(v,"px"),left:"".concat(g,"px"),height:"".concat(m,"px"),width:"".concat(y,"px"),"text-align":st,display:"flex","justify-content":at,"align-items":ut}),vl(o),Es(o),o}(t);yl({saplingId:ll(n).attr("sapling-id"),editable:n})}(t)}))}function Al(t){var e,n="",r=pl((new DOMParser).parseFromString(t,"text/html").firstChild.lastChild.firstChild.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.attributes.hasOwnProperty("sapling-figma-empty-line")?n+="\n":n+=i.textContent+"\n"}}catch(t){r.e(t)}finally{r.f()}return n.trimEnd()}var El=n(216);function Cl(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Sl(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],f=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,p.n=n,a}};function d(n,r){for(s=n,u=r,e=0;!f&&c&&!i&&e<l.length;e++){var i,o=l[e],d=p.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(s=0,p.v=r,p.n=o[1]):d<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,p.n=h,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),s=l,u=h;(e=s<2?t:u)||!f;){o||(s?s<3?(s>1&&(p.n=-1),d(s,u)):p.n=u:p.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=p.n<0)?u:n.call(r,p))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Sl(e={},r,function(){return this}),e),f=c.prototype=s.prototype=Object.create(l);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Sl(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,Sl(f,"constructor",c),Sl(c,"constructor",u),u.displayName="GeneratorFunction",Sl(c,i,"GeneratorFunction"),Sl(f),Sl(f,i,"Generator"),Sl(f,r,function(){return this}),Sl(f,"toString",function(){return"[object Generator]"}),(Cl=function(){return{w:o,m:p}})()}function Sl(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Sl=function(t,e,n,r){function o(e,n){Sl(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Sl(t,e,n,r)}function _l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ol(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ol(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ol(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function kl(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var Tl={},Fl={},jl={};function Il(t){return Nl.apply(this,arguments)}function Nl(){var t;return t=Cl().m(function t(e){var n,r,i,o;return Cl().w(function(t){for(;;)switch(t.n){case 0:if(n=e.saplingId,r=e.editable,i=e.useVisibleText,"SDK"!==d.MODE){t.n=2;break}if(Sapling.userToggleEnabled){t.n=1;break}return t.a(2);case 1:t.n=3;break;case 2:if(we(r)||"sapling-embedded-editable"===r.id){t.n=3;break}return t.a(2);case 3:if(o=H(r)){t.n=4;break}return t.a(2);case 4:if(xs(o),!jl[n]){t.n=5;break}return t.a(2);case 5:return jl[n]=!0,t.n=6,qi(r,i||!1);case 6:zi(n),delete jl[n];case 7:return t.a(2)}},t)}),Nl=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){kl(o,r,i,a,s,"next",t)}function s(t){kl(o,r,i,a,s,"throw",t)}a(void 0)})},Nl.apply(this,arguments)}function Bl(t){Ae(t.editable)&&(t.hasOwnProperty("saplingId")?si(t.editable,t.saplingId):si(t.editable,t.textAreaId))}var Pl=Re().wrap(Re().memoize(function(){return Re().debounce(Il,250,{leading:!1,trailing:!0})},Re().property("id")),function(t,e){return t(e)(e)}),Rl=Re().wrap(Re().memoize(function(){return Re().debounce(Bl,50,{leading:!1,trailing:!0})},Re().property("id")),function(t,e){return t(e)(e)}),Ll=Re().wrap(Re().memoize(function(){return Re().debounce(Ws,20,{leading:!1,trailing:!0})},Re().property("id")),function(t,e){return t(e)(e)});function Ml(t){if("characterData"!==t.type)return!1;var e=t.target.data.replace(/\u00A0/g," "),n=t.oldValue.replace(/\u00A0/g," ");if(!e.startsWith(n))return!1;var r=e.substring(n.length);return!!Fn().startsWith(r)}var Hl=Re().wrap(Re().memoize(function(){return Re().debounce(function(t){!function(t){if(hs[t]){var e=hs[t].edits;Object.keys(e).forEach(function(n){var r=e[n];Ho(r.editRange,r.edit,!1)||Ts(t,n)})}}(t),Gs(t),Bo()},50,{leading:!1,trailing:!0})}),function(t,e){return t(e)(e)});function Ul(t,e){El(t).on("focus click keyup",function(n){"keyup"===n.type?"ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"ArrowUp"!==n.key&&"ArrowDown"!==n.key||Pl({saplingId:e,editable:t}):(Pl({saplingId:e,editable:t}),"focus"===n.type&&pc())}),ft(e,t,!1,"jqueryObservers",t)}function zl(t,e){for(var n=k(t),r=0;r<n.length;r+=1){var i=n[r];El(i).on("scroll",function(){Gs(e),Pl({saplingId:e,editable:t,useVisibleText:!0}),So()}),ft(e,t,!1,"jqueryObservers",i)}}function ql(t,e){var n=new MutationObserver(function(n){!function(t,e,n){for(var r=!1,i=0;i<n.length;i+=1){var o=n[i];if(Pl({saplingId:e,editable:t}),"characterData"!==o.type||r){if("childList"===o.type)Ns(e,o),z(t)||(Ml(o)?jn(t):(Cn(),Rl({saplingId:e,editable:t})));else if("attributes"===o.type&&"contenteditable"===o.attributeName){var a=t.getAttribute("contenteditable");"DIV"!==t.tagName||z(t)||"true"===a||""===a||"plaintext-only"===a||Wl(t,!1)}}else Bs(e,o),z(t)||(Ml(o)?jn(t):(Cn(),Rl({saplingId:e,editable:t}))),r=!0}Hl(e)}(t,e,n)});n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0,characterDataOldValue:!0}),ft(e,t,!1,"mutationObservers",n)}function Wl(t,e){var n=t.getAttribute("sapling-input-id");n&&(ms(n),pt(n,e));var r=H(t);if(ms(r),e){var i=z(t);i&&(pt(i,e),lu(t)),delete Fl[i]}else r&&(pt(r,e),$s(r),function(t){t in Mi&&delete Mi[t]}(r)),delete Tl[r];(function(t){return gs&&gs.containerId===t})(r)&&So(),ju()}var Gl=Re().throttle(function(t){Object.keys(Tl).forEach(function(t){var e,n=Tl[t];void 0===n||n.classList.contains("wysihtml5-editor")||(Q(n)?(Es(e=n),Gs(H(e)),document.activeElement===n&&Fn()&&Tn(n,Fn())):Wl(n,!0))}),Object.keys(Fl).forEach(function(t){var e=Fl[t];void 0!==e&&(Q(e)?Es(ou(e)):Wl(e,!0))})},30,{leading:!1,trailing:!0}),$l=new an(function(t){requestAnimationFrame(function(){Gl(t)})});function Yl(t){var e=Z(t);if(void 0!==e){var n,r,i=z(e);if(i)su(i,e.value),"input"===t.type&&(n=t.data,r=Fn(),n&&r.startsWith(n)?jn(e):(Cn(),Rl({textAreaId:i,editable:e})))}}function Xl(t){var e=z(t),n={passive:!0,once:!1};t.addEventListener("input",Yl,n),ft(e,t,!0,"eventListeners",{element:t,event:"input",handler:Yl,options:n}),t.addEventListener("keyup",Yl,n),ft(e,t,!0,"eventListeners",{element:t,event:"keyup",handler:Yl,options:n})}function Vl(t,e){for(var n=k(t),r=0;r<n.length;r+=1){var i=n[r];z(i)===e?El(i).on("scroll",function(){uu(e)}):El(i).on("scroll",function(){cu(e)}),ft(e,t,!0,"jqueryObservers",i)}}var Kl=function(){setTimeout(wo,100)};function Jl(t){if("SDK"===d.MODE||we(t)||Ae(t)||"sapling-embedded-editable"===t.id){var e=H(t);if(!e||!(e in Tl)){var n=U(t,e);Tl[n]=t,Es(t),ql(t,n),$l.observe(t),ft(n,t,!1,"resizeObservers",{container:t,observer:$l}),Ql(n,t,!1),Ul(t,n),Zl(n,t,!1),zl(t,n),of(t),Il({saplingId:n,editable:t,useVisibleText:!1})}}}function Ql(t,e,n){El(e).on("keypress",function(t){if(yc(e,t.key))return!1});var r=Ae(e);El(e).on("keydown",function(t){if("Tab"===t.key){if(!!Ao(d.CONTROL_ELEMENT).attr("sapling-edit-id")&&(Ao("#accept-button",Co).focus(),!0))return!1}else{if(!gc(e,t.key))return!1;Ll(e)}r&&(L(e),In(t,e)),Ce()&&Kl()}),ft(t,e,n,"jqueryObservers",e)}function Zl(t,e,n){El(e).on("click",function(t){qs(e)}),ft(t,e,n,"eventListeners",{element:e,event:"click",handler:qs})}function tf(t){if(we(t)||Ae(t)){var e=El(t).attr("onfocus");if(!e||!e.includes("(this).hide()")){var n=z(t);if(n&&n in Fl)su(n,t.value);else{var r=q(t);Fl[r]=t;var i=ou(t);Xl(t),$l.observe(t),ft(r,t,!0,"resizeObservers",{container:t,observer:$l}),Vl(t,r),Ql(n,t,!0),Zl(n,t,!0),su(r,t.value),uu(r),Jl(i),U(t,H(i))}}}}var ef=Re().throttle(function(t){for(var e=null,n=0,r=Object.entries(hs);n<r.length;n++){var i=cs(r[n],2),o=i[0],a=i[1],s=a.edits,u=a.overlayDomElement,c=a.annotationsOverlay;if(s){for(var l=[],f=0,p=Object.values(s);f<p.length;f++){var d=p[f],h=d.edit,g=d.editRange,v=d.isHover;if((!h.category||c&&c.editsVisible)&&!h.fillin){if(v&&zs(t)){l=[d];break}Ms(g,o,t)&&l.push(d)}}if(l.length)e={editInfo:Wa(l),containerId:o,overlayDomElement:u,annotationsOverlay:c};Ls(o,t)&&a.badge.showBadgeDashboard()}}var y=!1;if(e){var m=e,b=m.editInfo,D=m.containerId,w=m.overlayDomElement,x=m.annotationsOverlay;y=Us(b.edit.editId,D,b,x,w)}y?Po():Lo()},100,{leading:!1,trailing:!0});function nf(t,e){for(var n=0;n<t.length;n+=1){if(t[n].id===e)return!0}return!1}function rf(t){var e=t.path;e&&(dc(),(nf(e,"accept-button")||nf(e,"ignore-button")||nf(e,"explanations"))&&t.preventDefault())}function of(t){if(document!==t.ownerDocument&&"SDK"===d.MODE){Sapling.injectCSS(t.ownerDocument);var e={passive:!0};t.ownerDocument.addEventListener("mousemove",ef,e),ct({element:document,event:"mousemove",handler:ef,options:e}),t.ownerDocument.addEventListener("mousedown",rf,{}),ct({element:document,event:"mousedown",handler:rf,options:{}})}}function af(t){dc();var e=Z(t);"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")||"plaintext-only"===e.getAttribute("contenteditable")?Jl(e):ye(e)&&tf(e),Object.keys(it).forEach(function(t){Q(it[t].domElement)||pt(t,!1)}),Object.keys(ot).forEach(function(t){Q(ot[t].domElement)||pt(t,!0)})}function sf(){var t={passive:!0};document.addEventListener("selectionchange",Kl,t),ct({element:document,event:"selectionchange",handler:Kl,options:t}),document.addEventListener("selectionchange",xo,t),ct({element:document,event:"selectionchange",handler:xo,options:t})}function uf(t){return!!(El(t).is(":focus")||""!==t.textContent&&El(t).is(":visible"))}function cf(t){for(var e=0;e<t.length;e+=1){var n=t[e];if("childList"===n.type){for(var r=0;r<n.addedNodes.length;r+=1){var i=n.addedNodes[r];"IFRAME"===i.tagName?Pn(El(i),function(){gt("init/NEW_IFRAME_LOADED")}):El("iframe",i).each(function(t,e){Pn(El(e),function(){gt("init/NEW_IFRAME_LOADED")})})}for(var o=0;o<n.removedNodes.length;o+=1){var a=n.removedNodes[o];if(a.nodeType===Node.ELEMENT_NODE&&(V(a)||ye(a)))Wl(a,ye(a))}}}}function lf(){if(y().includes(d.WEBSITE_HOSTNAME)){var t=document.getElementById("logout-button");t&&t.addEventListener("click",function(){gt("request/LOGOUT_USER",{},function(){oe(!0)},function(){oe(!0)})});var e=document.getElementById("login-button");e&&e.addEventListener("click",function(){var t,e;gt("request/CLEAR_USER",t,e)})}}function ff(){if(d.AI_DETECT_ANYWHERE_EXTENSION)return fo(),void sf();var t;if(function(){"SDK"!==d.MODE&&(y(),El("iframe").each(function(t,e){try{Pn(El(e),function(){return gt("init/NEW_IFRAME_LOADED")})}catch(t){}}));var t=document.body;if(t){if("SDK"!==d.MODE){var e=new MutationObserver(cf);e.observe(t,{attributes:!1,childList:!0,subtree:!0}),lt(e)}$l.observe(t),lt($l)}}(),t={passive:!0},document.addEventListener("mousemove",ef,t),ct({element:document,event:"mousemove",handler:ef,options:t}),document.addEventListener("mousedown",rf,{}),ct({element:document,event:"mousedown",handler:rf,options:{}}),"SDK"!==d.MODE){lf(),function(){var t={passive:!0};document.addEventListener("focusin",af,t),ct({element:document,event:"focusin",handler:af,options:t}),document.addEventListener("focusout",Cn,t),ct({element:document,event:"focusout",handler:Cn,options:t}),document.addEventListener("focusout",ju,t),ct({element:document,event:"focusout",handler:ju,options:t})}(),sf(),function(){var t="textarea";je()&&(t='textarea,input[type="text"]'),El(t).each(function(t,e){uf(e)&&tf(e)}),El("[contenteditable=true], [contenteditable=plaintext-only]").each(function(t,e){uf(e)&&Jl(e)});var e=J(function(t){return X(t,je())});El(e).each(function(t,e){uf(e)&&tf(e)});var n=J(V);El(n).each(function(t,e){uf(e)&&Jl(e)})}(),wl(Jl,Il),pc();try{cl(su)}catch(t){}}}function pf(t){var e=H(t);e&&e in Tl||(e=U(t),Tl[e]=t,$l.observe(t),ft(e,t,!1,"resizeObservers",{container:t,observer:$l}),Ul(t,e),Zl(e,t,!1),zl(t,e),of(t)),Es(t),Il({saplingId:e,editable:t,useVisibleText:!1})}function df(t){var e=z(t);e&&e in Fl||(e=q(t),Fl[e]=t,Xl(t),$l.observe(t),ft(e,t,!0,"resizeObservers",{container:t,observer:$l}),Vl(t,e),Ql(e,t,!0),Zl(e,t,!0),uu(e)),su(e,t.value),pf(ou(t))}var hf=n(216);function gf(t){return gf="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},gf(t)}function vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function yf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vf(Object(n),!0).forEach(function(e){mf(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vf(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function mf(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=gf(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=gf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==gf(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var bf=null;function Df(){return{version:Tf(),source:"SDK",hostname:y(),pathname:m(),frame_hostname:window.location.hostname}}function wf(t){var e=t.sentence.substring(t.start,t.end),n={offset:t.start+t.sentence_start,text:e},r={offset:t.end+t.sentence_start,text:e},i=t;return i.replacement_text=t.replacement,i.original_text=e,i.start=n,i.end=r,i.replacement_text=t.replacement,"Advanced Edit"===t.general_error_type&&(i.category=t.error_type),i}function xf(t){var e=t.type,n=t.url,r=t.contentType,i=t.dataType,o=t.data,a=t.xhrFields,s=t.success,u=t.error,c=Date.now();hf.ajax({type:e,url:n,contentType:r||"application/json",dataType:i||"json",data:o,xhrFields:a||{},success:s||function(){},error:u||function(){},complete:function(t){return function(t){var e=t.startTime,n=t.status,r=t.url;if(!Sapling.telemetryEndpoint)return;var i={status:n,latency:Date.now()-e,url:r};try{hf.ajax({type:"post",url:Sapling.telemetryEndpoint,contentType:"application/json",dataType:"json",data:JSON.stringify(i)})}catch(t){}}({startTime:c,status:t.status,url:n,data:o})}})}function Af(t){if(Sapling.key){var e=Df();e.hostname=y(),e.pathname=m();var n={name:t,key:Sapling.key,event_properties:e},r="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/events");try{xf({type:"post",url:r,contentType:"application/json",dataType:"json",data:JSON.stringify(n)})}catch(t){}}}function Ef(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:y())===d.WEBSITE_HOSTNAME||Sapling.freemium&&Boolean(Sapling.freemiumUseCookies)}function Cf(t,e,n,r){var i=Ef(y()),o="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.editPathname),a={key:Sapling.key,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,text:t,noformat:!0,lang:Sapling.lang,variety:Sapling.variety,advanced_edits:Sapling.advancedEdits,operations:Sapling.operations,freemium:Sapling.freemium,context:e};Sapling.appearance.compact||(a.sdk_extended=!0),Sapling.addToDictionary&&(a.sdk_dictionary=!0),Sapling.freemium&&Sapling.userPropertiesLoaded&&!Be()&&delete a.advanced_edits,null!==Sapling.userData&&(a.userData=Sapling.userData),null!==Sapling.neuralSpellcheck&&(a.neural_spellcheck=Sapling.neuralSpellcheck),null!==Sapling.minLength&&(a.min_length=Sapling.minLength),null!==Sapling.medical&&(a.medical=Sapling.medical),xf({type:"post",url:o,contentType:"application/json",dataType:"json",data:JSON.stringify(a),xhrFields:{withCredentials:i},success:function(t){var e;e=t.edits&&t.edits[0]&&t.edits[0].error_type?function(t){for(var e=[],n=0;n<t.length;n++){var r=wf(t[n]);e.push(r)}return e}(t.edits):t,n({data:{edits:e},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}var Sf={"assets/sapling-176x176.svg":"https://sapling.ai/static/img/logos/sapling-176x176.svg","fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/fa-spinner-solid.svg":"https://sapling.ai/static/img/fa/fa-spinner-solid.svg","assets/fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/xmark-solid.svg":"https://sapling.ai/static/img/xmark-solid.svg","assets/spinner-solid.svg":"https://sapling.ai/static/img/spinner-solid.svg","assets/thumbs-up-regular.svg":"https://sapling.ai/static/img/thumbs-up-regular.svg","assets/thumbs-down-regular.svg":"https://sapling.ai/static/img/thumbs-down-regular.svg","assets/power.svg":"https://sapling.ai/static/img/power.svg"};function _f(t){return"SDK"!==d.MODE?chrome.runtime.getURL(t):t in Sf?Sf[t]:t}function Of(){var t,e;"SDK"===d.MODE&&(Sapling.userToggle&&(t=Sf["assets/power.svg"],(e=document.createElement("link")).rel="preload",e.as="image",e.href=t,document.head.appendChild(e)))}function kf(t){"SDK"!==d.MODE&&chrome.storage.sync.set(t)}function Tf(){return"SDK"!==d.MODE?chrome.runtime.getManifest().version:""}function Ff(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("SDK"===d.MODE){var r=t.data,i=t.action,o=yf(yf({},Df()),r.context);"request/GET_EDITS"===i?Cf(r.html,o,e,n):"request/GET_COMPLETION"===i?function(t,e,n,r){var i={query:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.completePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{completion:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.query,o,e,n):"request/GET_SHORTCUT_SNIPPETS"===i&&Sapling.snippets?function(t,e){if(bf)t({data:bf,status:!0,success:!0});else if(y()===d.WEBSITE_HOSTNAME){var n=(new Date).getTimezoneOffset();xf({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/snippets/shortcut_snippets?timeZoneOffset=").concat(n),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(e){bf=e.snippets,t({data:bf,status:!0,success:!0})},error:function(t){e(t.responseJSON)}})}else e({})}(e,n):"request/GET_STATISTICS"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.statisticsPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{statistics:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_EDIT"===i?function(t,e,n){if("accept"===e||"reject"===e){var r={context:n,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key,freemium:Sapling.freemium},i=Ef();xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/edits/").concat(t,"/").concat(e),contentType:"application/json",dataType:"json",data:JSON.stringify(r),xhrFields:{withCredentials:i}})}}(r.editHash,r.action,o):"request/GET_AI_DETECTION_SCORES"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.aiDetectPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{aidetect:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/GET_TONE"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.tonePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{tone:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_TONE_FEEDBACK"===i?function(t,e,n,r,i,o,a){var s={html:t,text_type:n,tone_percentage:parseInt(100*e[0]),tone_name:e[1],score:r,context:i,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.toneFeedbackPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(s),success:function(t){o({data:{tone:t},status:!0,success:!0})},error:function(t){a(t.responseJSON)}})}(r.html,r.toneData,r.textType,r.score,o,e,n):"request/GET_USER"===i?function(){var t=y();if(t===d.WEBSITE_HOSTNAME||Sapling.freemium){var e=Ef(t);xf({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/users/me"),contentType:"application/json",xhrFields:{withCredentials:e},success:function(t){ae(t),Sapling.userPropertiesLoaded=!0},error:function(t){}})}}():"request/POST_DICTIONARY"===i&&function(t){var e={entry:t,case_sensitive:!1,key:Sapling.key},n=Ef();xf({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/dictionary"),contentType:"application/json",dataType:"json",data:JSON.stringify(e),xhrFields:{withCredentials:n}})}(r.entry)}else chrome.runtime.sendMessage(t,function(t){chrome.runtime.lastError&&n&&n({message:chrome.runtime.lastError}),e&&e(t)})}function jf(t){return new Promise(function(e,n){Ff(t,function(t){e(t)},function(t){n(t)})})}function If(t,e){localStorage.setItem(t,e);var n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="".concat(t,"=").concat(e,"; expires=").concat(n.toUTCString())}function Nf(t){var e=document.cookie.split("; ").find(function(e){return e.trim().startsWith(t)});if(e){var n=e.split("=")[1];if(n&&n.trim().length>0)return n}var r=localStorage.getItem(t);return r&&r.trim().length>0?r:null}var Bf=n(216);function Pf(t){return Pf="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},Pf(t)}function Rf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Lf(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lf(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Mf={addToDictionary:!1,advancedEdits:{advanced_edits:!1},aiDetectPathname:"/api/v1/aidetect",annotationsEnabled:!1,autocomplete:!1,autoShowAdvancedEdits:!1,autoShowAnnotations:!1,checkButton:!1,completePathname:"/api/v1/complete",editActionPathname:"",editPathname:"/api/v1/edits",endpointHostname:"https://api.sapling.ai",edits:!0,ignoreText:"Ignore",isAnonUser:!1,lang:"en",lightningCompat:!1,lightningCompatLeft:0,lightningCompatTop:0,medical:null,mode:"prod",neuralSpellcheck:null,minLength:null,operations:[],saplingPathPrefix:"",shadowRoot:!0,snippets:!1,statisticsPathname:"/api/v1/statistics",statusBadge:!0,toneEnabled:!1,toneFeedbackEnabled:!1,toneFeedbackPathname:"/api/v1/tone/feedback",tonePathname:"/api/v1/tone",userData:null,userId:"",userToggle:!1,userToggleEnabled:null,variety:null,telemetryEndpoint:null,freemium:!1,freemiumUseCookies:!1,customStyles:{badgeTooltipLeft:!1},appearance:{compact:!0,variables:{acceptText:"Accept",ignoreText:"Ignore",badgeSize:null,badgeMargin:null,badgeColor:null,badgeErrorColor:null},customCSS:""}};function Hf(t,e){for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=Rf(i[r],2),a=o[0],s=o[1];a in e?"object"===Pf(s)&&"object"===Pf(e[a])?n[a]=Hf(s,e[a]):n[a]=e[a]:n[a]=s}return n}function Uf(t){var e=t.createElement("style");e.textContent="@font-face {\n font-family: 'icomoon';\n src: url(data:application/font-woff;base64,d09GRgABAAAAAAYkAAsAAAAABdgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIM5GNtYXAAAAFoAAAAXAAAAFzwrfDAZ2FzcAAAAcQAAAAIAAAACAAAABBnbHlmAAABzAAAAggAAAIIgIUPmmhlYWQAAAPUAAAANgAAADYbiHinaGhlYQAABAwAAAAkAAAAJAe0A8hobXR4AAAEMAAAABwAAAAcESUAkmxvY2EAAARMAAAAEAAAABAA4AF0bWF4cAAABFwAAAAgAAAAIAAMAD9uYW1lAAAEfAAAAYYAAAGGmUoJ+3Bvc3QAAAYEAAAAIAAAACAAAwAAAAMDSQGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8HEDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAEAAAAAMAAgAAgAEAAEAIPAN8HH//f//AAAAAAAg8Azwcf/9//8AAf/jD/gPlQADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAJAAAARQGBwEOASMiJicBLgE1NDY/AT4BMzIWHwEBPgEzMhYfAR4BFQO7CAj+FAcVCgsVB/7jCAgICE4IFAsKFQioAXYIFQoLFAhOCAgCcwoVB/4UCAgICAEdBxULChUHTggICAioAXcICAgITgcVCwAAAQA/AD8C5gLmADwAACUUBg8BDgEjIiYvAQcOASMiJi8BLgE1NDY/AScuATU0Nj8BPgEzMhYfATc+ATMyFh8BHgEVFAYPARceARUC5gkHTggUCwsUCKioBxULChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwnDChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwkJB04IFAsLFAioqAcVCwAAAAQADv/AA/IDwAADABUAIQAvAAAJASEBNSIGBwEGFjMhMjYnMQEuASMxExQGIyImNTQ2MzIWJyImPQE0NjMyFh0BFAYCAAGt/KYBrREfDf5LGSUzA2YzJRn+Sw0fEUAlGxslJRsbJUAbJSUbGyUlA2P8qQNXXRYX/JksQEAsA2cXFvzAGyUlGxslJWUlG8AbJSUbwBslAAAAAQAAAAEAAKB25qVfDzz1AAsEAAAAAADcO5oVAAAAANw7mhUAAP/AA/IDwAAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAAD8gABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAPwQAAA4AAAAAAAoAFAAeAFwAuAEEAAEAAAAHAD0ABAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA);\n font-weight: normal;\n font-style: normal;\n}\n\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^=\"icon-sapling-\"], [class*=\" icon-sapling-\"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'icomoon' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.icon-sapling-accept:before {\n font-family: 'icomoon' !important;\n content: \"\\f00c\";\n}\n.icon-sapling-close:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-remove:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-reject:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n",t.head.appendChild(e)}function zf(t){Sapling.userToggleEnabled=t,If("sapling-sdk-user-toggle-enabled",t),t?function(){for(var t=0,e=Object.entries(Tl);t<e.length;t++){var n=_l(e[t],2);Il({saplingId:n[0],editable:n[1],useVisibleText:!1})}for(var r=0,i=Object.entries(Fl);r<i.length;r++){var o=_l(i[r],2);su(o[0],o[1].value)}}():function(){for(var t=0,e=Object.entries(hs);t<e.length;t++){for(var n=cs(e[t],2),r=(n[0],n[1]),i=0,o=Object.entries(r.edits);i<o.length;i++){var a,s=cs(o[i],2),u=(s[0],fs(s[1].domElements));try{for(u.s();!(a=u.n()).done;)a.value.remove()}catch(t){u.e(t)}finally{u.f()}}r.edits={}}}()}var qf={};window&&void 0===window.Sapling&&(qf.init=function(t){for(var e,n,r=Hf(Mf,t),i=0,o=Object.entries(r);i<o.length;i++){var a=Rf(o[i],2),s=a[0],u=a[1];Sapling[s]=u}if(t.userId||(Sapling.userId=function(){var t="sapling-sdk-anon-user-id",e=Nf(t);return e&&"null"!=e||(e="anon-".concat(f())),If(t,e),e}(),Sapling.isAnonUser=!0),Sapling.saplingPathPrefix.length&&!Sapling.saplingPathPrefix.startsWith("/")&&(Sapling.saplingPathPrefix="/".concat(Sapling.saplingPathPrefix)),Ie(t.lang),"key"in t&&("dev"===Sapling.mode||t.key&&t.key.includes("."))&&(Sapling.key=t.key),Sapling.sessionId=f(),e=window.location.href,n=new h(e),g=n.hostname||window.location.hostname,v=n.pathname||window.location.pathname,Sapling.freemium&&oe(!0),ff(),Af("sdk-init"),"headers"in t&&Bf.ajaxSetup({beforeSend:function(e){for(var n=0,r=Object.entries(t.headers);n<r.length;n++){var i=Rf(r[n],2),o=i[0],a=i[1];e.setRequestHeader(o,a)}}}),Sapling.autoShowAnnotations&&(Sapling.autoShowAdvancedEdits=!0),Sapling.annotationsEnabled&&(Sapling.advancedEdits.advanced_edits=!0),Sapling.userToggle){if(null===Sapling.userToggleEnabled){var c=Nf("sapling-sdk-user-toggle-enabled");if(null!==c){var l="true"===String(c).toLowerCase();Sapling.userToggleEnabled=l}}}else Sapling.userToggleEnabled=!0;Sapling.setUserToggleEnabled=zf,Sapling.injectCSS=Uf,Uf(document),Of()},qf.observe=function(t){if(!t)throw new Error("Sapling.observe must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())tf(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.observe must be called on input of type="text".');tf(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,tf(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.observe must be called on textarea, contenteditable, or input.");Jl(t)}},qf.unobserve=function(t){if(!t)throw new Error("Sapling.unobserve must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())Wl(t,!0);else if("input"===t.nodeName.toLowerCase())Wl(t,!0);else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Wl(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.unobserve must be called on textarea, contenteditable, or input.");Wl(t,!1)}},qf.checkOnce=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{aiDetect:!1}).aiDetect;if(!t)throw new Error("Sapling.checkOnce must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())df(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.checkOnce must be called on input of type="text".');df(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,df(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.checkOnce must be called on textarea, contenteditable, or input.");pf(t)}if(e){var n=function(t){var e=H(t);if(e){var n=hs[e]||{edits:{}},r=n.shadowHost,i=n.badge;return n.aiDetectOverlay||(n.aiDetectOverlay=new za(r,e,i),n.aiDetectOverlay.createUIElements()),{containerId:e,aiDetectOverlay:n.aiDetectOverlay}}}(t),r=n.containerId,i=n.aiDetectOverlay;!function(t){var e=hs[t];e&&e.aiDetectOverlay&&e.aiDetectOverlay.queryAndUpdate()}(r),i.initForCheckOnce()}},window.Sapling=qf);var Wf=qf},216(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=n(e,!0):n(e)}("undefined"!=typeof window?window:this,function(r,i){"use strict";if(!r.document)throw new Error("jQuery requires a window with a document");var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},c=o.push,l=o.indexOf,f={},p=f.toString,d=f.hasOwnProperty,h=d.toString,g=h.call(Object),v={};function y(t){return null==t?t+"":"object"==typeof t?f[p.call(t)]||"object":typeof t}function m(t){return null!=t&&t===t.window}function b(t){var e=!!t&&t.length,n=y(t);return"function"!=typeof t&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}var D=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i=(n=n||D).createElement("script");for(r in i.text=t,w)e&&e[r]&&(i[r]=e[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var A="4.0.0",E=/HTML$/i,C=function(t,e){return new C.fn.init(t,e)};function S(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}C.fn=C.prototype={jquery:A,constructor:C,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(C.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()}},C.extend=C.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"!=typeof a&&"function"!=typeof a&&(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(c&&r&&(C.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||C.isPlainObject(n)?n:{},i=!1,a[e]=C.extend(c,o,r)):void 0!==r&&(a[e]=r));return a},C.extend({expando:"jQuery"+(A+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==p.call(t))&&(!(e=a(t))||"function"==typeof(n=d.call(e,"constructor")&&e.constructor)&&h.call(n)===g)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(b(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=C.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(b(Object(t))?C.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!E.test(e||n&&n.nodeName||"HTML")},contains:function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(b(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=o[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){f["[object "+e+"]"]=e.toLowerCase()});var _=o.pop,O="[\\x20\\t\\r\\n\\f]",k=D.documentMode,T=k&&new RegExp(":enabled|:disabled|\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")"),F=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),j="(?:\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",I=new RegExp("^"+O+"*([>+~]|"+O+")"+O+"*"),N=new RegExp(O+"|>"),B=/[+~]/,P=D.documentElement,R=P.matches||P.msMatchesSelector;function L(){var t=[];return function e(n,r){return t.push(n+" ")>C.expr.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function M(t){return t&&void 0!==t.getElementsByTagName&&t}var H="\\["+O+"*("+j+")(?:"+O+"*([*^$|!~]?=)"+O+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+j+"))|)"+O+"*\\]",U=":("+j+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",z={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+U),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i")},q=new RegExp(U),W=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),G=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function $(t){return t.replace(W,G)}function Y(t){C.error("Syntax error, unrecognized expression: "+t)}var X=new RegExp("^"+O+"*,"+O+"*"),V=L();function K(t,e){var n,r,i,o,a,s,u,c=V[t+" "];if(c)return e?0:c.slice(0);for(a=t,s=[],u=C.expr.preFilter;a;){for(o in n&&!(r=X.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=I.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(F," ")}),a=a.slice(n.length)),z)!(r=C.expr.match[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Y(t):V(t,s).slice(0)}var J={ATTR:function(t){return t[1]=$(t[1]),t[3]=$(t[3]||t[4]||t[5]||""),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Y(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Y(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=K(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}};function Q(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Z(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===y(n))for(s in i=!0,n)Z(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,"function"!=typeof r&&(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(C(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:c?e.call(t):u?e(t[0],n):o}var tt=/[^\x20\t\r\n\f]+/g;C.fn.extend({attr:function(t,e){return Z(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){C.removeAttr(this,t)})}}),C.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?C.prop(t,e,n):(1===o&&C.isXMLDoc(t)||(i=C.attrHooks[e.toLowerCase()]),void 0!==n?null===n||!1===n&&0!==e.toLowerCase().indexOf("aria-")?void C.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=t.getAttribute(e))??void 0)},attrHooks:{},removeAttr:function(t,e){var n,r=0,i=e&&e.match(tt);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),k&&(C.attrHooks.type={set:function(t,e){if("radio"===e&&S(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}});var et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function nt(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}C.escapeSelector=function(t){return(t+"").replace(et,nt)};var rt,it=o.sort,ot=o.splice;function at(t,e){if(t===e)return rt=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)?t==D||t.ownerDocument==D&&C.contains(D,t)?-1:e==D||e.ownerDocument==D&&C.contains(D,e)?1:0:4&n?-1:1)}C.uniqueSort=function(t){var e,n=[],r=0,i=0;if(rt=!1,it.call(t,at),rt){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)ot.call(t,n[r],1)}return t},C.fn.uniqueSort=function(){return this.pushStack(C.uniqueSort(s.apply(this)))};var st,ut,ct,lt,ft,pt=0,dt=0,ht=L(),gt=L(),vt=L(),yt=new RegExp(O+"+","g"),mt=new RegExp("^"+j+"$"),bt=C.extend({needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},z),Dt=/^(?:input|select|textarea|button)$/i,wt=/^h\d$/i,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,At=function(){Ft()},Et=It(function(t){return!0===t.disabled&&S(t,"fieldset")},{dir:"parentNode",next:"legend"});function Ct(t,e,n,r){var i,o,a,s,u,l,f,p=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&(Ft(e),e=e||ct,ft)){if(11!==d&&(u=xt.exec(t)))if(i=u[1]){if(9===d)return(a=e.getElementById(i))&&c.call(n,a),n;if(p&&(a=p.getElementById(i))&&C.contains(e,a))return c.call(n,a),n}else{if(u[2])return c.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return c.apply(n,e.getElementsByClassName(i)),n}if(!(vt[t+" "]||T&&T.test(t))){if(f=t,p=e,1===d&&(N.test(t)||I.test(t))){for(((p=B.test(t)&&M(e.parentNode)||e)!=e||k)&&((s=e.getAttribute("id"))?s=C.escapeSelector(s):e.setAttribute("id",s=C.expando)),o=(l=K(t)).length;o--;)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);f=l.join(",")}try{return c.apply(n,p.querySelectorAll(f)),n}catch(e){vt(t,!0)}finally{s===C.expando&&e.removeAttribute("id")}}}return Mt(t.replace(F,"$1"),e,n,r)}function St(t){return t[C.expando]=!0,t}function _t(t){return function(e){return S(e,"input")&&e.type===t}}function Ot(t){return function(e){return(S(e,"input")||S(e,"button"))&&e.type===t}}function kt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Et(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function Tt(t){return St(function(e){return e=+e,St(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function Ft(t){var e,n=t?t.ownerDocument||t:D;n!=ct&&9===n.nodeType&&(lt=(ct=n).documentElement,ft=!C.isXMLDoc(ct),k&&D!=ct&&(e=ct.defaultView)&&e.top!==e&&e.addEventListener("unload",At))}for(st in Ct.matches=function(t,e){return Ct(t,null,null,e)},Ct.matchesSelector=function(t,e){if(Ft(t),ft&&!vt[e+" "]&&(!T||!T.test(e)))try{return R.call(t,e)}catch(t){vt(e,!0)}return Ct(e,ct,null,[t]).length>0},C.expr={cacheLength:50,createPseudo:St,match:bt,find:{ID:function(t,e){if(void 0!==e.getElementById&&ft){var n=e.getElementById(t);return n?[n]:[]}},TAG:function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},CLASS:function(t,e){if(void 0!==e.getElementsByClassName&&ft)return e.getElementsByClassName(t)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:J,filter:{ID:function(t){var e=$(t);return function(t){return t.getAttribute("id")===e}},TAG:function(t){var e=$(t).toLowerCase();return"*"===t?function(){return!0}:function(t){return S(t,e)}},CLASS:function(t){var e=ht[t+" "];return e||(e=new RegExp("(^|"+O+")"+t+"("+O+"|$)"))&&ht(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=C.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(yt," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!u&&!s,m=!1;if(g){if(o){for(;h;){for(f=e;f=f[h];)if(s?S(f,v):1===f.nodeType)return!1;d=h="only"===t&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&y){for(m=(p=(c=(l=g[C.expando]||(g[C.expando]={}))[t]||[])[0]===pt&&c[1])&&c[2],f=p&&g.childNodes[p];f=++p&&f&&f[h]||(m=p=0)||d.pop();)if(1===f.nodeType&&++m&&f===e){l[t]=[pt,p,m];break}}else if(y&&(m=p=(c=(l=e[C.expando]||(e[C.expando]={}))[t]||[])[0]===pt&&c[1]),!1===m)for(;(f=++p&&f&&f[h]||(m=p=0)||d.pop())&&(!(s?S(f,v):1===f.nodeType)||!++m||(y&&((l=f[C.expando]||(f[C.expando]={}))[t]=[pt,m]),f!==e)););return(m-=i)===r||m%r===0&&m/r>=0}}},PSEUDO:function(t,e){var n=C.expr.pseudos[t]||C.expr.setFilters[t.toLowerCase()]||Y("unsupported pseudo: "+t);return n[C.expando]?n(e):n}},pseudos:{not:St(function(t){var e=[],n=[],r=Lt(t.replace(F,"$1"));return r[C.expando]?St(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:St(function(t){return function(e){return Ct(t,e).length>0}}),contains:St(function(t){return t=$(t),function(e){return(e.textContent||C.text(e)).indexOf(t)>-1}}),lang:St(function(t){return mt.test(t||"")||Y("unsupported lang: "+t),t=$(t).toLowerCase(),function(e){var n;do{if(n=ft?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===lt},focus:function(t){return t===ct.activeElement&&ct.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:kt(!1),disabled:kt(!0),checked:function(t){return S(t,"input")&&!!t.checked||S(t,"option")&&!!t.selected},selected:function(t){return k&&t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!C.expr.pseudos.empty(t)},header:function(t){return wt.test(t.nodeName)},input:function(t){return Dt.test(t.nodeName)},button:function(t){return S(t,"input")&&"button"===t.type||S(t,"button")},text:function(t){return S(t,"input")&&"text"===t.type},first:Tt(function(){return[0]}),last:Tt(function(t,e){return[e-1]}),eq:Tt(function(t,e,n){return[n<0?n+e:n]}),even:Tt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:Tt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:Tt(function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t}),gt:Tt(function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t})}},C.expr.pseudos.nth=C.expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.expr.pseudos[st]=_t(st);for(st in{submit:!0,reset:!0})C.expr.pseudos[st]=Ot(st);function jt(){}function It(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=dt++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var c,l,f=[pt,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(l=e[C.expando]||(e[C.expando]={}),i&&S(e,i))e=e[r]||e;else{if((c=l[o])&&c[0]===pt&&c[1]===s)return f[2]=c[2];if(l[o]=f,f[2]=t(e,n,u))return!0}return!1}}function Nt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function Bt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),c&&e.push(s)));return a}function Pt(t,e,n,r,i,o){return r&&!r[C.expando]&&(r=Pt(r)),i&&!i[C.expando]&&(i=Pt(i,o)),St(function(o,a,s,u){var f,p,d,h,g=[],v=[],y=a.length,m=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Ct(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),b=!t||!o&&e?m:Bt(m,g,t,s,u);if(n?n(b,h=i||(o?t:y||r)?[]:a,s,u):h=b,r)for(f=Bt(h,v),r(f,[],s,u),p=f.length;p--;)(d=f[p])&&(h[v[p]]=!(b[v[p]]=d));if(o){if(i||t){if(i){for(f=[],p=h.length;p--;)(d=h[p])&&f.push(b[p]=d);i(null,h=[],f,u)}for(p=h.length;p--;)(d=h[p])&&(f=i?l.call(o,d):g[p])>-1&&(o[f]=!(a[f]=d))}}else h=Bt(h===a?h.splice(y,h.length):h),i?i(null,a,h,u):c.apply(a,h)})}function Rt(t){for(var e,n,r,i=t.length,o=C.expr.relative[t[0].type],a=o||C.expr.relative[" "],s=o?1:0,u=It(function(t){return t===e},a,!0),c=It(function(t){return l.call(e,t)>-1},a,!0),f=[function(t,n,r){var i=!o&&(r||n!=ut)||((e=n).nodeType?u(t,n,r):c(t,n,r));return e=null,i}];s<i;s++)if(n=C.expr.relative[t[s].type])f=[It(Nt(f),n)];else{if((n=C.expr.filter[t[s].type].apply(null,t[s].matches))[C.expando]){for(r=++s;r<i&&!C.expr.relative[t[r].type];r++);return Pt(s>1&&Nt(f),s>1&&Q(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(F,"$1"),n,s<r&&Rt(t.slice(s,r)),r<i&&Rt(t=t.slice(r)),r<i&&Q(t))}f.push(n)}return Nt(f)}function Lt(t,e){var n,r=[],i=[],o=gt[t+" "];if(!o){for(e||(e=K(t)),n=e.length;n--;)(o=Rt(e[n]))[C.expando]?r.push(o):i.push(o);o=gt(t,function(t,e){var n=e.length>0,r=t.length>0,i=function(i,o,a,s,u){var l,f,p,d=0,h="0",g=i&&[],v=[],y=ut,m=i||r&&C.expr.find.TAG("*",u),b=pt+=null==y?1:Math.random()||.1;for(u&&(ut=o==ct||o||u);null!=(l=m[h]);h++){if(r&&l){for(f=0,o||l.ownerDocument==ct||(Ft(l),a=!ft);p=t[f++];)if(p(l,o||ct,a)){c.call(s,l);break}u&&(pt=b)}n&&((l=!p&&l)&&d--,i&&g.push(l))}if(d+=h,n&&h!==d){for(f=0;p=e[f++];)p(g,v,o,a);if(i){if(d>0)for(;h--;)g[h]||v[h]||(v[h]=_.call(s));v=Bt(v)}c.apply(s,v),u&&!i&&v.length>0&&d+e.length>1&&C.uniqueSort(s)}return u&&(pt=b,ut=y),g};return n?St(i):i}(i,r)),o.selector=t}return o}function Mt(t,e,n,r){var i,o,a,s,u,l="function"==typeof t&&t,f=!r&&K(t=l.selector||t);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===e.nodeType&&ft&&C.expr.relative[o[1].type]){if(!(e=(C.expr.find.ID($(a.matches[0]),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=bt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!C.expr.relative[s=a.type]);)if((u=C.expr.find[s])&&(r=u($(a.matches[0]),B.test(o[0].type)&&M(e.parentNode)||e))){if(o.splice(i,1),!(t=r.length&&Q(o)))return c.apply(n,r),n;break}}return(l||Lt(t,f))(r,e,!ft,n,!e||B.test(t)&&M(e.parentNode)||e),n}function Ht(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&C(t).is(n))break;r.push(t)}return r}function Ut(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}jt.prototype=C.expr.pseudos,C.expr.setFilters=new jt,Ft(),C.find=Ct,Ct.compile=Lt,Ct.select=Mt,Ct.setDocument=Ft,Ct.tokenize=K;var zt=C.expr.match.needsContext,qt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Wt(t){return"<"===t[0]&&">"===t[t.length-1]&&t.length>=3}function Gt(t,e,n){return"function"==typeof e?C.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?C.grep(t,function(t){return t===e!==n}):"string"!=typeof e?C.grep(t,function(t){return l.call(e,t)>-1!==n}):C.filter(e,t,n)}C.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?C.find.matchesSelector(r,t)?[r]:[]:C.find.matches(t,C.grep(e,function(t){return 1===t.nodeType}))},C.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(C(t).filter(function(){for(e=0;e<r;e++)if(C.contains(i[e],this))return!0}));for(n=this.pushStack([]),e=0;e<r;e++)C.find(t,i[e],n);return r>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(Gt(this,t||[],!1))},not:function(t){return this.pushStack(Gt(this,t||[],!0))},is:function(t){return!!Gt(this,"string"==typeof t&&zt.test(t)?C(t):t||[],!1).length}});var $t,Yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e){var n,r;if(!t)return this;if(t.nodeType)return this[0]=t,this.length=1,this;if("function"==typeof t)return void 0!==$t.ready?$t.ready(t):t(C);if(Wt(n=t+""))n=[null,t,null];else{if("string"!=typeof t)return C.makeArray(t,this);n=Yt.exec(t)}if(!n||!n[1]&&e)return!e||e.jquery?(e||$t).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:D,!0)),qt.test(n[1])&&C.isPlainObject(e))for(n in e)"function"==typeof this[n]?this[n](e[n]):this.attr(n,e[n]);return this}return(r=D.getElementById(n[2]))&&(this[0]=r,this.length=1),this}).prototype=C.fn,$t=C(D);var Xt=/^(?:parents|prev(?:Until|All))/,Vt={children:!0,contents:!0,next:!0,prev:!0};function Kt(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function Jt(t){return t}function Qt(t){throw t}function Zt(t,e,n,r){var i;try{t&&"function"==typeof(i=t.promise)?i.call(t).done(e).fail(n):t&&"function"==typeof(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n(t)}}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0})},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&C(t);if(!zt.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(C(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ht(t,"parentNode")},parentsUntil:function(t,e,n){return Ht(t,"parentNode",n)},next:function(t){return Kt(t,"nextSibling")},prev:function(t){return Kt(t,"previousSibling")},nextAll:function(t){return Ht(t,"nextSibling")},prevAll:function(t){return Ht(t,"previousSibling")},nextUntil:function(t,e,n){return Ht(t,"nextSibling",n)},prevUntil:function(t,e,n){return Ht(t,"previousSibling",n)},siblings:function(t){return Ut((t.parentNode||{}).firstChild,t)},children:function(t){return Ut(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(S(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},function(t,e){C.fn[t]=function(n,r){var i=C.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=C.filter(r,i)),this.length>1&&(Vt[t]||C.uniqueSort(i),Xt.test(t)&&i.reverse()),this.pushStack(i)}}),C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(tt)||[],function(t,n){e[n]=!0}),e}(t):C.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){C.each(n,function(n,r){"function"==typeof r?t.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==y(r)&&e(r)})}(arguments),n&&!e&&u()),this},remove:function(){return C.each(arguments,function(t,e){for(var n;(n=C.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return C.Deferred(function(n){C.each(e,function(e,r){var i="function"==typeof t[r[4]]&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&"function"==typeof t.promise?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,n,i){var o=0;function a(t,e,n,i){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(t<o)){if((r=n.apply(s,u))===e.promise())throw new TypeError("Thenable self-resolution");"function"==typeof(c=r&&("object"==typeof r||"function"==typeof r)&&r.then)?i?c.call(r,a(o,e,Jt,i),a(o,e,Qt,i)):(o++,c.call(r,a(o,e,Jt,i),a(o,e,Qt,i),a(o,e,Jt,e.notifyWith))):(n!==Jt&&(s=void 0,u=[r]),(i||e.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(r){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(r,l.error),t+1>=o&&(n!==Qt&&(s=void 0,u=[r]),e.rejectWith(s,u))}};t?l():(C.Deferred.getErrorHook&&(l.error=C.Deferred.getErrorHook()),r.setTimeout(l))}}return C.Deferred(function(r){e[0][3].add(a(0,r,"function"==typeof i?i:Jt,r.notifyWith)),e[1][3].add(a(0,r,"function"==typeof t?t:Jt)),e[2][3].add(a(0,r,"function"==typeof n?n:Qt))}).promise()},promise:function(t){return null!=t?C.extend(t,i):i}},o={};return C.each(e,function(t,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add(function(){n=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=C.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(Zt(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||"function"==typeof(i[n]&&i[n].then)))return o.then();for(;n--;)Zt(i[n],a(n),o.reject);return o.promise()}});var te=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){t&&te.test(t.name)&&r.console.warn("jQuery.Deferred exception",t,e)},C.readyException=function(t){r.setTimeout(function(){throw t})};var ee=C.Deferred();function ne(){D.removeEventListener("DOMContentLoaded",ne),r.removeEventListener("load",ne),C.ready()}C.fn.ready=function(t){return ee.then(t).catch(function(t){C.readyException(t)}),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||ee.resolveWith(D,[C]))}}),C.ready.then=ee.then,"loading"!==D.readyState?r.setTimeout(C.ready):(D.addEventListener("DOMContentLoaded",ne),r.addEventListener("load",ne));var re=/-([a-z])/g;function ie(t,e){return e.toUpperCase()}function oe(t){return t.replace(re,ie)}function ae(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function se(){this.expando=C.expando+se.uid++}se.uid=1,se.prototype={cache:function(t){var e=t[this.expando];return e||(e=Object.create(null),ae(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[oe(e)]=n;else for(r in e)i[oe(r)]=e[r];return n},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][oe(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(oe):(e=oe(e))in r?[e]:e.match(tt)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||C.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var ue=new se,ce=new se,le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,fe=/[A-Z]/g;function pe(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(fe,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:le.test(t)?JSON.parse(t):t)}(n)}catch(t){}ce.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return ce.hasData(t)||ue.hasData(t)},data:function(t,e,n){return ce.access(t,e,n)},removeData:function(t,e){ce.remove(t,e)},_data:function(t,e,n){return ue.access(t,e,n)},_removeData:function(t,e){ue.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=ce.get(o),1===o.nodeType&&!ue.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=oe(r.slice(5)),pe(o,r,i[r]));ue.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each(function(){ce.set(this,t)}):Z(this,function(e){var n;if(o&&void 0===e)return void 0!==(n=ce.get(o,t))||void 0!==(n=pe(o,t))?n:void 0;this.each(function(){ce.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ce.remove(this,t)})}}),C.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=ue.get(t,e),n&&(!r||Array.isArray(n)?r=ue.set(t,e,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=C.queue(t,e),r=n.length,i=n.shift(),o=C._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){C.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ue.get(t,n)||ue.set(t,n,{empty:C.Callbacks("once memory").add(function(){ue.remove(t,[e+"queue",n])})})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each(function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)})},dequeue:function(t){return this.each(function(){C.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=C.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=ue.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var de=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+de+")([a-z%]*)$","i"),ge=["Top","Right","Bottom","Left"];function ve(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&"none"===C.css(t,"display")}var ye=/^[a-z]/,me=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function be(t){return ye.test(t)&&me.test(t[0].toUpperCase()+t.slice(1))}function De(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return C.css(t,e,"")},u=s(),c=n&&n[3]||(be(e)?"px":""),l=t.nodeType&&(!be(e)||"px"!==c&&+u)&&he.exec(C.css(t,e));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)C.style(t,e,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,C.style(t,e,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var we=/^-ms-/;function xe(t){return oe(t.replace(we,"ms-"))}var Ae={};function Ee(t){var e,n=t.ownerDocument,r=t.nodeName,i=Ae[r];return i||(e=n.body.appendChild(n.createElement(r)),i=C.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),Ae[r]=i,i)}function Ce(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=ue.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ve(r)&&(i[o]=Ee(r))):"none"!==n&&(i[o]="none",ue.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}C.fn.extend({show:function(){return Ce(this,!0)},hide:function(){return Ce(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ve(this)?C(this).show():C(this).hide()})}});var Se=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(_e)===t.ownerDocument},_e={composed:!0};P.getRootNode||(Se=function(t){return C.contains(t.ownerDocument,t)});var Oe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ke={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function Te(t,e){var n;return n=void 0!==t.getElementsByTagName?o.slice.call(t.getElementsByTagName(e||"*")):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?C.merge([t],n):n}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td;var Fe=/^$|^module$|\/(?:java|ecma)script/i;function je(t,e){for(var n=0,r=t.length;n<r;n++)ue.set(t[n],"globalEval",!e||ue.get(e[n],"globalEval"))}var Ie=/<|&#?\w+;/;function Ne(t,e,n,r,i){for(var a,s,u,c,l,f,p=e.createDocumentFragment(),d=[],h=0,g=t.length;h<g;h++)if((a=t[h])||0===a)if("object"===y(a)&&(a.nodeType||b(a)))C.merge(d,a.nodeType?[a]:a);else if(Ie.test(a)){for(s=s||p.appendChild(e.createElement("div")),u=(Oe.exec(a)||["",""])[1].toLowerCase(),f=(c=ke[u]||o).length;--f>-1;)s=s.appendChild(e.createElement(c[f]));s.innerHTML=C.htmlPrefilter(a),C.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(e.createTextNode(a));for(p.textContent="",h=0;a=d[h++];)if(r&&C.inArray(a,r)>-1)i&&i.push(a);else if(l=Se(a),s=Te(p.appendChild(a),"script"),l&&je(s),n)for(f=0;a=s[f++];)Fe.test(a.type||"")&&n.push(a);return p}function Be(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pe(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Re(t,e,n,r){e=u(e);var i,o,a,s,c,l,f=0,p=t.length,d=p-1,h=e[0];if("function"==typeof h)return t.each(function(i){var o=t.eq(i);e[0]=h.call(this,i,o.html()),Re(o,e,n,r)});if(p&&(o=(i=Ne(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=C.map(Te(i,"script"),Be)).length;f<p;f++)c=i,f!==d&&(c=C.clone(c,!0,!0),s&&C.merge(a,Te(c,"script"))),n.call(t[f],c,f);if(s)for(l=a[a.length-1].ownerDocument,C.map(a,Pe),f=0;f<s;f++)c=a[f],Fe.test(c.type||"")&&!ue.get(c,"globalEval")&&C.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?C._evalUrl&&!c.noModule&&C._evalUrl(c.src,{nonce:c.nonce,crossOrigin:c.crossOrigin},l):x(c.textContent,c,l))}return t}var Le=/^(?:checkbox|radio)$/i,Me=/^([^.]*)(?:\.(.+)|)/;function He(){return!0}function Ue(){return!1}function ze(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)ze(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ue;else if(!i)return t;return 1===o&&(a=i,i=function(t){return C().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=C.guid++)),t.each(function(){C.event.add(this,e,i,r,n)})}function qe(t,e,n){n?(ue.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var n,r=ue.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=s.call(arguments),ue.set(this,e,r),this[e](),n=ue.get(this,e),ue.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n&&n.value}else r.length&&(ue.set(this,e,{value:C.event.trigger(r[0],r.slice(1),this)}),t.stopPropagation(),t.isImmediatePropagationStopped=He)}})):void 0===ue.get(t,e)&&C.event.add(t,e,He)}C.event={add:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=ue.get(t);if(ae(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(P,i),n.guid||(n.guid=C.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(tt)||[""]).length;c--;)d=g=(s=Me.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=C.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=C.event.special[d]||{},l=C.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,l):p.push(l))},remove:function(t,e,n,r,i){var o,a,s,u,c,l,f,p,d,h,g,v=ue.hasData(t)&&ue.get(t);if(v&&(u=v.events)){for(c=(e=(e||"").match(tt)||[""]).length;c--;)if(d=g=(s=Me.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),d){for(f=C.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)l=p[o],!i&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(p.splice(o,1),l.selector&&p.delegateCount--,f.remove&&f.remove.call(t,l));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(t,h,v.handle)||C.removeEvent(t,d,v.handle),delete u[d])}else for(d in u)C.event.remove(t,d+e[c],n,r,!0);C.isEmptyObject(u)&&ue.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=C.event.fix(t),c=(ue.get(this,"events")||Object.create(null))[u.type]||[],l=C.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=C.event.handlers.call(this,u,c),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((C.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,c=t.target;if(u&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?C(i,this).index(c)>-1:C.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<e.length&&s.push({elem:c,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:"function"==typeof e?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:C.extend(Object.create(null),{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Le.test(e.type)&&e.click&&S(e,"input")&&qe(e,"click",!0),!1},trigger:function(t){var e=this||t;return Le.test(e.type)&&e.click&&S(e,"input")&&qe(e,"click"),!0},_default:function(t){var e=t.target;return Le.test(e.type)&&e.click&&S(e,"input")&&ue.get(e,"click")||S(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.preventDefault()}}})},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?He:Ue,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:Ue,isPropagationStopped:Ue,isImmediatePropagationStopped:Ue,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=He,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=He,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=He,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},function(t,e){function n(t){var e=C.event.fix(t);e.type="focusin"===t.type?"focus":"blur",e.isSimulated=!0,e.target===e.currentTarget&&ue.get(this,"handle")(e)}C.event.special[t]={setup:function(){if(qe(this,t,!0),!k)return!1;this.addEventListener(e,n)},trigger:function(){return qe(this,t),!0},teardown:function(){if(!k)return!1;this.removeEventListener(e,n)},_default:function(e){return ue.get(e.target,t)},delegateType:e}}),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||C.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}}),C.fn.extend({on:function(t,e,n,r){return ze(this,t,e,n,r)},one:function(t,e,n,r){return ze(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,C(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Ue),this.each(function(){C.event.remove(this,t,n,e)})}});var We=/<script|<style|<link/i;function Ge(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function $e(t,e){var n,r,i,o=ue.get(t,"events");if(1===e.nodeType){if(o)for(n in ue.remove(e,"handle events"),o)for(r=0,i=o[n].length;r<i;r++)C.event.add(e,n,o[n][r]);ce.hasData(t)&&ce.set(e,C.extend({},ce.get(t)))}}function Ye(t,e,n){for(var r,i=e?C.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||C.cleanData(Te(r)),r.parentNode&&(n&&Se(r)&&je(Te(r,"script")),r.parentNode.removeChild(r));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=Se(t);if(k&&(1===t.nodeType||11===t.nodeType)&&!C.isXMLDoc(t))for(a=Te(s),r=0,i=(o=Te(t)).length;r<i;r++)S(a[r],"textarea")&&(a[r].defaultValue=o[r].defaultValue);if(e)if(n)for(o=o||Te(t),a=a||Te(s),r=0,i=o.length;r<i;r++)$e(o[r],a[r]);else $e(t,s);return(a=Te(s,"script")).length>0&&je(a,!u&&Te(t,"script")),s},cleanData:function(t){for(var e,n,r,i=C.event.special,o=0;void 0!==(n=t[o]);o++)if(ae(n)){if(e=n[ue.expando]){if(e.events)for(r in e.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,e.handle);n[ue.expando]=void 0}n[ce.expando]&&(n[ce.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Ye(this,t,!0)},remove:function(t){return Ye(this,t)},text:function(t){return Z(this,function(t){return void 0===t?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Re(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ge(this,t).appendChild(t)})},prepend:function(){return Re(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ge(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Re(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Re(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(Te(t,!1)),t.textContent="");return this},clone:function(t,e){return t=t??!1,e=e??t,this.map(function(){return C.clone(this,t,e)})},html:function(t){return Z(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!We.test(t)&&!ke[(Oe.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(Te(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Re(this,arguments,function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(Te(this)),n&&n.replaceChild(e,this))},t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){C.fn[t]=function(t){for(var n,r=[],i=C(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),C(i[a])[e](n),c.apply(r,n);return this.pushStack(r)}});var Xe=new RegExp("^("+de+")(?!px)[a-z%]+$","i"),Ve=/^--/;function Ke(t){var e=t.ownerDocument.defaultView;return e||(e=r),e.getComputedStyle(t)}function Je(t,e,n){var r,i=Ve.test(e);return(n=n||Ke(t))&&(r=n.getPropertyValue(e)||n[e],i&&r&&(r=r.replace(F,"$1")||void 0),""!==r||Se(t)||(r=C.style(t,e))),void 0!==r?r+"":r}var Qe=["Webkit","Moz","ms"],Ze=D.createElement("div").style;function tn(t){return t in Ze?t:function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Qe.length;n--;)if((t=Qe[n]+e)in Ze)return t}(t)||t}var en,nn,rn=D.createElement("table");function on(){if(rn&&rn.style){var t,e=D.createElement("col"),n=D.createElement("tr"),i=D.createElement("td");rn.style.cssText="position:absolute;left:-11111px;border-collapse:separate;border-spacing:0",n.style.cssText="box-sizing:content-box;border:1px solid;height:1px",i.style.cssText="height:9px;width:9px;padding:0",e.span=2,P.appendChild(rn).appendChild(e).parentNode.appendChild(n).appendChild(i).parentNode.appendChild(i.cloneNode(!0)),0!==rn.offsetWidth?(t=r.getComputedStyle(n),nn=k||18===Math.round(parseFloat(r.getComputedStyle(e).width)),en=Math.round(parseFloat(t.height)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))===n.offsetHeight,P.removeChild(rn),rn=null):P.removeChild(rn)}}C.extend(v,{reliableTrDimensions:function(){return on(),en},reliableColDimensions:function(){return on(),nn}});var an={position:"absolute",visibility:"hidden",display:"block"},sn={letterSpacing:"0",fontWeight:"400"};function un(t,e,n){var r=he.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function cn(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=C.css(t,n+ge[a],!0,i)),r?("content"===n&&(u-=C.css(t,"padding"+ge[a],!0,i)),"margin"!==n&&(u-=C.css(t,"border"+ge[a]+"Width",!0,i))):(u+=C.css(t,"padding"+ge[a],!0,i),"padding"!==n?u+=C.css(t,"border"+ge[a]+"Width",!0,i):s+=C.css(t,"border"+ge[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u+c}function ln(t,e,n){var r=Ke(t),i=(k||n)&&"border-box"===C.css(t,"boxSizing",!1,r),o=i,a=Je(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Xe.test(a)){if(!n)return a;a="auto"}return("auto"===a||k&&i||!v.reliableColDimensions()&&S(t,"col")||!v.reliableTrDimensions()&&S(t,"tr"))&&t.getClientRects().length&&(i="border-box"===C.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+cn(t,e,n||(i?"border":"content"),o,r,a)+"px"}function fn(t,e,n,r,i){return new fn.prototype.init(t,e,n,r,i)}C.extend({cssHooks:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=xe(e),u=Ve.test(e),c=t.style;if(u||(e=tn(s)),a=C.cssHooks[e]||C.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:c[e];"string"===(o=typeof n)&&(i=he.exec(n))&&i[1]&&(n=De(t,e,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(be(s)?"px":"")),k&&""===n&&0===e.indexOf("background")&&(c[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=xe(e);return Ve.test(e)||(e=tn(s)),(a=C.cssHooks[e]||C.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Je(t,e,r)),"normal"===i&&e in sn&&(i=sn[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),C.each(["height","width"],function(t,e){C.cssHooks[e]={get:function(t,n,r){if(n)return"none"===C.css(t,"display")?function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r}(t,an,function(){return ln(t,e,r)}):ln(t,e,r)},set:function(t,n,r){var i,o=Ke(t),a=r&&"border-box"===C.css(t,"boxSizing",!1,o),s=r?cn(t,e,r,a,o):0;return s&&(i=he.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),un(0,n,s)}}}),C.each({margin:"",padding:"",border:"Width"},function(t,e){C.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ge[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(C.cssHooks[t+e].set=un)}),C.fn.extend({css:function(t,e){return Z(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Ke(t),i=e.length;a<i;a++)o[e[a]]=C.css(t,e[a],!1,r);return o}return void 0!==n?C.style(t,e,n):C.css(t,e)},t,e,arguments.length>1)}}),C.Tween=fn,fn.prototype={constructor:fn,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(be(n)?"px":"")},cur:function(){var t=fn.propHooks[this.prop];return t&&t.get?t.get(this):fn.propHooks._default.get(this)},run:function(t){var e,n=fn.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):fn.propHooks._default.set(this),this}},fn.prototype.init.prototype=fn.prototype,fn.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[tn(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=fn.prototype.init,C.fx.step={};var pn,dn,hn=/^(?:toggle|show|hide)$/,gn=/queueHooks$/;function vn(){dn&&(!1===D.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(vn):r.setTimeout(vn,13),C.fx.tick())}function yn(){return r.setTimeout(function(){pn=void 0}),pn=Date.now()}function mn(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ge[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function bn(t,e,n){for(var r,i=(Dn.tweeners[e]||[]).concat(Dn.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function Dn(t,e,n){var r,i,o=0,a=Dn.prefilters.length,s=C.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=pn||yn(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(t,[c,r,n]),r<1&&a?n:(a||s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:pn||yn(),duration:n.duration,tweens:[],createTween:function(e,n){var r=C.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),l=c.props;for(!function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=xe(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=C.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=Dn.prefilters[o].call(c,t,l,c.opts))return"function"==typeof r.stop&&(C._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return C.map(l,bn,c),"function"==typeof c.opts.start&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),C.fx.timer(C.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}C.Animation=C.extend(Dn,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return De(n.elem,t,he.exec(e),n),n}]},tweener:function(t,e){"function"==typeof t?(e=t,t=["*"]):t=t.match(tt);for(var n,r=0,i=t.length;r<i;r++)n=t[r],Dn.tweeners[n]=Dn.tweeners[n]||[],Dn.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,c,l,f="width"in e||"height"in e,p=this,d={},h=t.style,g=t.nodeType&&ve(t),v=ue.get(t,"fxshow");for(r in n.queue||(null==(a=C._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,C.queue(t,"fx").length||a.empty.fire()})})),e)if(i=e[r],hn.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||C.style(t,r)}if((u=!C.isEmptyObject(e))||!C.isEmptyObject(d))for(r in f&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=v&&v.display)&&(c=ue.get(t,"display")),"none"===(l=C.css(t,"display"))&&(c?l=c:(Ce([t],!0),c=t.style.display||c,l=C.css(t,"display"),Ce([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===C.css(t,"float")&&(u||(p.done(function(){h.display=c}),null==c&&(l=h.display,c="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=ue.set(t,"fxshow",{display:c}),o&&(v.hidden=!g),g&&Ce([t],!0),p.done(function(){for(r in g||Ce([t]),ue.remove(t,"fxshow"),d)C.style(t,r,d[r])})),u=bn(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?Dn.prefilters.unshift(t):Dn.prefilters.push(t)}}),C.speed=function(t,e,n){var r=t&&"object"==typeof t?C.extend({},t):{complete:n||e||"function"==typeof t&&t,duration:t,easing:n&&e||e&&"function"!=typeof e&&e};return C.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in C.fx.speeds?r.duration=C.fx.speeds[r.duration]:r.duration=C.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){"function"==typeof r.old&&r.old.call(this),r.queue&&C.dequeue(this,r.queue)},r},C.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ve).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=C.isEmptyObject(t),o=C.speed(e,n,r),a=function(){var e=Dn(this,C.extend({},t),o);(i||ue.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=C.timers,a=ue.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&gn.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||C.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=ue.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=C.timers,a=r?r.length:0;for(n.finish=!0,C.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),C.each(["toggle","show","hide"],function(t,e){var n=C.fn[e];C.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(mn(e,!0),t,r,i)}}),C.each({slideDown:mn("show"),slideUp:mn("hide"),slideToggle:mn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){C.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(pn=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),pn=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.start=function(){dn||(dn=!0,vn())},C.fx.stop=function(){dn=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}})};var wn=/^(?:input|select|textarea|button)$/i,xn=/^(?:a|area)$/i;function An(t){return(t.match(tt)||[]).join(" ")}function En(t){return t.getAttribute&&t.getAttribute("class")||""}function Cn(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(tt)||[]}C.fn.extend({prop:function(t,e){return Z(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[C.propFix[t]||t]})}}),C.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,i=C.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=t.getAttribute("tabindex");return e?parseInt(e,10):wn.test(t.nodeName)||xn.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),k&&(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(t){var e,n,r,i,o,a;return"function"==typeof t?this.each(function(e){C(this).addClass(t.call(this,e,En(this)))}):(e=Cn(t)).length?this.each(function(){if(r=En(this),n=1===this.nodeType&&" "+An(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=An(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return"function"==typeof t?this.each(function(e){C(this).removeClass(t.call(this,e,En(this)))}):arguments.length?(e=Cn(t)).length?this.each(function(){if(r=En(this),n=1===this.nodeType&&" "+An(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=An(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o;return"function"==typeof t?this.each(function(n){C(this).toggleClass(t.call(this,n,En(this),e),e)}):"boolean"==typeof e?e?this.addClass(t):this.removeClass(t):(n=Cn(t)).length?this.each(function(){for(o=C(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r)}):this},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+An(En(n))+" ").indexOf(e)>-1)return!0;return!1}}),C.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r="function"==typeof t,this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,C(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=C.map(i,function(t){return null==t?"":t+""})),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value)??"":void 0}}),C.extend({valHooks:{select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if((n=i[r]).selected&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(e=C(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=C.makeArray(e),a=i.length;a--;)((r=i[a]).selected=C.inArray(C(r).val(),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),k&&(C.valHooks.option={get:function(t){var e=t.getAttribute("value");return null!=e?e:An(C.text(t))}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}}});var Sn=/^(?:focusinfocus|focusoutblur)$/,_n=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,n,i){var o,a,s,u,c,l,f,p,h=[n||D],g=d.call(t,"type")?t.type:t,v=d.call(t,"namespace")?t.namespace.split("."):[];if(a=p=s=n=n||D,3!==n.nodeType&&8!==n.nodeType&&!Sn.test(g+C.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(t=t[C.expando]?t:new C.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:C.makeArray(e,[t]),f=C.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,e))){if(!i&&!f.noBubble&&!m(n)){for(u=f.delegateType||g,Sn.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||D)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)p=a,t.type=o>1?u:f.bindType||g,(l=(ue.get(a,"events")||Object.create(null))[t.type]&&ue.get(a,"handle"))&&l.apply(a,e),(l=c&&a[c])&&l.apply&&ae(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),e)||!ae(n)||c&&"function"==typeof n[g]&&!m(n)&&((s=n[c])&&(n[c]=null),C.event.triggered=g,t.isPropagationStopped()&&p.addEventListener(g,_n),n[g](),t.isPropagationStopped()&&p.removeEventListener(g,_n),C.event.triggered=void 0,s&&(n[c]=s)),t.result}},simulate:function(t,e,n){var r=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(r,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each(function(){C.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}});var On=r.location,kn={guid:Date.now()},Tn=/\?/;C.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,function(t){return t.textContent}).join("\n"):t)),e};var Fn=/\[\]$/,jn=/\r?\n/g,In=/^(?:submit|button|image|reset|file)$/i,Nn=/^(?:input|select|textarea|keygen)/i;function Bn(t,e,n,r){var i;if(Array.isArray(e))C.each(e,function(e,i){n||Fn.test(t)?r(t,i):Bn(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==y(e))r(t,e);else for(i in e)Bn(t+"["+i+"]",e[i],n,r)}C.param=function(t,e){var n,r=[],i=function(t,e){var n="function"==typeof e?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(n??"")};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,function(){i(this.name,this.value)});else for(n in t)Bn(n,t[n],e,i);return r.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Nn.test(this.nodeName)&&!In.test(t)&&(this.checked||!Le.test(t))}).map(function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,function(t){return{name:e.name,value:t.replace(jn,"\r\n")}}):{name:e.name,value:n.replace(jn,"\r\n")}}).get()}});var Pn=/%20/g,Rn=/#.*$/,Ln=/([?&])_=[^&]*/,Mn=/^(.*?):[ \t]*([^\r\n]*)$/gm,Hn=/^(?:GET|HEAD)$/,Un=/^\/\//,zn={},qn={},Wn="*/".concat("*"),Gn=D.createElement("a");function $n(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(tt)||[];if("function"==typeof n)for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Yn(t,e,n,r){var i={},o=t===qn;function a(s){var u;return i[s]=!0,C.each(t[s]||[],function(t,s){var c=s(e,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(e.dataTypes.unshift(c),a(c),!1)}),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Xn(t,e){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&C.extend(!0,t,r),t}Gn.href=On.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:On.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(On.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Xn(Xn(t,C.ajaxSettings),e):Xn(C.ajaxSettings,t)},ajaxPrefilter:$n(zn),ajaxTransport:$n(qn),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,a,s,u,c,l,f,p,d=C.ajaxSetup({},e),h=d.context||d,g=d.context&&(h.nodeType||h.jquery)?C(h):C.event,v=C.Deferred(),y=C.Callbacks("once memory"),m=d.statusCode||{},b={},w={},x="canceled",A={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=Mn.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==c&&(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)A.always(t[A.status]);else for(e in t)m[e]=[m[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(A),d.url=((t||d.url||On.href)+"").replace(Un,On.protocol+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=(d.dataType||"*").toLowerCase().match(tt)||[""],null==d.crossDomain){u=D.createElement("a");try{u.href=d.url,u.href=u.href,d.crossDomain=Gn.protocol+"//"+Gn.host!=u.protocol+"//"+u.host}catch(t){d.crossDomain=!0}}if(Yn(zn,d,e,A),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=C.param(d.data,d.traditional)),c)return A;for(f in(l=C.event&&d.global)&&0===C.active++&&C.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Hn.test(d.type),i=d.url.replace(Rn,""),d.hasContent?d.data&&d.processData&&0===(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&(d.data=d.data.replace(Pn,"+")):(p=d.url.slice(i.length),d.data&&(d.processData||"string"==typeof d.data)&&(i+=(Tn.test(i)?"&":"?")+d.data,delete d.data),!1===d.cache&&(i=i.replace(Ln,"$1"),p=(Tn.test(i)?"&":"?")+"_="+kn.guid+++p),d.url=i+p),d.ifModified&&(C.lastModified[i]&&A.setRequestHeader("If-Modified-Since",C.lastModified[i]),C.etag[i]&&A.setRequestHeader("If-None-Match",C.etag[i])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&A.setRequestHeader("Content-Type",d.contentType),A.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Wn+"; q=0.01":""):d.accepts["*"]),d.headers)A.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(!1===d.beforeSend.call(h,A,d)||c))return A.abort();if(x="abort",y.add(d.complete),A.done(d.success),A.fail(d.error),n=Yn(qn,d,e,A)){if(A.readyState=1,l&&g.trigger("ajaxSend",[A,d]),c)return A;d.async&&d.timeout>0&&(s=r.setTimeout(function(){A.abort("timeout")},d.timeout));try{c=!1,n.send(b,E)}catch(t){if(c)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,a,u){var f,p,b,D,w,x=e;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",A.readyState=t>0?4:0,f=t>=200&&t<300||304===t,a&&(D=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(d,A,a)),!f&&C.inArray("script",d.dataTypes)>-1&&C.inArray("json",d.dataTypes)<0&&(d.converters["text script"]=function(){}),D=function(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(d,D,A,f),f?(d.ifModified&&((w=A.getResponseHeader("Last-Modified"))&&(C.lastModified[i]=w),(w=A.getResponseHeader("etag"))&&(C.etag[i]=w)),204===t||"HEAD"===d.type?x="nocontent":304===t?x="notmodified":(x=D.state,p=D.data,f=!(b=D.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),A.status=t,A.statusText=(e||x)+"",f?v.resolveWith(h,[p,x,A]):v.rejectWith(h,[A,x,b]),A.statusCode(m),m=void 0,l&&g.trigger(f?"ajaxSuccess":"ajaxError",[A,d,f?p:b]),y.fireWith(h,[A,x]),l&&(g.trigger("ajaxComplete",[A,d]),--C.active||C.event.trigger("ajaxStop")))}return A},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],function(t,e){C[e]=function(t,n,r,i){return"function"!=typeof n&&null!==n||(i=i||r,r=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:i,data:n,success:r},C.isPlainObject(t)&&t))}}),C.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,scriptAttrs:e.crossOrigin?{crossOrigin:e.crossOrigin}:void 0,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&("function"==typeof t&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return"function"==typeof t?this.each(function(e){C(this).wrapInner(t.call(this,e))}):this.each(function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e="function"==typeof t;return this.each(function(n){C(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){return new r.XMLHttpRequest};var Vn={0:200};function Kn(t){return t.scriptAttrs||!t.headers&&(t.crossDomain||t.async&&C.inArray("json",t.dataTypes)<0)}C.ajaxTransport(function(t){var e;return{send:function(n,r){var i,o=t.xhr();if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];for(i in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)o.setRequestHeader(i,n[i]);e=function(t){return function(){e&&(e=o.onload=o.onerror=o.onabort=o.ontimeout=null,"abort"===t?o.abort():"error"===t?r(o.status,o.statusText):r(Vn[o.status]||o.status,o.statusText,"text"===(o.responseType||"text")?{text:o.responseText}:{binary:o.response},o.getAllResponseHeaders()))}},o.onload=e(),o.onabort=o.onerror=o.ontimeout=e("error"),e=e("abort");try{o.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),Kn(t)&&(t.type="GET")}),C.ajaxTransport("script",function(t){var e,n;if(Kn(t))return{send:function(r,i){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),D.head.appendChild(e[0])},abort:function(){n&&n()}}});var Jn=[],Qn=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Jn.pop()||C.expando+"_"+kn.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("jsonp",function(t,e,n){var i,o,a,s=!1!==t.jsonp&&(Qn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qn.test(t.data)&&"data");return i=t.jsonpCallback="function"==typeof t.jsonpCallback?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qn,"$1"+i):!1!==t.jsonp&&(t.url+=(Tn.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||C.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always(function(){void 0===o?C(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Jn.push(i)),a&&"function"==typeof o&&o(a[0]),a=o=void 0}),"script"}),C.ajaxPrefilter(function(t,e){"string"==typeof t.data||C.isPlainObject(t.data)||Array.isArray(t.data)||"processData"in e||(t.processData=!1),t.data instanceof r.FormData&&(t.contentType=!1)}),C.parseHTML=function(t,e,n){return"string"==typeof t||Wt(t+"")?("boolean"==typeof e&&(n=e,e=!1),e||(e=(new r.DOMParser).parseFromString("","text/html")),o=!n&&[],(i=qt.exec(t))?[e.createElement(i[1])]:(i=Ne([t],e,o),o&&o.length&&C(o).remove(),C.merge([],i.childNodes))):[];var i,o},C.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=An(t.slice(s)),t=t.slice(0,s)),"function"==typeof e?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&C.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(r?C("<div>").append(C.parseHTML(t)).find(r):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c=C.css(t,"position"),l=C(t),f={};"static"===c&&(t.style.position="relative"),s=l.offset(),o=C.css(t,"top"),u=C.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),"function"==typeof e&&(e=e.call(t,n,C.extend({},s))),null!=e.top&&(f.top=e.top-s.top+a),null!=e.left&&(f.left=e.left-s.left+i),"using"in e?e.using.call(t,f):l.css(f)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){C.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===C.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&t!==n.documentElement&&"static"===C.css(t,"position");)t=t.offsetParent||n.documentElement;t&&t!==r&&1===t.nodeType&&"static"!==C.css(t,"position")&&((i=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),i.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-C.css(r,"marginTop",!0),left:e.left-i.left-C.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||P})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;C.fn[t]=function(r){return Z(this,function(t,r,i){var o;if(m(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i},t,r,arguments.length)}}),C.each({Height:"height",Width:"width"},function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){C.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Z(this,function(e,n,i){var o;return m(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?C.css(e,n,s):C.style(e,n,i,s)},e,a?i:void 0,a)}})}),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){C.fn[e]=function(t){return this.on(e,t)}}),C.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),C.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),"function"==typeof t)return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||C.guid++,i},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.expr[":"]=C.expr.filters=C.expr.pseudos,void 0===(n=function(){return C}.apply(e,[]))||(t.exports=n);var Zn=r.jQuery,tr=r.$;return C.noConflict=function(t){return r.$===C&&(r.$=tr),t&&r.jQuery===C&&(r.jQuery=Zn),C},void 0===i&&(r.jQuery=r.$=C),C})}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(239);var r=n(326);SaplingModule=r})();
1
+ !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="85caeb8e-c506-4e23-9894-591cb811f18f",t._sentryDebugIdIdentifier="sentry-dbid-85caeb8e-c506-4e23-9894-591cb811f18f")}catch(t){}}();export var SaplingModule; var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"9fccf36abc9dc9816e1c3f6cc20a05f5e17a7397"},(()=>{var t={545(t,e){!function(t){"use strict";function e(){}function n(t,e,n,r,i){for(var o=0,a=e.length,s=0,u=0;o<a;o++){var c=e[o];if(c.removed){if(c.value=t.join(r.slice(u,u+c.count)),u+=c.count,o&&e[o-1].added){var l=e[o-1];e[o-1]=e[o],e[o]=l}}else{if(!c.added&&i){var d=n.slice(s,s+c.count);d=d.map(function(t,e){var n=r[u+e];return n.length>t.length?n:t}),c.value=t.join(d)}else c.value=t.join(n.slice(s,s+c.count));s+=c.count,c.added||(u+=c.count)}}var f=e[a-1];return a>1&&"string"==typeof f.value&&(f.added||f.removed)&&t.equals("",f.value)&&(e[a-2].value+=f.value,e.pop()),e}function r(t){return{newPos:t.newPos,components:t.components.slice(0)}}e.prototype={diff:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callback;"function"==typeof i&&(o=i,i={}),this.options=i;var a=this;function s(t){return o?(setTimeout(function(){o(void 0,t)},0),!0):t}t=this.castInput(t),e=this.castInput(e),t=this.removeEmpty(this.tokenize(t));var u=(e=this.removeEmpty(this.tokenize(e))).length,c=t.length,l=1,d=u+c,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],e,t,0);if(f[0].newPos+1>=u&&p+1>=c)return s([{value:this.join(e),count:e.length}]);function h(){for(var i=-1*l;i<=l;i+=2){var o=void 0,d=f[i-1],p=f[i+1],h=(p?p.newPos:0)-i;d&&(f[i-1]=void 0);var g=d&&d.newPos+1<u,v=p&&0<=h&&h<c;if(g||v){if(!g||v&&d.newPos<p.newPos?(o=r(p),a.pushComponent(o.components,void 0,!0)):((o=d).newPos++,a.pushComponent(o.components,!0,void 0)),h=a.extractCommon(o,e,t,i),o.newPos+1>=u&&h+1>=c)return s(n(a,o.components,e,t,a.useLongestToken));f[i]=o}else f[i]=void 0}l++}if(o)!function t(){setTimeout(function(){if(l>d)return o();h()||t()},0)}();else for(;l<=d;){var g=h();if(g)return g}},pushComponent:function(t,e,n){var r=t[t.length-1];r&&r.added===e&&r.removed===n?t[t.length-1]={count:r.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,r){for(var i=e.length,o=n.length,a=t.newPos,s=a-r,u=0;a+1<i&&s+1<o&&this.equals(e[a+1],n[s+1]);)a++,s++,u++;return u&&t.components.push({count:u}),t.newPos=a,s},equals:function(t,e){return this.options.comparator?this.options.comparator(t,e):t===e||this.options.ignoreCase&&t.toLowerCase()===e.toLowerCase()},removeEmpty:function(t){for(var e=[],n=0;n<t.length;n++)t[n]&&e.push(t[n]);return e},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};var i=new e;function o(t,e,n){return i.diff(t,e,n)}function a(t,e){if("function"==typeof t)e.callback=t;else if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var s=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,u=/\S/,c=new e;function l(t,e,n){return n=a(n,{ignoreWhitespace:!0}),c.diff(t,e,n)}function d(t,e,n){return c.diff(t,e,n)}c.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!u.test(t)&&!u.test(e)},c.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<e.length-1;n++)!e[n+1]&&e[n+2]&&s.test(e[n])&&s.test(e[n+2])&&(e[n]+=e[n+2],e.splice(n+1,2),n--);return e};var f=new e;function p(t,e,n){return f.diff(t,e,n)}function h(t,e,n){var r=a(n,{ignoreWhitespace:!0});return f.diff(t,e,r)}f.tokenize=function(t){var e=[],n=t.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?e[e.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),e.push(i))}return e};var g=new e;function v(t,e,n){return g.diff(t,e,n)}g.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};var m=new e;function y(t,e,n){return m.diff(t,e,n)}function b(t){return b="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},b(t)}function D(t){return w(t)||x(t)||A()}function w(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function x(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function A(){throw new TypeError("Invalid attempt to spread non-iterable instance")}m.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};var E=Object.prototype.toString,S=new e;function _(t,e,n){return S.diff(t,e,n)}function C(t,e,n,r,i){var o,a;for(e=e||[],n=n||[],r&&(t=r(i,t)),o=0;o<e.length;o+=1)if(e[o]===t)return n[o];if("[object Array]"===E.call(t)){for(e.push(t),a=new Array(t.length),n.push(a),o=0;o<t.length;o+=1)a[o]=C(t[o],e,n,r,i);return e.pop(),n.pop(),a}if(t&&t.toJSON&&(t=t.toJSON()),"object"===b(t)&&null!==t){e.push(t),a={},n.push(a);var s,u=[];for(s in t)t.hasOwnProperty(s)&&u.push(s);for(u.sort(),o=0;o<u.length;o+=1)a[s=u[o]]=C(t[s],e,n,r,s);e.pop(),n.pop()}else a=t;return a}S.useLongestToken=!0,S.tokenize=f.tokenize,S.castInput=function(t){var e=this.options,n=e.undefinedReplacement,r=e.stringifyReplacer,i=void 0===r?function(t,e){return void 0===e?n:e}:r;return"string"==typeof t?t:JSON.stringify(C(t,null,null,i),i," ")},S.equals=function(t,n){return e.prototype.equals.call(S,t.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var k=new e;function O(t,e,n){return k.diff(t,e,n)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.split(/\r\n|[\n\v\f\r\x85]/),r=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],o=0;function a(){var t={};for(i.push(t);o<n.length;){var r=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(r))break;var a=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(r);a&&(t.index=r.substring(a[0].length).trim()),o++}for(s(t),s(t),t.hunks=[];o<n.length;){var c=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))t.hunks.push(u());else{if(c&&e.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(c));o++}}}function s(t){var e=/^(---|\+\+\+)\s+/.exec(n[o]);if(e){var r="---"===e[1]?"old":"new",i=n[o].substring(3).trim().split("\t",2),a=i[0].replace(/\\\\/g,"\\");a.startsWith('"')&&a.endsWith('"')&&(a=a.substr(1,a.length-2)),t[r+"FileName"]=a,t[r+"Header"]=(i[1]||"").trim(),o++}}function u(){for(var t=o,i=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),a={oldStart:+i[1],oldLines:+i[2]||1,newStart:+i[3],newLines:+i[4]||1,lines:[],linedelimiters:[]},s=0,u=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var c=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;a.lines.push(n[o]),a.linedelimiters.push(r[o]||"\n"),"+"===c?s++:"-"===c?u++:" "===c&&(s++,u++)}if(s||1!==a.newLines||(a.newLines=0),u||1!==a.oldLines||(a.oldLines=0),e.strict){if(s!==a.newLines)throw new Error("Added line count did not match for hunk at line "+(t+1));if(u!==a.oldLines)throw new Error("Removed line count did not match for hunk at line "+(t+1))}return a}for(;o<n.length;)a();return i}function I(t,e,n){var r=!0,i=!1,o=!1,a=1;return function s(){if(r&&!o){if(i?a++:r=!1,t+a<=n)return a;o=!0}if(!i)return o||(r=!0),e<=t-a?-a++:(i=!0,s())}}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e&&(e=T(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var r,i,o=t.split(/\r\n|[\n\v\f\r\x85]/),a=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,u=n.compareLine||function(t,e,n,r){return e===r},c=0,l=n.fuzzFactor||0,d=0,f=0;function p(t,e){for(var n=0;n<t.lines.length;n++){var r=t.lines[n],i=r.length>0?r[0]:" ",a=r.length>0?r.substr(1):r;if(" "===i||"-"===i){if(!u(e+1,o[e],i,a)&&++c>l)return!1;e++}}return!0}for(var h=0;h<s.length;h++){for(var g=s[h],v=o.length-g.oldLines,m=0,y=f+g.oldStart-1,b=I(y,d,v);void 0!==m;m=b())if(p(g,y+m)){g.offset=f+=m;break}if(void 0===m)return!1;d=g.offset+g.oldStart+g.oldLines}for(var D=0,w=0;w<s.length;w++){var x=s[w],A=x.oldStart+x.offset+D-1;D+=x.newLines-x.oldLines,A<0&&(A=0);for(var E=0;E<x.lines.length;E++){var S=x.lines[E],_=S.length>0?S[0]:" ",C=S.length>0?S.substr(1):S,k=x.linedelimiters[E];if(" "===_)A++;else if("-"===_)o.splice(A,1),a.splice(A,1);else if("+"===_)o.splice(A,0,C),a.splice(A,0,k),A++;else if("\\"===_){var O=x.lines[E-1]?x.lines[E-1][0]:null;"+"===O?r=!0:"-"===O&&(i=!0)}}}if(r)for(;!o[o.length-1];)o.pop(),a.pop();else i&&(o.push(""),a.push("\n"));for(var j=0;j<o.length-1;j++)o[j]=o[j]+a[j];return o.join("")}function F(t,e){"string"==typeof t&&(t=T(t));var n=0;function r(){var i=t[n++];if(!i)return e.complete();e.loadFile(i,function(t,n){if(t)return e.complete(t);var o=j(n,i,e);e.patched(i,o,function(t){if(t)return e.complete(t);r()})})}r()}function N(t,e,n,r,i,o,a){a||(a={}),void 0===a.context&&(a.context=4);var s=p(n,r,a);function u(t){return t.map(function(t){return" "+t})}s.push({value:"",lines:[]});for(var c=[],l=0,d=0,f=[],h=1,g=1,v=function(t){var e=s[t],i=e.lines||e.value.replace(/\n$/,"").split("\n");if(e.lines=i,e.added||e.removed){var o;if(!l){var p=s[t-1];l=h,d=g,p&&(f=a.context>0?u(p.lines.slice(-a.context)):[],l-=f.length,d-=f.length)}(o=f).push.apply(o,D(i.map(function(t){return(e.added?"+":"-")+t}))),e.added?g+=i.length:h+=i.length}else{if(l)if(i.length<=2*a.context&&t<s.length-2){var v;(v=f).push.apply(v,D(u(i)))}else{var m,y=Math.min(i.length,a.context);(m=f).push.apply(m,D(u(i.slice(0,y))));var b={oldStart:l,oldLines:h-l+y,newStart:d,newLines:g-d+y,lines:f};if(t>=s.length-2&&i.length<=a.context){var w=/\n$/.test(n),x=/\n$/.test(r),A=0==i.length&&f.length>b.oldLines;!w&&A&&f.splice(b.oldLines,0,"\"),(w||A)&&x||f.push("\")}c.push(b),l=0,d=0,f=[]}h+=i.length,g+=i.length}},m=0;m<s.length;m++)v(m);return{oldFileName:t,newFileName:e,oldHeader:i,newHeader:o,hunks:c}}function P(t,e,n,r,i,o,a){var s=N(t,e,n,r,i,o,a),u=[];t==e&&u.push("Index: "+t),u.push("==================================================================="),u.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),u.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var c=0;c<s.hunks.length;c++){var l=s.hunks[c];u.push("@@ -"+l.oldStart+","+l.oldLines+" +"+l.newStart+","+l.newLines+" @@"),u.push.apply(u,l.lines)}return u.join("\n")+"\n"}function R(t,e,n,r,i,o){return P(t,t,e,n,r,i,o)}function M(t,e){return t.length===e.length&&B(t,e)}function B(t,e){if(e.length>t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function L(t){var e=nt(t.lines),n=e.oldLines,r=e.newLines;void 0!==n?t.oldLines=n:delete t.oldLines,void 0!==r?t.newLines=r:delete t.newLines}function H(t,e,n){t=q(t,n),e=q(e,n);var r={};(t.index||e.index)&&(r.index=t.index||e.index),(t.newFileName||e.newFileName)&&(U(t)?U(e)?(r.oldFileName=z(r,t.oldFileName,e.oldFileName),r.newFileName=z(r,t.newFileName,e.newFileName),r.oldHeader=z(r,t.oldHeader,e.oldHeader),r.newHeader=z(r,t.newHeader,e.newHeader)):(r.oldFileName=t.oldFileName,r.newFileName=t.newFileName,r.oldHeader=t.oldHeader,r.newHeader=t.newHeader):(r.oldFileName=e.oldFileName||t.oldFileName,r.newFileName=e.newFileName||t.newFileName,r.oldHeader=e.oldHeader||t.oldHeader,r.newHeader=e.newHeader||t.newHeader)),r.hunks=[];for(var i=0,o=0,a=0,s=0;i<t.hunks.length||o<e.hunks.length;){var u=t.hunks[i]||{oldStart:1/0},c=e.hunks[o]||{oldStart:1/0};if(W(u,c))r.hunks.push(G(u,a)),i++,s+=u.newLines-u.oldLines;else if(W(c,u))r.hunks.push(G(c,s)),o++,a+=c.newLines-c.oldLines;else{var l={oldStart:Math.min(u.oldStart,c.oldStart),oldLines:0,newStart:Math.min(u.newStart+a,c.oldStart+s),newLines:0,lines:[]};$(l,u.oldStart,u.lines,c.oldStart,c.lines),o++,i++,r.hunks.push(l)}}return r}function q(t,e){if("string"==typeof t){if(/^@@/m.test(t)||/^Index:/m.test(t))return T(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return N(void 0,void 0,e,t)}return t}function U(t){return t.newFileName&&t.newFileName!==t.oldFileName}function z(t,e,n){return e===n?e:(t.conflict=!0,{mine:e,theirs:n})}function W(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function G(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function $(t,e,n,r,i){var o={offset:e,lines:n,index:0},a={offset:r,lines:i,index:0};for(X(t,o,a),X(t,a,o);o.index<o.lines.length&&a.index<a.lines.length;){var s=o.lines[o.index],u=a.lines[a.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==u[0]&&"+"!==u[0])if("+"===s[0]&&" "===u[0]){var c;(c=t.lines).push.apply(c,D(Q(o)))}else if("+"===u[0]&&" "===s[0]){var l;(l=t.lines).push.apply(l,D(Q(a)))}else"-"===s[0]&&" "===u[0]?V(t,o,a):"-"===u[0]&&" "===s[0]?V(t,a,o,!0):s===u?(t.lines.push(s),o.index++,a.index++):K(t,Q(o),Q(a));else Y(t,o,a)}J(t,o),J(t,a),L(t)}function Y(t,e,n){var r=Q(e),i=Q(n);if(tt(r)&&tt(i)){var o,a;if(B(r,i)&&et(n,r,r.length-i.length))return void(o=t.lines).push.apply(o,D(r));if(B(i,r)&&et(e,i,i.length-r.length))return void(a=t.lines).push.apply(a,D(i))}else if(M(r,i)){var s;return void(s=t.lines).push.apply(s,D(r))}K(t,r,i)}function V(t,e,n,r){var i,o=Q(e),a=Z(n,o);a.merged?(i=t.lines).push.apply(i,D(a.merged)):K(t,r?a:o,r?o:a)}function K(t,e,n){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:n})}function X(t,e,n){for(;e.offset<n.offset&&e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r),e.offset++}}function J(t,e){for(;e.index<e.lines.length;){var n=e.lines[e.index++];t.lines.push(n)}}function Q(t){for(var e=[],n=t.lines[t.index][0];t.index<t.lines.length;){var r=t.lines[t.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;e.push(r),t.index++}return e}function Z(t,e){for(var n=[],r=[],i=0,o=!1,a=!1;i<e.length&&t.index<t.lines.length;){var s=t.lines[t.index],u=e[i];if("+"===u[0])break;if(o=o||" "!==s[0],r.push(u),i++,"+"===s[0])for(a=!0;"+"===s[0];)n.push(s),s=t.lines[++t.index];u.substr(1)===s.substr(1)?(n.push(s),t.index++):a=!0}if("+"===(e[i]||"")[0]&&o&&(a=!0),a)return n;for(;i<e.length;)r.push(e[i++]);return{merged:r,changes:n}}function tt(t){return t.reduce(function(t,e){return t&&"-"===e[0]},!0)}function et(t,e,n){for(var r=0;r<n;r++){var i=e[e.length-n+r].substr(1);if(t.lines[t.index+r]!==" "+i)return!1}return t.index+=n,!0}function nt(t){var e=0,n=0;return t.forEach(function(t){if("string"!=typeof t){var r=nt(t.mine),i=nt(t.theirs);void 0!==e&&(r.oldLines===i.oldLines?e+=r.oldLines:e=void 0),void 0!==n&&(r.newLines===i.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==t[0]&&" "!==t[0]||n++,void 0===e||"-"!==t[0]&&" "!==t[0]||e++}),{oldLines:e,newLines:n}}function rt(t){for(var e,n,r=[],i=0;i<t.length;i++)n=(e=t[i]).added?1:e.removed?-1:0,r.push([n,e.value]);return r}function it(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];r.added?e.push("<ins>"):r.removed&&e.push("<del>"),e.push(ot(r.value)),r.added?e.push("</ins>"):r.removed&&e.push("</del>")}return e.join("")}function ot(t){var e=t;return e=(e=(e=(e=e.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/"/g,"&quot;")}k.tokenize=function(t){return t.slice()},k.join=k.removeEmpty=function(t){return t},t.Diff=e,t.diffChars=o,t.diffWords=l,t.diffWordsWithSpace=d,t.diffLines=p,t.diffTrimmedLines=h,t.diffSentences=v,t.diffCss=y,t.diffJson=_,t.diffArrays=O,t.structuredPatch=N,t.createTwoFilesPatch=P,t.createPatch=R,t.applyPatch=j,t.applyPatches=F,t.parsePatch=T,t.merge=H,t.convertChangesToDMP=rt,t.convertChangesToXML=it,t.canonicalize=C,Object.defineProperty(t,"__esModule",{value:!0})}(e)},464(t){"use strict";t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},820(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,p=1/0,h=9007199254740991,g=NaN,v=4294967295,m=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",D="[object Boolean]",w="[object Date]",x="[object Error]",A="[object Function]",E="[object GeneratorFunction]",S="[object Map]",_="[object Number]",C="[object Object]",k="[object Promise]",O="[object RegExp]",T="[object Set]",I="[object String]",j="[object Symbol]",F="[object WeakMap]",N="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",M="[object Float64Array]",B="[object Int8Array]",L="[object Int16Array]",H="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",z="[object Uint16Array]",W="[object Uint32Array]",G=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,Y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,X=RegExp(V.source),J=RegExp(K.source),Q=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,tt=/<%=([\s\S]+?)%>/g,et=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),at=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,lt=/,? & /,dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,gt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,Dt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xt=/($^)/,At=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_t="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",kt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",Tt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="['\u2019]",jt="["+Et+"]",Ft="["+Tt+"]",Nt="["+St+"]",Pt="\\d+",Rt="["+_t+"]",Mt="["+Ct+"]",Bt="[^"+Et+Tt+Pt+_t+Ct+kt+"]",Lt="\\ud83c[\\udffb-\\udfff]",Ht="[^"+Et+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+kt+"]",Wt="\\u200d",Gt="(?:"+Mt+"|"+Bt+")",$t="(?:"+zt+"|"+Bt+")",Yt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Vt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+Nt+"|"+Lt+")"+"?",Xt="["+Ot+"]?",Jt=Xt+Kt+("(?:"+Wt+"(?:"+[Ht,qt,Ut].join("|")+")"+Xt+Kt+")*"),Qt="(?:"+[Rt,qt,Ut].join("|")+")"+Jt,Zt="(?:"+[Ht+Nt+"?",Nt,qt,Ut,jt].join("|")+")",te=RegExp(It,"g"),ee=RegExp(Nt,"g"),ne=RegExp(Lt+"(?="+Lt+")|"+Zt+Jt,"g"),re=RegExp([zt+"?"+Mt+"+"+Yt+"(?="+[Ft,zt,"$"].join("|")+")",$t+"+"+Vt+"(?="+[Ft,zt+Gt,"$"].join("|")+")",zt+"?"+Gt+"+"+Yt,zt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Pt,Qt].join("|"),"g"),ie=RegExp("["+Wt+Et+St+Ot+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ae=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,ue={};ue[R]=ue[M]=ue[B]=ue[L]=ue[H]=ue[q]=ue[U]=ue[z]=ue[W]=!0,ue[y]=ue[b]=ue[N]=ue[D]=ue[P]=ue[w]=ue[x]=ue[A]=ue[S]=ue[_]=ue[C]=ue[O]=ue[T]=ue[I]=ue[F]=!1;var ce={};ce[y]=ce[b]=ce[N]=ce[P]=ce[D]=ce[w]=ce[R]=ce[M]=ce[B]=ce[L]=ce[H]=ce[S]=ce[_]=ce[C]=ce[O]=ce[T]=ce[I]=ce[j]=ce[q]=ce[U]=ce[z]=ce[W]=!0,ce[x]=ce[A]=ce[F]=!1;var le={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},de=parseFloat,fe=parseInt,pe="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,he="object"==typeof self&&self&&self.Object===Object&&self,ge=pe||he||Function("return this")(),ve=e&&!e.nodeType&&e,me=ve&&t&&!t.nodeType&&t,ye=me&&me.exports===ve,be=ye&&pe.process,De=function(){try{var t=me&&me.require&&me.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),we=De&&De.isArrayBuffer,xe=De&&De.isDate,Ae=De&&De.isMap,Ee=De&&De.isRegExp,Se=De&&De.isSet,_e=De&&De.isTypedArray;function Ce(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ke(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function je(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function Fe(t,e){return!!(null==t?0:t.length)&&ze(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Pe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Re(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Me(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function Be(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var He=Ye("length");function qe(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function Ue(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function ze(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):Ue(t,Ge,n)}function We(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ge(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Xe(t,e)/n:g}function Ye(t){return function(e){return null==e?i:e[t]}}function Ve(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,n,r,i){return i(t,function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)}),n}function Xe(t,e){for(var n,r=-1,o=t.length;++r<o;){var a=e(t[r]);a!==i&&(n=n===i?a:n+a)}return n}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Qe(t){return t?t.slice(0,vn(t)+1).replace(at,""):t}function Ze(t){return function(e){return t(e)}}function tn(t,e){return Pe(e,function(e){return t[e]})}function en(t,e){return t.has(e)}function nn(t,e){for(var n=-1,r=t.length;++n<r&&ze(e,t[n],0)>-1;);return n}function rn(t,e){for(var n=t.length;n--&&ze(e,t[n],0)>-1;);return n}var on=Ve({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),an=Ve({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(t){return"\\"+le[t]}function un(t){return ie.test(t)}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function ln(t,e){return function(n){return t(e(n))}}function dn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function fn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function pn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function hn(t){return un(t)?function(t){var e=ne.lastIndex=0;for(;ne.test(t);)++e;return e}(t):He(t)}function gn(t){return un(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.split("")}(t)}function vn(t){for(var e=t.length;e--&&st.test(t.charAt(e)););return e}var mn=Ve({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function t(e){var n,r=(e=null==e?ge:yn.defaults(ge.Object(),e,yn.pick(ge,ae))).Array,st=e.Date,Et=e.Error,St=e.Function,_t=e.Math,Ct=e.Object,kt=e.RegExp,Ot=e.String,Tt=e.TypeError,It=r.prototype,jt=St.prototype,Ft=Ct.prototype,Nt=e["__core-js_shared__"],Pt=jt.toString,Rt=Ft.hasOwnProperty,Mt=0,Bt=(n=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Lt=Ft.toString,Ht=Pt.call(Ct),qt=ge._,Ut=kt("^"+Pt.call(Rt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),zt=ye?e.Buffer:i,Wt=e.Symbol,Gt=e.Uint8Array,$t=zt?zt.allocUnsafe:i,Yt=ln(Ct.getPrototypeOf,Ct),Vt=Ct.create,Kt=Ft.propertyIsEnumerable,Xt=It.splice,Jt=Wt?Wt.isConcatSpreadable:i,Qt=Wt?Wt.iterator:i,Zt=Wt?Wt.toStringTag:i,ne=function(){try{var t=po(Ct,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==ge.clearTimeout&&e.clearTimeout,le=st&&st.now!==ge.Date.now&&st.now,pe=e.setTimeout!==ge.setTimeout&&e.setTimeout,he=_t.ceil,ve=_t.floor,me=Ct.getOwnPropertySymbols,be=zt?zt.isBuffer:i,De=e.isFinite,He=It.join,Ve=ln(Ct.keys,Ct),bn=_t.max,Dn=_t.min,wn=st.now,xn=e.parseInt,An=_t.random,En=It.reverse,Sn=po(e,"DataView"),_n=po(e,"Map"),Cn=po(e,"Promise"),kn=po(e,"Set"),On=po(e,"WeakMap"),Tn=po(Ct,"create"),In=On&&new On,jn={},Fn=Lo(Sn),Nn=Lo(_n),Pn=Lo(Cn),Rn=Lo(kn),Mn=Lo(On),Bn=Wt?Wt.prototype:i,Ln=Bn?Bn.valueOf:i,Hn=Bn?Bn.toString:i;function qn(t){if(ns(t)&&!Ga(t)&&!(t instanceof Gn)){if(t instanceof Wn)return t;if(Rt.call(t,"__wrapped__"))return Ho(t)}return new Wn(t)}var Un=function(){function t(){}return function(e){if(!es(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function zn(){}function Wn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Gn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function $n(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Vn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new Yn(t);this.size=e.size}function Jn(t,e){var n=Ga(t),r=!n&&Wa(t),i=!n&&!r&&Ka(t),o=!n&&!r&&!i&&ls(t),a=n||r||i||o,s=a?Je(t.length,Ot):[],u=s.length;for(var c in t)!e&&!Rt.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Do(c,u))||s.push(c);return s}function Qn(t){var e=t.length;return e?t[Kr(0,e-1)]:i}function Zn(t,e){return Ro(Ti(t),ur(e,0,t.length))}function tr(t){return Ro(Ti(t))}function er(t,e,n){(n!==i&&!qa(t[e],n)||n===i&&!(e in t))&&ar(t,e,n)}function nr(t,e,n){var r=t[e];Rt.call(t,e)&&qa(r,n)&&(n!==i||e in t)||ar(t,e,n)}function rr(t,e){for(var n=t.length;n--;)if(qa(t[n][0],e))return n;return-1}function ir(t,e,n,r){return pr(t,function(t,i,o){e(r,t,n(t),o)}),r}function or(t,e){return t&&Ii(e,js(e),t)}function ar(t,e,n){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,o=e.length,a=r(o),s=null==t;++n<o;)a[n]=s?i:Cs(t,e[n]);return a}function ur(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function cr(t,e,n,r,o,a){var s,u=1&e,c=2&e,l=4&e;if(n&&(s=o?n(t,r,o,a):n(t)),s!==i)return s;if(!es(t))return t;var d=Ga(t);if(d){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return Ti(t,s)}else{var f=vo(t),p=f==A||f==E;if(Ka(t))return Ei(t,u);if(f==C||f==y||p&&!o){if(s=c||p?{}:yo(t),!u)return c?function(t,e){return Ii(t,go(t),e)}(t,function(t,e){return t&&Ii(e,Fs(e),t)}(s,t)):function(t,e){return Ii(t,ho(t),e)}(t,or(s,t))}else{if(!ce[f])return o?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case N:return Si(t);case D:case w:return new r(+t);case P:return function(t,e){var n=e?Si(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case M:case B:case L:case H:case q:case U:case z:case W:return _i(t,n);case S:return new r;case _:case I:return new r(t);case O:return function(t){var e=new t.constructor(t.source,gt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new r;case j:return i=t,Ln?Ct(Ln.call(i)):{}}var i}(t,f,u)}}a||(a=new Xn);var h=a.get(t);if(h)return h;a.set(t,s),ss(t)?t.forEach(function(r){s.add(cr(r,e,n,r,t,a))}):rs(t)&&t.forEach(function(r,i){s.set(i,cr(r,e,n,i,t,a))});var g=d?i:(l?c?oo:io:c?Fs:js)(t);return Oe(g||t,function(r,i){g&&(r=t[i=r]),nr(s,i,cr(r,e,n,i,t,a))}),s}function lr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Ct(t);r--;){var o=n[r],a=e[o],s=t[o];if(s===i&&!(o in t)||!a(s))return!1}return!0}function dr(t,e,n){if("function"!=typeof t)throw new Tt(o);return jo(function(){t.apply(i,n)},e)}function fr(t,e,n,r){var i=-1,o=Fe,a=!0,s=t.length,u=[],c=e.length;if(!s)return u;n&&(e=Pe(e,Ze(n))),r?(o=Ne,a=!1):e.length>=200&&(o=en,a=!1,e=new Kn(e));t:for(;++i<s;){var l=t[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d==d){for(var f=c;f--;)if(e[f]===d)continue t;u.push(l)}else o(e,d,r)||u.push(l)}return u}qn.templateSettings={escape:Q,evaluate:Z,interpolate:tt,variable:"",imports:{_:qn}},qn.prototype=zn.prototype,qn.prototype.constructor=qn,Wn.prototype=Un(zn.prototype),Wn.prototype.constructor=Wn,Gn.prototype=Un(zn.prototype),Gn.prototype.constructor=Gn,$n.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},$n.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$n.prototype.get=function(t){var e=this.__data__;if(Tn){var n=e[t];return n===a?i:n}return Rt.call(e,t)?e[t]:i},$n.prototype.has=function(t){var e=this.__data__;return Tn?e[t]!==i:Rt.call(e,t)},$n.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Tn&&e===i?a:e,this},Yn.prototype.clear=function(){this.__data__=[],this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=rr(e,t);return!(n<0)&&(n==e.length-1?e.pop():Xt.call(e,n,1),--this.size,!0)},Yn.prototype.get=function(t){var e=this.__data__,n=rr(e,t);return n<0?i:e[n][1]},Yn.prototype.has=function(t){return rr(this.__data__,t)>-1},Yn.prototype.set=function(t,e){var n=this.__data__,r=rr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new $n,map:new(_n||Yn),string:new $n}},Vn.prototype.delete=function(t){var e=lo(this,t).delete(t);return this.size-=e?1:0,e},Vn.prototype.get=function(t){return lo(this,t).get(t)},Vn.prototype.has=function(t){return lo(this,t).has(t)},Vn.prototype.set=function(t,e){var n=lo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(t){return this.__data__.set(t,a),this},Kn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Yn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Yn){var r=n.__data__;if(!_n||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vn(r)}return n.set(t,e),this.size=n.size,this};var pr=Ni(wr),hr=Ni(xr,!0);function gr(t,e){var n=!0;return pr(t,function(t,r,i){return n=!!e(t,r,i)}),n}function vr(t,e,n){for(var r=-1,o=t.length;++r<o;){var a=t[r],s=e(a);if(null!=s&&(u===i?s==s&&!cs(s):n(s,u)))var u=s,c=a}return c}function mr(t,e){var n=[];return pr(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function yr(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=bo),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?yr(s,e-1,n,r,i):Re(i,s):r||(i[i.length]=s)}return i}var br=Pi(),Dr=Pi(!0);function wr(t,e){return t&&br(t,e,js)}function xr(t,e){return t&&Dr(t,e,js)}function Ar(t,e){return je(e,function(e){return Qa(t[e])})}function Er(t,e){for(var n=0,r=(e=Di(e,t)).length;null!=t&&n<r;)t=t[Bo(e[n++])];return n&&n==r?t:i}function Sr(t,e,n){var r=e(t);return Ga(t)?r:Re(r,n(t))}function _r(t){return null==t?t===i?"[object Undefined]":"[object Null]":Zt&&Zt in Ct(t)?function(t){var e=Rt.call(t,Zt),n=t[Zt];try{t[Zt]=i;var r=!0}catch(t){}var o=Lt.call(t);r&&(e?t[Zt]=n:delete t[Zt]);return o}(t):function(t){return Lt.call(t)}(t)}function Cr(t,e){return t>e}function kr(t,e){return null!=t&&Rt.call(t,e)}function Or(t,e){return null!=t&&e in Ct(t)}function Tr(t,e,n){for(var o=n?Ne:Fe,a=t[0].length,s=t.length,u=s,c=r(s),l=1/0,d=[];u--;){var f=t[u];u&&e&&(f=Pe(f,Ze(e))),l=Dn(f.length,l),c[u]=!n&&(e||a>=120&&f.length>=120)?new Kn(u&&f):i}f=t[0];var p=-1,h=c[0];t:for(;++p<a&&d.length<l;){var g=f[p],v=e?e(g):g;if(g=n||0!==g?g:0,!(h?en(h,v):o(d,v,n))){for(u=s;--u;){var m=c[u];if(!(m?en(m,v):o(t[u],v,n)))continue t}h&&h.push(v),d.push(g)}}return d}function Ir(t,e,n){var r=null==(t=Oo(t,e=Di(e,t)))?t:t[Bo(Jo(e))];return null==r?i:Ce(r,t,n)}function jr(t){return ns(t)&&_r(t)==y}function Fr(t,e,n,r,o){return t===e||(null==t||null==e||!ns(t)&&!ns(e)?t!=t&&e!=e:function(t,e,n,r,o,a){var s=Ga(t),u=Ga(e),c=s?b:vo(t),l=u?b:vo(e),d=(c=c==y?C:c)==C,f=(l=l==y?C:l)==C,p=c==l;if(p&&Ka(t)){if(!Ka(e))return!1;s=!0,d=!1}if(p&&!d)return a||(a=new Xn),s||ls(t)?no(t,e,n,r,o,a):function(t,e,n,r,i,o,a){switch(n){case P:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!o(new Gt(t),new Gt(e)));case D:case w:case _:return qa(+t,+e);case x:return t.name==e.name&&t.message==e.message;case O:case I:return t==e+"";case S:var s=cn;case T:var u=1&r;if(s||(s=fn),t.size!=e.size&&!u)return!1;var c=a.get(t);if(c)return c==e;r|=2,a.set(t,e);var l=no(s(t),s(e),r,i,o,a);return a.delete(t),l;case j:if(Ln)return Ln.call(t)==Ln.call(e)}return!1}(t,e,c,n,r,o,a);if(!(1&n)){var h=d&&Rt.call(t,"__wrapped__"),g=f&&Rt.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,m=g?e.value():e;return a||(a=new Xn),o(v,m,n,r,a)}}if(!p)return!1;return a||(a=new Xn),function(t,e,n,r,o,a){var s=1&n,u=io(t),c=u.length,l=io(e),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var p=u[f];if(!(s?p in e:Rt.call(e,p)))return!1}var h=a.get(t),g=a.get(e);if(h&&g)return h==e&&g==t;var v=!0;a.set(t,e),a.set(e,t);var m=s;for(;++f<c;){var y=t[p=u[f]],b=e[p];if(r)var D=s?r(b,y,p,e,t,a):r(y,b,p,t,e,a);if(!(D===i?y===b||o(y,b,n,r,a):D)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,o,a)}(t,e,n,r,Fr,o))}function Nr(t,e,n,r){var o=n.length,a=o,s=!r;if(null==t)return!a;for(t=Ct(t);o--;){var u=n[o];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=n[o])[0],l=t[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in t))return!1}else{var f=new Xn;if(r)var p=r(l,d,c,t,e,f);if(!(p===i?Fr(d,l,3,r,f):p))return!1}}return!0}function Pr(t){return!(!es(t)||(e=t,Bt&&Bt in e))&&(Qa(t)?Ut:yt).test(Lo(t));var e}function Rr(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Ga(t)?Ur(t[0],t[1]):qr(t):pu(t)}function Mr(t){if(!So(t))return Ve(t);var e=[];for(var n in Ct(t))Rt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Br(t){if(!es(t))return function(t){var e=[];if(null!=t)for(var n in Ct(t))e.push(n);return e}(t);var e=So(t),n=[];for(var r in t)("constructor"!=r||!e&&Rt.call(t,r))&&n.push(r);return n}function Lr(t,e){return t<e}function Hr(t,e){var n=-1,i=Ya(t)?r(t.length):[];return pr(t,function(t,r,o){i[++n]=e(t,r,o)}),i}function qr(t){var e=fo(t);return 1==e.length&&e[0][2]?Co(e[0][0],e[0][1]):function(n){return n===t||Nr(n,t,e)}}function Ur(t,e){return xo(t)&&_o(e)?Co(Bo(t),e):function(n){var r=Cs(n,t);return r===i&&r===e?ks(n,t):Fr(e,r,3)}}function zr(t,e,n,r,o){t!==e&&br(e,function(a,s){if(o||(o=new Xn),es(a))!function(t,e,n,r,o,a,s){var u=To(t,n),c=To(e,n),l=s.get(c);if(l)return void er(t,n,l);var d=a?a(u,c,n+"",t,e,s):i,f=d===i;if(f){var p=Ga(c),h=!p&&Ka(c),g=!p&&!h&&ls(c);d=c,p||h||g?Ga(u)?d=u:Va(u)?d=Ti(u):h?(f=!1,d=Ei(c,!0)):g?(f=!1,d=_i(c,!0)):d=[]:os(c)||Wa(c)?(d=u,Wa(u)?d=ys(u):es(u)&&!Qa(u)||(d=yo(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(t,n,d)}(t,e,s,n,zr,r,o);else{var u=r?r(To(t,s),a,s+"",t,e,o):i;u===i&&(u=a),er(t,s,u)}},Fs)}function Wr(t,e){var n=t.length;if(n)return Do(e+=e<0?n:0,n)?t[e]:i}function Gr(t,e,n){e=e.length?Pe(e,function(t){return Ga(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t}):[iu];var r=-1;e=Pe(e,Ze(co()));var i=Hr(t,function(t,n,i){var o=Pe(e,function(e){return e(t)});return{criteria:o,index:++r,value:t}});return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(i,function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)})}function $r(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],s=Er(t,a);n(s,a)&&ti(o,Di(a,t),s)}return o}function Yr(t,e,n,r){var i=r?We:ze,o=-1,a=e.length,s=t;for(t===e&&(e=Ti(e)),n&&(s=Pe(t,Ze(n)));++o<a;)for(var u=0,c=e[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==t&&Xt.call(s,u,1),Xt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;Do(i)?Xt.call(t,i,1):fi(t,i)}}return t}function Kr(t,e){return t+ve(An()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ve(e/2))&&(t+=t)}while(e);return n}function Jr(t,e){return Fo(ko(t,e,iu),t+"")}function Qr(t){return Qn(qs(t))}function Zr(t,e){var n=qs(t);return Ro(n,ur(e,0,n.length))}function ti(t,e,n,r){if(!es(t))return t;for(var o=-1,a=(e=Di(e,t)).length,s=a-1,u=t;null!=u&&++o<a;){var c=Bo(e[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:Do(e[o+1])?[]:{})}nr(u,c,l),u=u[c]}return t}var ei=In?function(t,e){return In.set(t,e),t}:iu,ni=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ri(t){return Ro(qs(t))}function ii(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var a=r(o);++i<o;)a[i]=t[i+e];return a}function oi(t,e){var n;return pr(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function ai(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!cs(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return si(t,e,iu,n)}function si(t,e,n,r){var o=0,a=null==t?0:t.length;if(0===a)return 0;for(var s=(e=n(e))!=e,u=null===e,c=cs(e),l=e===i;o<a;){var d=ve((o+a)/2),f=n(t[d]),p=f!==i,h=null===f,g=f==f,v=cs(f);if(s)var m=r||g;else m=l?g&&(r||p):u?g&&p&&(r||!h):c?g&&p&&!h&&(r||!v):!h&&!v&&(r?f<=e:f<e);m?o=d+1:a=d}return Dn(a,4294967294)}function ui(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],s=e?e(a):a;if(!n||!qa(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ci(t){return"number"==typeof t?t:cs(t)?g:+t}function li(t){if("string"==typeof t)return t;if(Ga(t))return Pe(t,li)+"";if(cs(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function di(t,e,n){var r=-1,i=Fe,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Ne;else if(o>=200){var c=e?null:Xi(t);if(c)return fn(c);a=!1,i=en,u=new Kn}else u=e?[]:s;t:for(;++r<o;){var l=t[r],d=e?e(l):l;if(l=n||0!==l?l:0,a&&d==d){for(var f=u.length;f--;)if(u[f]===d)continue t;e&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function fi(t,e){var n=-1,r=(e=Di(e,t)).length;if(!r)return!0;for(;++n<r;){var i=Bo(e[n]);if("__proto__"===i&&!Rt.call(t,"__proto__"))return!1;if(("constructor"===i||"prototype"===i)&&n<r-1)return!1}var o=Oo(t,e);return null==o||delete o[Bo(Jo(e))]}function pi(t,e,n,r){return ti(t,e,n(Er(t,e)),r)}function hi(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?ii(t,r?0:o,r?o+1:i):ii(t,r?o+1:0,r?i:o)}function gi(t,e){var n=t;return n instanceof Gn&&(n=n.value()),Me(e,function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))},n)}function vi(t,e,n){var i=t.length;if(i<2)return i?di(t[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=t[o],u=-1;++u<i;)u!=o&&(a[o]=fr(a[o]||s,t[u],e,n));return di(yr(a,1),e,n)}function mi(t,e,n){for(var r=-1,o=t.length,a=e.length,s={};++r<o;){var u=r<a?e[r]:i;n(s,t[r],u)}return s}function yi(t){return Va(t)?t:[]}function bi(t){return"function"==typeof t?t:iu}function Di(t,e){return Ga(t)?t:xo(t,e)?[t]:Mo(bs(t))}var wi=Jr;function xi(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:ii(t,e,n)}var Ai=ie||function(t){return ge.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var n=t.length,r=$t?$t(n):new t.constructor(n);return t.copy(r),r}function Si(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function _i(t,e){var n=e?Si(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ci(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,a=cs(t),s=e!==i,u=null===e,c=e==e,l=cs(e);if(!u&&!l&&!a&&t>e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&t<e||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function ki(t,e,n,i){for(var o=-1,a=t.length,s=n.length,u=-1,c=e.length,l=bn(a-s,0),d=r(c+l),f=!i;++u<c;)d[u]=e[u];for(;++o<s;)(f||o<a)&&(d[n[o]]=t[o]);for(;l--;)d[u++]=t[o++];return d}function Oi(t,e,n,i){for(var o=-1,a=t.length,s=-1,u=n.length,c=-1,l=e.length,d=bn(a-u,0),f=r(d+l),p=!i;++o<d;)f[o]=t[o];for(var h=o;++c<l;)f[h+c]=e[c];for(;++s<u;)(p||o<a)&&(f[h+n[s]]=t[o++]);return f}function Ti(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function Ii(t,e,n,r){var o=!n;n||(n={});for(var a=-1,s=e.length;++a<s;){var u=e[a],c=r?r(n[u],t[u],u,n,t):i;c===i&&(c=t[u]),o?ar(n,u,c):nr(n,u,c)}return n}function ji(t,e){return function(n,r){var i=Ga(n)?ke:ir,o=e?e():{};return i(n,t,co(r,2),o)}}function Fi(t){return Jr(function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=t.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),e=Ct(e);++r<o;){var u=n[r];u&&t(e,u,r,a)}return e})}function Ni(t,e){return function(n,r){if(null==n)return n;if(!Ya(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Ct(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Pi(t){return function(e,n,r){for(var i=-1,o=Ct(e),a=r(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===n(o[u],u,o))break}return e}}function Ri(t){return function(e){var n=un(e=bs(e))?gn(e):i,r=n?n[0]:e.charAt(0),o=n?xi(n,1).join(""):e.slice(1);return r[t]()+o}}function Mi(t){return function(e){return Me(Qs(Ws(e).replace(te,"")),t,"")}}function Bi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Un(t.prototype),r=t.apply(n,e);return es(r)?r:n}}function Li(t){return function(e,n,r){var o=Ct(e);if(!Ya(e)){var a=co(n,3);e=js(e),n=function(t){return a(o[t],t,o)}}var s=t(e,n,r);return s>-1?o[a?e[s]:s]:i}}function Hi(t){return ro(function(e){var n=e.length,r=n,a=Wn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new Tt(o);if(a&&!u&&"wrapper"==so(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=so(s=e[r]),l="wrapper"==c?ao(s):i;u=l&&Ao(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[so(l[0])].apply(u,l[3]):1==s.length&&Ao(s)?u[c]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ga(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}})}function qi(t,e,n,o,a,s,u,c,l,f){var p=e&d,h=1&e,g=2&e,v=24&e,m=512&e,y=g?i:Bi(t);return function d(){for(var b=arguments.length,D=r(b),w=b;w--;)D[w]=arguments[w];if(v)var x=uo(d),A=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(D,x);if(o&&(D=ki(D,o,a,v)),s&&(D=Oi(D,s,u,v)),b-=A,v&&b<f){var E=dn(D,x);return Vi(t,e,qi,d.placeholder,n,D,E,c,l,f-b)}var S=h?n:this,_=g?S[t]:t;return b=D.length,c?D=function(t,e){var n=t.length,r=Dn(e.length,n),o=Ti(t);for(;r--;){var a=e[r];t[r]=Do(a,n)?o[a]:i}return t}(D,c):m&&b>1&&D.reverse(),p&&l<b&&(D.length=l),this&&this!==ge&&this instanceof d&&(_=y||Bi(_)),_.apply(S,D)}}function Ui(t,e){return function(n,r){return function(t,e,n,r){return wr(t,function(t,i,o){e(r,n(t),i,o)}),r}(n,t,e(r),{})}}function zi(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=t(n,r)}return o}}function Wi(t){return ro(function(e){return e=Pe(e,Ze(co())),Jr(function(n){var r=this;return t(e,function(t){return Ce(t,r,n)})})})}function Gi(t,e){var n=(e=e===i?" ":li(e)).length;if(n<2)return n?Xr(e,t):e;var r=Xr(e,he(t/hn(e)));return un(e)?xi(gn(r),0,t).join(""):r.slice(0,t)}function $i(t){return function(e,n,o){return o&&"number"!=typeof o&&wo(e,n,o)&&(n=o=i),e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n,i){for(var o=-1,a=bn(he((e-t)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=t,t+=n;return s}(e,n,o=o===i?e<n?1:-1:hs(o),t)}}function Yi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ms(e),n=ms(n)),t(e,n)}}function Vi(t,e,n,r,o,a,s,u,d,f){var p=8&e;e|=p?c:l,4&(e&=~(p?l:c))||(e&=-4);var h=[t,e,o,p?a:i,p?s:i,p?i:a,p?i:s,u,d,f],g=n.apply(i,h);return Ao(t)&&Io(g,h),g.placeholder=r,No(g,t,e)}function Ki(t){var e=_t[t];return function(t,n){if(t=ms(t),(n=null==n?0:Dn(gs(n),292))&&De(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xi=kn&&1/fn(new kn([,-0]))[1]==p?function(t){return new kn(t)}:cu;function Ji(t){return function(e){var n=vo(e);return n==S?cn(e):n==T?pn(e):function(t,e){return Pe(e,function(e){return[e,t[e]]})}(e,t(e))}}function Qi(t,e,n,a,p,h,g,v){var m=2&e;if(!m&&"function"!=typeof t)throw new Tt(o);var y=a?a.length:0;if(y||(e&=-97,a=p=i),g=g===i?g:bn(gs(g),0),v=v===i?v:gs(v),y-=p?p.length:0,e&l){var b=a,D=p;a=p=i}var w=m?i:ao(t),x=[t,e,n,a,p,b,D,h,g,v];if(w&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?ki(c,u,e[4]):u,t[4]=c?dn(t[3],s):e[4]}(u=e[5])&&(c=t[5],t[5]=c?Oi(c,u,e[6]):u,t[6]=c?dn(t[5],s):e[6]);(u=e[7])&&(t[7]=u);r&d&&(t[8]=null==t[8]?e[8]:Dn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(x,w),t=x[0],e=x[1],n=x[2],a=x[3],p=x[4],!(v=x[9]=x[9]===i?m?0:t.length:bn(x[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)A=8==e||e==u?function(t,e,n){var o=Bi(t);return function a(){for(var s=arguments.length,u=r(s),c=s,l=uo(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<n?Vi(t,e,qi,a.placeholder,i,u,d,i,i,n-s):Ce(this&&this!==ge&&this instanceof a?o:t,this,u)}}(t,e,v):e!=c&&33!=e||p.length?qi.apply(i,x):function(t,e,n,i){var o=1&e,a=Bi(t);return function e(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=r(l+u),f=this&&this!==ge&&this instanceof e?a:t;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return Ce(f,o?n:this,d)}}(t,e,n,a);else var A=function(t,e,n){var r=1&e,i=Bi(t);return function e(){return(this&&this!==ge&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return No((w?ei:Io)(A,x),t,e)}function Zi(t,e,n,r){return t===i||qa(t,Ft[n])&&!Rt.call(r,n)?e:t}function to(t,e,n,r,o,a){return es(t)&&es(e)&&(a.set(e,t),zr(t,e,i,to,a),a.delete(e)),t}function eo(t){return os(t)?i:t}function no(t,e,n,r,o,a){var s=1&n,u=t.length,c=e.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(t),d=a.get(e);if(l&&d)return l==e&&d==t;var f=-1,p=!0,h=2&n?new Kn:i;for(a.set(t,e),a.set(e,t);++f<u;){var g=t[f],v=e[f];if(r)var m=s?r(v,g,f,e,t,a):r(g,v,f,t,e,a);if(m!==i){if(m)continue;p=!1;break}if(h){if(!Le(e,function(t,e){if(!en(h,e)&&(g===t||o(g,t,n,r,a)))return h.push(e)})){p=!1;break}}else if(g!==v&&!o(g,v,n,r,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function ro(t){return Fo(ko(t,i,$o),t+"")}function io(t){return Sr(t,js,ho)}function oo(t){return Sr(t,Fs,go)}var ao=In?function(t){return In.get(t)}:cu;function so(t){for(var e=t.name+"",n=jn[e],r=Rt.call(jn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function uo(t){return(Rt.call(qn,"placeholder")?qn:t).placeholder}function co(){var t=qn.iteratee||ou;return t=t===ou?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function lo(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function fo(t){for(var e=js(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,_o(i)]}return e}function po(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Pr(n)?n:i}var ho=me?function(t){return null==t?[]:(t=Ct(t),je(me(t),function(e){return Kt.call(t,e)}))}:vu,go=me?function(t){for(var e=[];t;)Re(e,ho(t)),t=Yt(t);return e}:vu,vo=_r;function mo(t,e,n){for(var r=-1,i=(e=Di(e,t)).length,o=!1;++r<i;){var a=Bo(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ts(i)&&Do(a,i)&&(Ga(t)||Wa(t))}function yo(t){return"function"!=typeof t.constructor||So(t)?{}:Un(Yt(t))}function bo(t){return Ga(t)||Wa(t)||!!(Jt&&t&&t[Jt])}function Do(t,e){var n=typeof t;return!!(e=e??h)&&("number"==n||"symbol"!=n&&Dt.test(t))&&t>-1&&t%1==0&&t<e}function wo(t,e,n){if(!es(n))return!1;var r=typeof e;return!!("number"==r?Ya(n)&&Do(e,n.length):"string"==r&&e in n)&&qa(n[e],t)}function xo(t,e){if(Ga(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!cs(t))||(nt.test(t)||!et.test(t)||null!=e&&t in Ct(e))}function Ao(t){var e=so(t),n=qn[e];if("function"!=typeof n||!(e in Gn.prototype))return!1;if(t===n)return!0;var r=ao(n);return!!r&&t===r[0]}(Sn&&vo(new Sn(new ArrayBuffer(1)))!=P||_n&&vo(new _n)!=S||Cn&&vo(Cn.resolve())!=k||kn&&vo(new kn)!=T||On&&vo(new On)!=F)&&(vo=function(t){var e=_r(t),n=e==C?t.constructor:i,r=n?Lo(n):"";if(r)switch(r){case Fn:return P;case Nn:return S;case Pn:return k;case Rn:return T;case Mn:return F}return e});var Eo=Nt?Qa:mu;function So(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function _o(t){return t==t&&!es(t)}function Co(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in Ct(n)))}}function ko(t,e,n){return e=bn(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,a=bn(i.length-e,0),s=r(a);++o<a;)s[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(s),Ce(t,this,u)}}function Oo(t,e){return e.length<2?t:Er(t,ii(e,0,-1))}function To(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Io=Po(ei),jo=pe||function(t,e){return ge.setTimeout(t,e)},Fo=Po(ni);function No(t,e,n){var r=e+"";return Fo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Oe(m,function(n){var r="_."+n[0];e&n[1]&&!Fe(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(lt):[]}(r),n)))}function Po(t){var e=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ro(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n<e;){var a=Kr(n,o),s=t[a];t[a]=t[n],t[n]=s}return t.length=e,t}var Mo=function(t){var e=Pa(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,function(t,n,r,i){e.push(r?i.replace(pt,"$1"):n||t)}),e});function Bo(t){if("string"==typeof t||cs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Lo(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ho(t){if(t instanceof Gn)return t.clone();var e=new Wn(t.__wrapped__,t.__chain__);return e.__actions__=Ti(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qo=Jr(function(t,e){return Va(t)?fr(t,yr(e,1,Va,!0)):[]}),Uo=Jr(function(t,e){var n=Jo(e);return Va(n)&&(n=i),Va(t)?fr(t,yr(e,1,Va,!0),co(n,2)):[]}),zo=Jr(function(t,e){var n=Jo(e);return Va(n)&&(n=i),Va(t)?fr(t,yr(e,1,Va,!0),i,n):[]});function Wo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),Ue(t,co(e,3),i)}function Go(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==i&&(o=gs(n),o=n<0?bn(r+o,0):Dn(o,r-1)),Ue(t,co(e,3),o,!0)}function $o(t){return(null==t?0:t.length)?yr(t,1):[]}function Yo(t){return t&&t.length?t[0]:i}var Vo=Jr(function(t){var e=Pe(t,yi);return e.length&&e[0]===t[0]?Tr(e):[]}),Ko=Jr(function(t){var e=Jo(t),n=Pe(t,yi);return e===Jo(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Tr(n,co(e,2)):[]}),Xo=Jr(function(t){var e=Jo(t),n=Pe(t,yi);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Tr(n,i,e):[]});function Jo(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Qo=Jr(Zo);function Zo(t,e){return t&&t.length&&e&&e.length?Yr(t,e):t}var ta=ro(function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Vr(t,Pe(e,function(t){return Do(t,n)?+t:t}).sort(Ci)),r});function ea(t){return null==t?t:En.call(t)}var na=Jr(function(t){return di(yr(t,1,Va,!0))}),ra=Jr(function(t){var e=Jo(t);return Va(e)&&(e=i),di(yr(t,1,Va,!0),co(e,2))}),ia=Jr(function(t){var e=Jo(t);return e="function"==typeof e?e:i,di(yr(t,1,Va,!0),i,e)});function oa(t){if(!t||!t.length)return[];var e=0;return t=je(t,function(t){if(Va(t))return e=bn(t.length,e),!0}),Je(e,function(e){return Pe(t,Ye(e))})}function aa(t,e){if(!t||!t.length)return[];var n=oa(t);return null==e?n:Pe(n,function(t){return Ce(e,i,t)})}var sa=Jr(function(t,e){return Va(t)?fr(t,e):[]}),ua=Jr(function(t){return vi(je(t,Va))}),ca=Jr(function(t){var e=Jo(t);return Va(e)&&(e=i),vi(je(t,Va),co(e,2))}),la=Jr(function(t){var e=Jo(t);return e="function"==typeof e?e:i,vi(je(t,Va),i,e)}),da=Jr(oa);var fa=Jr(function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,aa(t,n)});function pa(t){var e=qn(t);return e.__chain__=!0,e}function ha(t,e){return e(t)}var ga=ro(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Gn&&Do(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(i),t})):this.thru(o)});var va=ji(function(t,e,n){Rt.call(t,n)?++t[n]:ar(t,n,1)});var ma=Li(Wo),ya=Li(Go);function ba(t,e){return(Ga(t)?Oe:pr)(t,co(e,3))}function Da(t,e){return(Ga(t)?Te:hr)(t,co(e,3))}var wa=ji(function(t,e,n){Rt.call(t,n)?t[n].push(e):ar(t,n,[e])});var xa=Jr(function(t,e,n){var i=-1,o="function"==typeof e,a=Ya(t)?r(t.length):[];return pr(t,function(t){a[++i]=o?Ce(e,t,n):Ir(t,e,n)}),a}),Aa=ji(function(t,e,n){ar(t,n,e)});function Ea(t,e){return(Ga(t)?Pe:Hr)(t,co(e,3))}var Sa=ji(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var _a=Jr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&wo(t,e[0],e[1])?e=[]:n>2&&wo(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,yr(e,1),[])}),Ca=le||function(){return ge.Date.now()};function ka(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Qi(t,d,i,i,i,i,e)}function Oa(t,e){var n;if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ta=Jr(function(t,e,n){var r=1;if(n.length){var i=dn(n,uo(Ta));r|=c}return Qi(t,r,e,n,i)}),Ia=Jr(function(t,e,n){var r=3;if(n.length){var i=dn(n,uo(Ia));r|=c}return Qi(e,r,t,n,i)});function ja(t,e,n){var r,a,s,u,c,l,d=0,f=!1,p=!1,h=!0;if("function"!=typeof t)throw new Tt(o);function g(e){var n=r,o=a;return r=a=i,d=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||p&&t-d>=s}function m(){var t=Ca();if(v(t))return y(t);c=jo(m,function(t){var n=e-(t-l);return p?Dn(n,s-(t-d)):n}(t))}function y(t){return c=i,h&&r?g(t):(r=a=i,u)}function b(){var t=Ca(),n=v(t);if(r=arguments,a=this,l=t,n){if(c===i)return function(t){return d=t,c=jo(m,e),f?g(t):u}(l);if(p)return Ai(c),c=jo(m,e),g(l)}return c===i&&(c=jo(m,e)),u}return e=ms(e)||0,es(n)&&(f=!!n.leading,s=(p="maxWait"in n)?bn(ms(n.maxWait)||0,e):s,h="trailing"in n?!!n.trailing:h),b.cancel=function(){c!==i&&Ai(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(Ca())},b}var Fa=Jr(function(t,e){return dr(t,1,e)}),Na=Jr(function(t,e,n){return dr(t,ms(e)||0,n)});function Pa(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Tt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Pa.Cache||Vn),n}function Ra(t){if("function"!=typeof t)throw new Tt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Pa.Cache=Vn;var Ma=wi(function(t,e){var n=(e=1==e.length&&Ga(e[0])?Pe(e[0],Ze(co())):Pe(yr(e,1),Ze(co()))).length;return Jr(function(r){for(var i=-1,o=Dn(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return Ce(t,this,r)})}),Ba=Jr(function(t,e){var n=dn(e,uo(Ba));return Qi(t,c,i,e,n)}),La=Jr(function(t,e){var n=dn(e,uo(La));return Qi(t,l,i,e,n)}),Ha=ro(function(t,e){return Qi(t,f,i,i,i,e)});function qa(t,e){return t===e||t!=t&&e!=e}var Ua=Yi(Cr),za=Yi(function(t,e){return t>=e}),Wa=jr(function(){return arguments}())?jr:function(t){return ns(t)&&Rt.call(t,"callee")&&!Kt.call(t,"callee")},Ga=r.isArray,$a=we?Ze(we):function(t){return ns(t)&&_r(t)==N};function Ya(t){return null!=t&&ts(t.length)&&!Qa(t)}function Va(t){return ns(t)&&Ya(t)}var Ka=be||mu,Xa=xe?Ze(xe):function(t){return ns(t)&&_r(t)==w};function Ja(t){if(!ns(t))return!1;var e=_r(t);return e==x||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!os(t)}function Qa(t){if(!es(t))return!1;var e=_r(t);return e==A||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Za(t){return"number"==typeof t&&t==gs(t)}function ts(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function es(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ns(t){return null!=t&&"object"==typeof t}var rs=Ae?Ze(Ae):function(t){return ns(t)&&vo(t)==S};function is(t){return"number"==typeof t||ns(t)&&_r(t)==_}function os(t){if(!ns(t)||_r(t)!=C)return!1;var e=Yt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Ht}var as=Ee?Ze(Ee):function(t){return ns(t)&&_r(t)==O};var ss=Se?Ze(Se):function(t){return ns(t)&&vo(t)==T};function us(t){return"string"==typeof t||!Ga(t)&&ns(t)&&_r(t)==I}function cs(t){return"symbol"==typeof t||ns(t)&&_r(t)==j}var ls=_e?Ze(_e):function(t){return ns(t)&&ts(t.length)&&!!ue[_r(t)]};var ds=Yi(Lr),fs=Yi(function(t,e){return t<=e});function ps(t){if(!t)return[];if(Ya(t))return us(t)?gn(t):Ti(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=vo(t);return(e==S?cn:e==T?fn:qs)(t)}function hs(t){return t?(t=ms(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function gs(t){var e=hs(t),n=e%1;return e==e?n?e-n:e:0}function vs(t){return t?ur(gs(t),0,v):0}function ms(t){if("number"==typeof t)return t;if(cs(t))return g;if(es(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=es(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Qe(t);var n=mt.test(t);return n||bt.test(t)?fe(t.slice(2),n?2:8):vt.test(t)?g:+t}function ys(t){return Ii(t,Fs(t))}function bs(t){return null==t?"":li(t)}var Ds=Fi(function(t,e){if(So(e)||Ya(e))Ii(e,js(e),t);else for(var n in e)Rt.call(e,n)&&nr(t,n,e[n])}),ws=Fi(function(t,e){Ii(e,Fs(e),t)}),xs=Fi(function(t,e,n,r){Ii(e,Fs(e),t,r)}),As=Fi(function(t,e,n,r){Ii(e,js(e),t,r)}),Es=ro(sr);var Ss=Jr(function(t,e){t=Ct(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&wo(e[0],e[1],o)&&(r=1);++n<r;)for(var a=e[n],s=Fs(a),u=-1,c=s.length;++u<c;){var l=s[u],d=t[l];(d===i||qa(d,Ft[l])&&!Rt.call(t,l))&&(t[l]=a[l])}return t}),_s=Jr(function(t){return t.push(i,to),Ce(Ps,i,t)});function Cs(t,e,n){var r=null==t?i:Er(t,e);return r===i?n:r}function ks(t,e){return null!=t&&mo(t,e,Or)}var Os=Ui(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),t[e]=n},eu(iu)),Ts=Ui(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Lt.call(e)),Rt.call(t,e)?t[e].push(n):t[e]=[n]},co),Is=Jr(Ir);function js(t){return Ya(t)?Jn(t):Mr(t)}function Fs(t){return Ya(t)?Jn(t,!0):Br(t)}var Ns=Fi(function(t,e,n){zr(t,e,n)}),Ps=Fi(function(t,e,n,r){zr(t,e,n,r)}),Rs=ro(function(t,e){var n={};if(null==t)return n;var r=!1;e=Pe(e,function(e){return e=Di(e,t),r||(r=e.length>1),e}),Ii(t,oo(t),n),r&&(n=cr(n,7,eo));for(var i=e.length;i--;)fi(n,e[i]);return n});var Ms=ro(function(t,e){return null==t?{}:function(t,e){return $r(t,e,function(e,n){return ks(t,n)})}(t,e)});function Bs(t,e){if(null==t)return{};var n=Pe(oo(t),function(t){return[t]});return e=co(e),$r(t,n,function(t,n){return e(t,n[0])})}var Ls=Ji(js),Hs=Ji(Fs);function qs(t){return null==t?[]:tn(t,js(t))}var Us=Mi(function(t,e,n){return e=e.toLowerCase(),t+(n?zs(e):e)});function zs(t){return Js(bs(t).toLowerCase())}function Ws(t){return(t=bs(t))&&t.replace(wt,on).replace(ee,"")}var Gs=Mi(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),$s=Mi(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Ys=Ri("toLowerCase");var Vs=Mi(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var Ks=Mi(function(t,e,n){return t+(n?" ":"")+Js(e)});var Xs=Mi(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Js=Ri("toUpperCase");function Qs(t,e,n){return t=bs(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(dt)||[]}(t):t.match(e)||[]}var Zs=Jr(function(t,e){try{return Ce(t,i,e)}catch(t){return Ja(t)?t:new Et(t)}}),tu=ro(function(t,e){return Oe(e,function(e){e=Bo(e),ar(t,e,Ta(t[e],t))}),t});function eu(t){return function(){return t}}var nu=Hi(),ru=Hi(!0);function iu(t){return t}function ou(t){return Rr("function"==typeof t?t:cr(t,1))}var au=Jr(function(t,e){return function(n){return Ir(n,t,e)}}),su=Jr(function(t,e){return function(n){return Ir(t,n,e)}});function uu(t,e,n){var r=js(e),i=Ar(e,r);null!=n||es(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Ar(e,js(e)));var o=!(es(n)&&"chain"in n&&!n.chain),a=Qa(t);return Oe(i,function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Ti(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})}),t}function cu(){}var lu=Wi(Pe),du=Wi(Ie),fu=Wi(Le);function pu(t){return xo(t)?Ye(Bo(t)):function(t){return function(e){return Er(e,t)}}(t)}var hu=$i(),gu=$i(!0);function vu(){return[]}function mu(){return!1}var yu=zi(function(t,e){return t+e},0),bu=Ki("ceil"),Du=zi(function(t,e){return t/e},1),wu=Ki("floor");var xu,Au=zi(function(t,e){return t*e},1),Eu=Ki("round"),Su=zi(function(t,e){return t-e},0);return qn.after=function(t,e){if("function"!=typeof e)throw new Tt(o);return t=gs(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=ka,qn.assign=Ds,qn.assignIn=ws,qn.assignInWith=xs,qn.assignWith=As,qn.at=Es,qn.before=Oa,qn.bind=Ta,qn.bindAll=tu,qn.bindKey=Ia,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ga(t)?t:[t]},qn.chain=pa,qn.chunk=function(t,e,n){e=(n?wo(t,e,n):e===i)?1:bn(gs(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var a=0,s=0,u=r(he(o/e));a<o;)u[s++]=ii(t,a,a+=e);return u},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Re(Ga(n)?Ti(n):[n],yr(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=co();return t=e?Pe(t,function(t){if("function"!=typeof t[1])throw new Tt(o);return[n(t[0]),t[1]]}):[],Jr(function(n){for(var r=-1;++r<e;){var i=t[r];if(Ce(i[0],this,n))return Ce(i[1],this,n)}})},qn.conforms=function(t){return function(t){var e=js(t);return function(n){return lr(n,t,e)}}(cr(t,1))},qn.constant=eu,qn.countBy=va,qn.create=function(t,e){var n=Un(t);return null==e?n:or(n,e)},qn.curry=function t(e,n,r){var o=Qi(e,8,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.curryRight=function t(e,n,r){var o=Qi(e,u,i,i,i,i,i,n=r?i:n);return o.placeholder=t.placeholder,o},qn.debounce=ja,qn.defaults=Ss,qn.defaultsDeep=_s,qn.defer=Fa,qn.delay=Na,qn.difference=qo,qn.differenceBy=Uo,qn.differenceWith=zo,qn.drop=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=n||e===i?1:gs(e))<0?0:e,r):[]},qn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,0,(e=r-(e=n||e===i?1:gs(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!0):[]},qn.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&wo(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=gs(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:gs(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},qn.filter=function(t,e){return(Ga(t)?je:mr)(t,co(e,3))},qn.flatMap=function(t,e){return yr(Ea(t,e),1)},qn.flatMapDeep=function(t,e){return yr(Ea(t,e),p)},qn.flatMapDepth=function(t,e,n){return n=n===i?1:gs(n),yr(Ea(t,e),n)},qn.flatten=$o,qn.flattenDeep=function(t){return(null==t?0:t.length)?yr(t,p):[]},qn.flattenDepth=function(t,e){return(null==t?0:t.length)?yr(t,e=e===i?1:gs(e)):[]},qn.flip=function(t){return Qi(t,512)},qn.flow=nu,qn.flowRight=ru,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];ar(r,i[0],i[1])}return r},qn.functions=function(t){return null==t?[]:Ar(t,js(t))},qn.functionsIn=function(t){return null==t?[]:Ar(t,Fs(t))},qn.groupBy=wa,qn.initial=function(t){return(null==t?0:t.length)?ii(t,0,-1):[]},qn.intersection=Vo,qn.intersectionBy=Ko,qn.intersectionWith=Xo,qn.invert=Os,qn.invertBy=Ts,qn.invokeMap=xa,qn.iteratee=ou,qn.keyBy=Aa,qn.keys=js,qn.keysIn=Fs,qn.map=Ea,qn.mapKeys=function(t,e){var n={};return e=co(e,3),wr(t,function(t,r,i){ar(n,e(t,r,i),t)}),n},qn.mapValues=function(t,e){var n={};return e=co(e,3),wr(t,function(t,r,i){ar(n,r,e(t,r,i))}),n},qn.matches=function(t){return qr(cr(t,1))},qn.matchesProperty=function(t,e){return Ur(t,cr(e,1))},qn.memoize=Pa,qn.merge=Ns,qn.mergeWith=Ps,qn.method=au,qn.methodOf=su,qn.mixin=uu,qn.negate=Ra,qn.nthArg=function(t){return t=gs(t),Jr(function(e){return Wr(e,t)})},qn.omit=Rs,qn.omitBy=function(t,e){return Bs(t,Ra(co(e)))},qn.once=function(t){return Oa(2,t)},qn.orderBy=function(t,e,n,r){return null==t?[]:(Ga(e)||(e=null==e?[]:[e]),Ga(n=r?i:n)||(n=null==n?[]:[n]),Gr(t,e,n))},qn.over=lu,qn.overArgs=Ma,qn.overEvery=du,qn.overSome=fu,qn.partial=Ba,qn.partialRight=La,qn.partition=Sa,qn.pick=Ms,qn.pickBy=Bs,qn.property=pu,qn.propertyOf=function(t){return function(e){return null==t?i:Er(t,e)}},qn.pull=Qo,qn.pullAll=Zo,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,co(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Yr(t,e,i,n):t},qn.pullAt=ta,qn.range=hu,qn.rangeRight=gu,qn.rearg=Ha,qn.reject=function(t,e){return(Ga(t)?je:mr)(t,Ra(co(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=co(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return Vr(t,i),n},qn.rest=function(t,e){if("function"!=typeof t)throw new Tt(o);return Jr(t,e=e===i?e:gs(e))},qn.reverse=ea,qn.sampleSize=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),(Ga(t)?Zn:Zr)(t,e)},qn.set=function(t,e,n){return null==t?t:ti(t,e,n)},qn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ti(t,e,n,r)},qn.shuffle=function(t){return(Ga(t)?tr:ri)(t)},qn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&wo(t,e,n)?(e=0,n=r):(e=null==e?0:gs(e),n=n===i?r:gs(n)),ii(t,e,n)):[]},qn.sortBy=_a,qn.sortedUniq=function(t){return t&&t.length?ui(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?ui(t,co(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&wo(t,e,n)&&(e=n=i),(n=n===i?v:n>>>0)?(t=bs(t))&&("string"==typeof e||null!=e&&!as(e))&&!(e=li(e))&&un(t)?xi(gn(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new Tt(o);return e=null==e?0:bn(gs(e),0),Jr(function(n){var r=n[e],i=xi(n,0,e);return r&&Re(i,r),Ce(t,this,i)})},qn.tail=function(t){var e=null==t?0:t.length;return e?ii(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?ii(t,0,(e=n||e===i?1:gs(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ii(t,(e=r-(e=n||e===i?1:gs(e)))<0?0:e,r):[]},qn.takeRightWhile=function(t,e){return t&&t.length?hi(t,co(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?hi(t,co(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Tt(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ja(t,e,{leading:r,maxWait:e,trailing:i})},qn.thru=ha,qn.toArray=ps,qn.toPairs=Ls,qn.toPairsIn=Hs,qn.toPath=function(t){return Ga(t)?Pe(t,Bo):cs(t)?[t]:Ti(Mo(bs(t)))},qn.toPlainObject=ys,qn.transform=function(t,e,n){var r=Ga(t),i=r||Ka(t)||ls(t);if(e=co(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:es(t)&&Qa(o)?Un(Yt(t)):{}}return(i?Oe:wr)(t,function(t,r,i){return e(n,t,r,i)}),n},qn.unary=function(t){return ka(t,1)},qn.union=na,qn.unionBy=ra,qn.unionWith=ia,qn.uniq=function(t){return t&&t.length?di(t):[]},qn.uniqBy=function(t,e){return t&&t.length?di(t,co(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?di(t,i,e):[]},qn.unset=function(t,e){return null==t||fi(t,e)},qn.unzip=oa,qn.unzipWith=aa,qn.update=function(t,e,n){return null==t?t:pi(t,e,bi(n))},qn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:pi(t,e,bi(n),r)},qn.values=qs,qn.valuesIn=function(t){return null==t?[]:tn(t,Fs(t))},qn.without=sa,qn.words=Qs,qn.wrap=function(t,e){return Ba(bi(e),t)},qn.xor=ua,qn.xorBy=ca,qn.xorWith=la,qn.zip=da,qn.zipObject=function(t,e){return mi(t||[],e||[],nr)},qn.zipObjectDeep=function(t,e){return mi(t||[],e||[],ti)},qn.zipWith=fa,qn.entries=Ls,qn.entriesIn=Hs,qn.extend=ws,qn.extendWith=xs,uu(qn,qn),qn.add=yu,qn.attempt=Zs,qn.camelCase=Us,qn.capitalize=zs,qn.ceil=bu,qn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ms(n))==n?n:0),e!==i&&(e=(e=ms(e))==e?e:0),ur(ms(t),e,n)},qn.clone=function(t){return cr(t,4)},qn.cloneDeep=function(t){return cr(t,5)},qn.cloneDeepWith=function(t,e){return cr(t,5,e="function"==typeof e?e:i)},qn.cloneWith=function(t,e){return cr(t,4,e="function"==typeof e?e:i)},qn.conformsTo=function(t,e){return null==e||lr(t,e,js(e))},qn.deburr=Ws,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=Du,qn.endsWith=function(t,e,n){t=bs(t),e=li(e);var r=t.length,o=n=n===i?r:ur(gs(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},qn.eq=qa,qn.escape=function(t){return(t=bs(t))&&J.test(t)?t.replace(K,an):t},qn.escapeRegExp=function(t){return(t=bs(t))&&ot.test(t)?t.replace(it,"\\$&"):t},qn.every=function(t,e,n){var r=Ga(t)?Ie:gr;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.find=ma,qn.findIndex=Wo,qn.findKey=function(t,e){return qe(t,co(e,3),wr)},qn.findLast=ya,qn.findLastIndex=Go,qn.findLastKey=function(t,e){return qe(t,co(e,3),xr)},qn.floor=wu,qn.forEach=ba,qn.forEachRight=Da,qn.forIn=function(t,e){return null==t?t:br(t,co(e,3),Fs)},qn.forInRight=function(t,e){return null==t?t:Dr(t,co(e,3),Fs)},qn.forOwn=function(t,e){return t&&wr(t,co(e,3))},qn.forOwnRight=function(t,e){return t&&xr(t,co(e,3))},qn.get=Cs,qn.gt=Ua,qn.gte=za,qn.has=function(t,e){return null!=t&&mo(t,e,kr)},qn.hasIn=ks,qn.head=Yo,qn.identity=iu,qn.includes=function(t,e,n,r){t=Ya(t)?t:qs(t),n=n&&!r?gs(n):0;var i=t.length;return n<0&&(n=bn(i+n,0)),us(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ze(t,e,n)>-1},qn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gs(n);return i<0&&(i=bn(r+i,0)),ze(t,e,i)},qn.inRange=function(t,e,n){return e=hs(e),n===i?(n=e,e=0):n=hs(n),function(t,e,n){return t>=Dn(e,n)&&t<bn(e,n)}(t=ms(t),e,n)},qn.invoke=Is,qn.isArguments=Wa,qn.isArray=Ga,qn.isArrayBuffer=$a,qn.isArrayLike=Ya,qn.isArrayLikeObject=Va,qn.isBoolean=function(t){return!0===t||!1===t||ns(t)&&_r(t)==D},qn.isBuffer=Ka,qn.isDate=Xa,qn.isElement=function(t){return ns(t)&&1===t.nodeType&&!os(t)},qn.isEmpty=function(t){if(null==t)return!0;if(Ya(t)&&(Ga(t)||"string"==typeof t||"function"==typeof t.splice||Ka(t)||ls(t)||Wa(t)))return!t.length;var e=vo(t);if(e==S||e==T)return!t.size;if(So(t))return!Mr(t).length;for(var n in t)if(Rt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return Fr(t,e)},qn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Fr(t,e,i,n):!!r},qn.isError=Ja,qn.isFinite=function(t){return"number"==typeof t&&De(t)},qn.isFunction=Qa,qn.isInteger=Za,qn.isLength=ts,qn.isMap=rs,qn.isMatch=function(t,e){return t===e||Nr(t,e,fo(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Nr(t,e,fo(e),n)},qn.isNaN=function(t){return is(t)&&t!=+t},qn.isNative=function(t){if(Eo(t))throw new Et("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Pr(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=is,qn.isObject=es,qn.isObjectLike=ns,qn.isPlainObject=os,qn.isRegExp=as,qn.isSafeInteger=function(t){return Za(t)&&t>=-9007199254740991&&t<=h},qn.isSet=ss,qn.isString=us,qn.isSymbol=cs,qn.isTypedArray=ls,qn.isUndefined=function(t){return t===i},qn.isWeakMap=function(t){return ns(t)&&vo(t)==F},qn.isWeakSet=function(t){return ns(t)&&"[object WeakSet]"==_r(t)},qn.join=function(t,e){return null==t?"":He.call(t,e)},qn.kebabCase=Gs,qn.last=Jo,qn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=gs(n))<0?bn(r+o,0):Dn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):Ue(t,Ge,o,!0)},qn.lowerCase=$s,qn.lowerFirst=Ys,qn.lt=ds,qn.lte=fs,qn.max=function(t){return t&&t.length?vr(t,iu,Cr):i},qn.maxBy=function(t,e){return t&&t.length?vr(t,co(e,2),Cr):i},qn.mean=function(t){return $e(t,iu)},qn.meanBy=function(t,e){return $e(t,co(e,2))},qn.min=function(t){return t&&t.length?vr(t,iu,Lr):i},qn.minBy=function(t,e){return t&&t.length?vr(t,co(e,2),Lr):i},qn.stubArray=vu,qn.stubFalse=mu,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Au,qn.nth=function(t,e){return t&&t.length?Wr(t,gs(e)):i},qn.noConflict=function(){return ge._===this&&(ge._=qt),this},qn.noop=cu,qn.now=Ca,qn.pad=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Gi(ve(i),n)+t+Gi(he(i),n)},qn.padEnd=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?t+Gi(e-r,n):t},qn.padStart=function(t,e,n){t=bs(t);var r=(e=gs(e))?hn(t):0;return e&&r<e?Gi(e-r,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(bs(t).replace(at,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&wo(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=hs(t),e===i?(e=t,t=0):e=hs(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=An();return Dn(t+o*(e-t+de("1e-"+((o+"").length-1))),e)}return Kr(t,e)},qn.reduce=function(t,e,n){var r=Ga(t)?Me:Ke,i=arguments.length<3;return r(t,co(e,4),n,i,pr)},qn.reduceRight=function(t,e,n){var r=Ga(t)?Be:Ke,i=arguments.length<3;return r(t,co(e,4),n,i,hr)},qn.repeat=function(t,e,n){return e=(n?wo(t,e,n):e===i)?1:gs(e),Xr(bs(t),e)},qn.replace=function(){var t=arguments,e=bs(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var r=-1,o=(e=Di(e,t)).length;for(o||(o=1,t=i);++r<o;){var a=null==t?i:t[Bo(e[r])];a===i&&(r=o,a=n),t=Qa(a)?a.call(t):a}return t},qn.round=Eu,qn.runInContext=t,qn.sample=function(t){return(Ga(t)?Qn:Qr)(t)},qn.size=function(t){if(null==t)return 0;if(Ya(t))return us(t)?hn(t):t.length;var e=vo(t);return e==S||e==T?t.size:Mr(t).length},qn.snakeCase=Vs,qn.some=function(t,e,n){var r=Ga(t)?Le:oi;return n&&wo(t,e,n)&&(e=i),r(t,co(e,3))},qn.sortedIndex=function(t,e){return ai(t,e)},qn.sortedIndexBy=function(t,e,n){return si(t,e,co(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ai(t,e);if(r<n&&qa(t[r],e))return r}return-1},qn.sortedLastIndex=function(t,e){return ai(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return si(t,e,co(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ai(t,e,!0)-1;if(qa(t[n],e))return n}return-1},qn.startCase=Ks,qn.startsWith=function(t,e,n){return t=bs(t),n=null==n?0:ur(gs(n),0,t.length),e=li(e),t.slice(n,n+e.length)==e},qn.subtract=Su,qn.sum=function(t){return t&&t.length?Xe(t,iu):0},qn.sumBy=function(t,e){return t&&t.length?Xe(t,co(e,2)):0},qn.template=function(t,e,n){var r=qn.templateSettings;n&&wo(t,e,n)&&(e=i),t=bs(t),e=As({},e,r,Zi);var o=As({},e.imports,r.imports,Zi),a=js(o),s=tn(o,a);Oe(a,function(t){if(ft.test(t))throw new Et("Invalid `imports` option passed into `_.template`")});var u,c,l=0,d=e.interpolate||xt,f="__p += '",p=kt((e.escape||xt).source+"|"+d.source+"|"+(d===tt?ht:xt).source+"|"+(e.evaluate||xt).source+"|$","g"),h="//# sourceURL="+(Rt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++se+"]")+"\n";t.replace(p,function(e,n,r,i,o,a){return r||(r=i),f+=t.slice(l,a).replace(At,sn),n&&(u=!0,f+="' +\n__e("+n+") +\n'"),o&&(c=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),f+="';\n";var g=Rt.call(e,"variable")&&e.variable;if(g){if(ft.test(g))throw new Et("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(c?f.replace(G,""):f).replace($,"$1").replace(Y,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Zs(function(){return St(a,h+"return "+f).apply(i,s)});if(v.source=f,Ja(v))throw v;return v},qn.times=function(t,e){if((t=gs(t))<1||t>h)return[];var n=v,r=Dn(t,v);e=co(e),t-=v;for(var i=Je(r,e);++n<t;)e(n);return i},qn.toFinite=hs,qn.toInteger=gs,qn.toLength=vs,qn.toLower=function(t){return bs(t).toLowerCase()},qn.toNumber=ms,qn.toSafeInteger=function(t){return t?ur(gs(t),-9007199254740991,h):0===t?t:0},qn.toString=bs,qn.toUpper=function(t){return bs(t).toUpperCase()},qn.trim=function(t,e,n){if((t=bs(t))&&(n||e===i))return Qe(t);if(!t||!(e=li(e)))return t;var r=gn(t),o=gn(e);return xi(r,nn(r,o),rn(r,o)+1).join("")},qn.trimEnd=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.slice(0,vn(t)+1);if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,0,rn(r,gn(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=bs(t))&&(n||e===i))return t.replace(at,"");if(!t||!(e=li(e)))return t;var r=gn(t);return xi(r,nn(r,gn(e))).join("")},qn.truncate=function(t,e){var n=30,r="...";if(es(e)){var o="separator"in e?e.separator:o;n="length"in e?gs(e.length):n,r="omission"in e?li(e.omission):r}var a=(t=bs(t)).length;if(un(t)){var s=gn(t);a=s.length}if(n>=a)return t;var u=n-hn(r);if(u<1)return r;var c=s?xi(s,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),as(o)){if(t.slice(u).search(o)){var l,d=c;for(o.global||(o=kt(o.source,bs(gt.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(t.indexOf(li(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+r},qn.unescape=function(t){return(t=bs(t))&&X.test(t)?t.replace(V,mn):t},qn.uniqueId=function(t){var e=++Mt;return bs(t)+e},qn.upperCase=Xs,qn.upperFirst=Js,qn.each=ba,qn.eachRight=Da,qn.first=Yo,uu(qn,(xu={},wr(qn,function(t,e){Rt.call(qn.prototype,e)||(xu[e]=t)}),xu),{chain:!1}),qn.VERSION="4.18.1",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){qn[t].placeholder=qn}),Oe(["drop","take"],function(t,e){Gn.prototype[t]=function(n){n=n===i?1:bn(gs(n),0);var r=this.__filtered__&&!e?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=Dn(n,r.__takeCount__):r.__views__.push({size:Dn(n,v),type:t+(r.__dir__<0?"Right":"")}),r},Gn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Oe(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;Gn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:co(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Oe(["head","last"],function(t,e){var n="take"+(e?"Right":"");Gn.prototype[t]=function(){return this[n](1).value()[0]}}),Oe(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Gn.prototype[t]=function(){return this.__filtered__?new Gn(this):this[n](1)}}),Gn.prototype.compact=function(){return this.filter(iu)},Gn.prototype.find=function(t){return this.filter(t).head()},Gn.prototype.findLast=function(t){return this.reverse().find(t)},Gn.prototype.invokeMap=Jr(function(t,e){return"function"==typeof t?new Gn(this):this.map(function(n){return Ir(n,t,e)})}),Gn.prototype.reject=function(t){return this.filter(Ra(co(t)))},Gn.prototype.slice=function(t,e){t=gs(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Gn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=gs(e))<0?n.dropRight(-e):n.take(e-t)),n)},Gn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Gn.prototype.toArray=function(){return this.take(v)},wr(Gn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=qn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);o&&(qn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,u=e instanceof Gn,c=s[0],l=u||Ga(e),d=function(t){var e=o.apply(qn,Re([t],s));return r&&f?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,g=u&&!p;if(!a&&l){e=g?e:new Gn(this);var v=t.apply(e,s);return v.__actions__.push({func:ha,args:[d],thisArg:i}),new Wn(v,f)}return h&&g?t.apply(this,s):(v=this.thru(d),h?r?v.value()[0]:v.value():v)})}),Oe(["pop","push","shift","sort","splice","unshift"],function(t){var e=It[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ga(i)?i:[],t)}return this[n](function(n){return e.apply(Ga(n)?n:[],t)})}}),wr(Gn.prototype,function(t,e){var n=qn[e];if(n){var r=n.name+"";Rt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}}),jn[qi(i,2).name]=[{name:"wrapper",func:i}],Gn.prototype.clone=function(){var t=new Gn(this.__wrapped__);return t.__actions__=Ti(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ti(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ti(this.__views__),t},Gn.prototype.reverse=function(){if(this.__filtered__){var t=new Gn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Gn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ga(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=Dn(e,t+a);break;case"takeRight":t=bn(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,p=Dn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return gi(t,this.__actions__);var h=[];t:for(;u--&&f<p;){for(var g=-1,v=t[c+=e];++g<d;){var m=l[g],y=m.iteratee,b=m.type,D=y(v);if(2==b)v=D;else if(!D){if(1==b)continue t;break t}}h[f++]=v}return h},qn.prototype.at=ga,qn.prototype.chain=function(){return pa(this)},qn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===i&&(this.__values__=ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof zn;){var r=Ho(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Gn){var e=t;return this.__actions__.length&&(e=new Gn(this)),(e=e.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(e,this.__chain__)}return this.thru(ea)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,Qt&&(qn.prototype[Qt]=function(){return this}),qn}();ge._=yn,(r=function(){return yn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},505(t,e){"use strict";var n=Object.prototype.hasOwnProperty;function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function i(t){try{return encodeURIComponent(t)}catch(t){return null}}e.stringify=function(t,e){e=e||"";var r,o,a=[];for(o in"string"!=typeof e&&(e="?"),t)if(n.call(t,o)){if((r=t[o])||null!=r&&!isNaN(r)||(r=""),o=i(o),r=i(r),null===o||null===r)continue;a.push(o+"="+r)}return a.length?e+a.join("&"):""},e.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var o=r(e[1]),a=r(e[2]);null===o||null===a||o in i||(i[o]=a)}return i}},239(t){var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new T(r||[]);return i(a,"_invoke",{value:_(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",h="executing",g="completed",v={};function m(){}function y(){}function b(){}var D={};c(D,a,function(){return this});var w=Object.getPrototypeOf,x=w&&w(w(I([])));x&&x!==n&&r.call(x,a)&&(D=x);var A=b.prototype=m.prototype=Object.create(D);function E(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function S(t,e){function n(i,o,a,s){var u=d(t[i],t,o);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,s)},function(t){n("throw",t,a,s)}):e.resolve(l).then(function(t){c.value=t,a(c)},function(t){return n("throw",t,a,s)})}s(u.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return o=o?o.then(i,i):i()}})}function _(t,n,r){var i=f;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=d(t,n,r);if("normal"===c.type){if(i=r.done?g:p,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function I(t){if(null!=t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},E(S.prototype),c(S.prototype,s,function(){return this}),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(A),c(A,u,"Generator"),c(A,a,function(){return this}),c(A,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=I,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},168(t){"use strict";t.exports=function(t,e){if(e=e.split(":")[0],!(t=+t))return!1;switch(e){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},732(t,e,n){"use strict";var r=n(192),i=n(975);t.exports=r.bind(null,i)},192(t){"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t,r,i){if("string"!=typeof r)throw new Error("Input must be string");for(var o,a,s=r.length,u=0,c=0;c<s;c+=1){if(o=r.charCodeAt(c),a=r[c],e(o)&&n(r.charCodeAt(c+1))&&(a+=r[c+=1]),(u+=t(a))===i)return r.slice(0,c+1);if(u>i)return r.slice(0,c-a.length+1)}return r}},571(t,e,n){"use strict";var r=n(168),i=n(505),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,u=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,l=/^[a-zA-Z]:/;function d(t){return(t||"").toString().replace(o,"")}var f=[["#","hash"],["?","query"],function(t,e){return g(e.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function h(t){var e,r=("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).location||{},i={},o=typeof(t=t||r);if("blob:"===t.protocol)i=new m(unescape(t.pathname),{});else if("string"===o)for(e in i=new m(t,{}),p)delete i[e];else if("object"===o){for(e in t)e in p||(i[e]=t[e]);void 0===i.slashes&&(i.slashes=s.test(t.href))}return i}function g(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function v(t,e){t=(t=d(t)).replace(a,""),e=e||{};var n,r=c.exec(t),i=r[1]?r[1].toLowerCase():"",o=!!r[2],s=!!r[3],u=0;return o?s?(n=r[2]+r[3]+r[4],u=r[2].length+r[3].length):(n=r[2]+r[4],u=r[2].length):s?(n=r[3]+r[4],u=r[3].length):n=r[4],"file:"===i?u>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):u>=2&&g(e.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:u,rest:n}}function m(t,e,n){if(t=(t=d(t)).replace(a,""),!(this instanceof m))return new m(t,e,n);var o,s,u,c,p,y,b=f.slice(),D=typeof e,w=this,x=0;for("object"!==D&&"string"!==D&&(n=e,e=null),n&&"function"!=typeof n&&(n=i.parse),o=!(s=v(t||"",e=h(e))).protocol&&!s.slashes,w.slashes=s.slashes||o&&e.slashes,w.protocol=s.protocol||e.protocol||"",t=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||l.test(t))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(w.protocol)))&&(b[3]=[/(.*)/,"pathname"]);x<b.length;x++)"function"!=typeof(c=b[x])?(u=c[0],y=c[1],u!=u?w[y]=t:"string"==typeof u?~(p="@"===u?t.lastIndexOf(u):t.indexOf(u))&&("number"==typeof c[2]?(w[y]=t.slice(0,p),t=t.slice(p+c[2])):(w[y]=t.slice(p),t=t.slice(0,p))):(p=u.exec(t))&&(w[y]=p[1],t=t.slice(0,p.index)),w[y]=w[y]||o&&c[3]&&e[y]||"",c[4]&&(w[y]=w[y].toLowerCase())):t=c(t,w);n&&(w.query=n(w.query)),o&&e.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==e.pathname)&&(w.pathname=function(t,e){if(""===t)return e;for(var n=(e||"/").split("/").slice(0,-1).concat(t.split("/")),r=n.length,i=n[r-1],o=!1,a=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(""),"."!==i&&".."!==i||n.push(""),n.join("/")}(w.pathname,e.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(p=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,p),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(p+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}m.prototype={set:function(t,e,n){var o=this;switch(t){case"query":"string"==typeof e&&e.length&&(e=(n||i.parse)(e)),o[t]=e;break;case"port":o[t]=e,r(e,o.protocol)?e&&(o.host=o.hostname+":"+e):(o.host=o.hostname,o[t]="");break;case"hostname":o[t]=e,o.port&&(e+=":"+o.port),o.host=e;break;case"host":o[t]=e,u.test(e)?(e=e.split(":"),o.port=e.pop(),o.hostname=e.join(":")):(o.hostname=e,o.port="");break;case"protocol":o.protocol=e.toLowerCase(),o.slashes=!n;break;case"pathname":case"hash":if(e){var a="pathname"===t?"/":"#";o[t]=e.charAt(0)!==a?a+e:e}else o[t]=e;break;case"username":case"password":o[t]=encodeURIComponent(e);break;case"auth":var s=e.indexOf(":");~s?(o.username=e.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=e.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(e))}for(var c=0;c<f.length;c++){var l=f[c];l[4]&&(o[l[1]]=o[l[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(t){t&&"function"==typeof t||(t=i.stringify);var e,n=this,r=n.host,o=n.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(n.protocol&&n.slashes||g(n.protocol)?"//":"");return n.username?(a+=n.username,n.password&&(a+=":"+n.password),a+="@"):n.password?(a+=":"+n.password,a+="@"):"file:"!==n.protocol&&g(n.protocol)&&!r&&"/"!==n.pathname&&(a+="@"),(":"===r[r.length-1]||u.test(n.hostname)&&!n.port)&&(r+=":"),a+=r+n.pathname,(e="object"==typeof n.query?t(n.query):n.query)&&(a+="?"!==e.charAt(0)?"?"+e:e),n.hash&&(a+=n.hash),a}},m.extractProtocol=v,m.location=h,m.trimLeft=d,m.qs=i,t.exports=m},975(t){"use strict";function e(t){return t>=55296&&t<=56319}function n(t){return t>=56320&&t<=57343}t.exports=function(t){if("string"!=typeof t)throw new Error("Input must be string");for(var r=t.length,i=0,o=null,a=null,s=0;s<r;s++)n(o=t.charCodeAt(s))?null!=a&&e(a)?i+=1:i+=3:o<=127?i+=1:o>=128&&o<=2047?i+=2:o>=2048&&o<=65535&&(i+=3),a=o;return i}},285(t,e,n){"use strict";n.r(e),n.d(e,{SaplingModule:()=>Fm});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let i;const o=new Uint8Array(16);const a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).slice(1));function s(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}const u=function(t,e,n){if(r.randomUUID&&!e&&!t)return r.randomUUID();const a=(t=t||{}).random??t.rng?.()??function(){if(!i){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");i=crypto.getRandomValues.bind(crypto)}return i(o)}();if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=a[t];return e}return s(a)};var c=n(571),l={SENTRY_DSN:"https://c1aab70fab174e668864c166c00749ac@o137760.ingest.sentry.io/4504958473404416",WEBSITE_URL:"https://sapling.ai",API_URL:"https://api.sapling.ai",WEBSITE_HOSTNAME:new c("https://sapling.ai").hostname,API_HOSTNAME:new c("https://api.sapling.ai").hostname,MODE:"SDK",AI_DETECT_ANYWHERE_EXTENSION:!1,CONTROL_ELEMENT:"sapling-controls-sdk"},d=n(571),f="",p="";function h(){return f}function g(){return p}var v=n(732),m=n.n(v),y=8e3,b=n(464),D=n.n(b);function w(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function A(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getBoundingClientRect(),n=getComputedStyle(t);if(!function(t){if(!t||"none"===t)return!0;var e=/^matrix\(([^)]+)\)$/.exec(t);if(!e)return!1;var n=w(e[1].split(",").map(function(t){return parseFloat(t)}),4),r=n[0],i=n[1],o=n[2],a=n[3];if(![r,i,o,a].every(Number.isFinite))return!1;var s=1e-6;return Math.abs(i)<s&&Math.abs(o)<s&&r>0&&a>0}(n.transform))return{x:1,y:1};var r=parseFloat(n.width),i=parseFloat(n.height);"border-box"!==n.boxSizing&&(r+=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),i+=(parseFloat(n.paddingTop)||0)+(parseFloat(n.paddingBottom)||0)+(parseFloat(n.borderTopWidth)||0)+(parseFloat(n.borderBottomWidth)||0));var o=e.width/(r||t.offsetWidth),a=e.height/(i||t.offsetHeight);return{x:Number.isFinite(o)&&o>0?o:1,y:Number.isFinite(a)&&a>0?a:1}}function E(t,e){var n=e.getBoundingClientRect(),r=A(e,n);return{left:(t.left-n.left)/r.x+(e.scrollLeft||0)-(e.clientLeft||0),top:(t.top-n.top)/r.y+(e.scrollTop||0)-(e.clientTop||0),width:t.width/r.x,height:t.height/r.y}}var S=n(216);function C(t){return C="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},C(t)}function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach(function(e){T(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function T(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=C(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==C(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var I=D()();function j(t){return" ".repeat(t.length)}function F(t){return t.replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\u00A9/g," ").replace(/\u00AE/g," ").replace(/&nbsp;/g," ").replace(I,j)}function N(t){return"scroll"===S(t).css("overflow-y")||"auto"===S(t).css("overflow-y")||S(t).is("textarea")||K(t)}function P(t){var e=[];e.push(t);for(var n=S(t).parentsUntil("body"),r=0;r<n.length;r+=1){var i=n[r];N(i)&&e.push(i)}return e}function R(t){for(var e=t,n=S(t).parentsUntil("body"),r=t.clientHeight,i=t.clientWidth,o=0;o<n.length;o+=1){var a=n[o],s=a.clientWidth,u=a.clientHeight;if(0!==s&&0!==u)if((u<r||s<i)&&(r=u,i=s,e=a),"absolute"===window.getComputedStyle(a).position)break}return e}function M(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;if(r.firstChild&&n)return r.firstChild;if(r.nextSibling)return r.nextSibling;for(var i=r.parentNode;null!==i&&(null===e||i!==e);){if(i.nextSibling)return i.nextSibling;i=i.parentNode}return null}function B(t){return!!t.tagName&&["script","style","xml"].includes(t.tagName.toLowerCase())}function L(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if(e>n)return null;for(var a=t,s=e;null!==a;){if(i&&S(a).is("br")){if(n===s)return{domElement:a,indexSum:s,domOffset:s}}else if(a.nodeType===Node.TEXT_NODE){var u=a.data.length,c=n-s;if(c<u||o&&c===u)return{domElement:a,domOffset:c,indexSum:s};s+=u}a=M(a,r,!B(a))}return null}function H(t,e,n){for(var r=t,i=0;null!==r;){if(r===e)return i+n;r.nodeType===Node.TEXT_NODE&&(i+=r.data.length),r=M(r,t,!B(r))}return null}function q(t,e){if(!e)return null;var n=H(t,e.startContainer,e.startOffset),r=H(t,e.endContainer,e.endOffset);return null===n||null===r?null:[n,r]}function U(t){if(!t)return null;if(t.parentElement)return t.parentElement;var e="function"==typeof t.getRootNode&&t.getRootNode();return e&&e.host?e.host:null}function z(t){var e=getComputedStyle(t),n=e.position,r=e.top,i=e.left,o=e.height,a=e.width,s=t.getBoundingClientRect(),u={position:n,left:s.left,top:s.top,height:s.height,width:s.width};"static"!==n&&"relative"!==n||(u.position="absolute"),"absolute"===n&&(u={position:n,top:parseInt(r,10),left:parseInt(i,10),height:parseInt(o,10),width:parseInt(a,10)});var c=h();(c.endsWith("messenger.com")||c.endsWith("twitter.com")||c.endsWith("workplaceoptions.com"))&&(u.left-=1);var l=function(t){for(var e=U(t);null!==e;){var n=getComputedStyle(e),r=n.transform&&"none"!==n.transform||n.perspective&&"none"!==n.perspective||n.filter&&"none"!==n.filter||n.willChange&&/transform|perspective|filter/.test(n.willChange)||n.contain&&/paint|layout|content|strict/.test(n.contain);if("static"!==n.position||r)return e;e=U(e)}return null}(t);if("absolute"===n)return{frameDimensions:u,nonstaticParent:l};if(l)u=O(O({},u),E(u,l));else{var d=t.ownerDocument,f=d.defaultView||d.parentWindow,p=f.pageXOffset,g=f.pageYOffset;void 0!==g&&(u.top+=g),void 0!==p&&(u.left+=p)}return{frameDimensions:u,nonstaticParent:l}}function W(t){return S(t).is('[class*="mce-content-body"]')}function G(t){return!h().includes("gladly.")&&("true"===t.getAttribute("data-slate-editor")||S("[data-slate-leaf]",t).length>0)}function $(t){if(!t||!t.tagName)return!1;var e=t.tagName.toLowerCase();return"input"===e?"text"===t.type:"lightning-input-field"===e&&"text"===(t.getAttribute("type")||"unknown").toLowerCase()}function Y(t){return S(t).attr("sapling-id")||S(t).data("sapling-id")}function V(t,e){return e||(e=u()),S(t).attr("sapling-id",e),S(t).data("sapling-id",e),e}function K(t){return S(t).attr("sapling-textarea-id")||S(t).data("sapling-textarea-id")}function X(t,e){return e||(e=u()),S(t).attr("sapling-textarea-id",e),S(t).data("sapling-textarea-id",e),e}function J(t){try{var e=getComputedStyle(t).zIndex;return isNaN(e)?J(t.parentElement):parseInt(e)}catch(t){return 0}}function Q(t){return t<0?"rgb(0,0,0)":(t<=50?(e=Math.floor(225*t/50),n=225):(e=225,n=Math.floor(225*(100-t)/50)),"rgb("+e+","+n+",0)");var e,n}function Z(t){return null==t?"":String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var tt=n(216);function et(t){return!!t.shadowRoot}function nt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"TEXTAREA"===t.tagName||e&&$(t)}function rt(t){if(!t||"TEXTAREA"===t.tagName||"function"!=typeof t.getAttribute)return!1;var e=t.getAttribute("contenteditable");return t.isContentEditable&&null!==e&&["","true","plaintext-only"].includes(e.trim().toLowerCase())}function it(t,e,n,r){for(var i,o=0;i=t[o];++o)e(i)&&r&&n.push(i),et(i)&&it(i.shadowRoot.querySelectorAll("*"),e,n,!0)}function ot(t){var e=[];return it((arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelectorAll("*"),t,e,!1),e}function at(t){if((t.ownerDocument||document).contains(t))return!0;var e=function(t){return ot(function(e){return e.contains(t)})}(t);return e.length>0}function st(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=tt.find(t,e),r=ot(function(e){return tt(e).is(t)},e);return n.concat(r)}function ut(t){var e=t.path||t.composedPath&&t.composedPath();return e.length<1?t.target:e[0]}function ct(t){return t&&(t.assignedSlot||t.parentNode||t.host)||null}function lt(t){var e=null;if(t.hasFocus&&t.hasFocus())for(e=t.activeElement;et(e)&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}var dt=n(216);function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return pt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var ht={},gt={},vt={},mt=[],yt=[];function bt(t){yt.push(t)}function Dt(t){mt.push(t)}function wt(t,e,n,r,i){if(null!=t){var o=n?gt:ht,a={};t in o&&(a=o[t]),"domElement"in a||(a.domElement=e);var s=[];r in a&&(s=a[r]),s.push(i),a[r]=s,o[t]=a}}function xt(t,e){var n=e?gt:ht;if(t in n){var r=n[t];"intervals"in r&&r.intervals.forEach(function(t){clearInterval(t)}),"eventListeners"in r&&r.eventListeners.forEach(function(t){t.element.removeEventListener(t.event,t.handler,t.options)}),"jqueryObservers"in r&&r.jqueryObservers.forEach(function(t){t&&t.element?dt(t.element).off(t.events):dt(t).off()}),"resizeObservers"in r&&r.resizeObservers.forEach(function(t){t.observer.unobserve(t.container)}),"mutationObservers"in r&&r.mutationObservers.forEach(function(t){t.disconnect()}),delete n[t]}}function At(t){t&&(t.shadowHost&&t.shadowHost.remove(),t.badge&&t.badge.removeUIElements(),t.annotationsOverlay&&t.annotationsOverlay.removeUIElements())}function Et(){mt.forEach(function(t){t.disconnect()}),mt=[],yt.forEach(function(t){t.element.removeEventListener(t.event,t.handler,t.options)}),yt=[],Object.keys(ht).forEach(function(t){xt(t,!1)}),Object.keys(gt).forEach(function(t){xt(t,!0)}),function(){for(var t=0,e=Object.entries(vt);t<e.length;t++){var n=ft(e[t],2);n[0],At(n[1])}}()}function St(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{var i={};i.action=t,i.data=e,Dm(i,function(t){t&&t.status?(n&&t.success&&n(t.data),r&&!t.success&&r(t.data)):r&&r({message:"Error contacting background script."})},r)}catch(e){"makeToolbarIconInactive"!==t&&Et()}}var _t=n(216);function Ct(t){return Ct="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},Ct(t)}function kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(n),!0).forEach(function(e){Tt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Tt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Ct(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ct(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ct(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function It(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={language:Dn(),browserLanguage:window.navigator.language,hostname:h(),pathname:g(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname};if(t){var n=_t("[sapling-id=".concat(t,"]")).attr("id");e.is_sapling_textbox="sapling-embedded-editable"===n}return e}function jt(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};St("request/GET_AI_DETECTION_SCORES",{html:m()(t,y),sessionId:n,context:Ot(Ot(Ot({},It()),r),{},{language:e||Dn()||"en"}),options:a},i,o)}function Ft(t,e,n,r){St("request/GET_AI_DETECT_INLINE",{items:t,surface:e},n,r)}function Nt(t,e,n,r,i,o,a){St("request/POST_TONE_FEEDBACK",{html:m()(t,5e4),toneData:e,textType:n,score:r,sessionId:i,context:It()},o,a)}function Pt(t,e){St("request/SEND_EVENT",{context:Ot(Ot({},It(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)),e),eventAction:t})}function Rt(t,e,n,r){St("request/POST_EDIT",{editHash:t,context:Ot(Ot({},It(n)),r),action:e,sessionId:n})}function Mt(t){St("request/POST_CHAT_EVENT",{context:t})}function Bt(t){St("request/POST_CHAT_TURN",{context:t})}function Lt(t,e,n,r){St("request/SELECT_SNIPPET",{snippetId:t,mode:e,context:It(),queryTerms:n,queryCount:r})}var Ht=["activecampaign.com","activehosted.com"];function qt(t){if("string"!=typeof t)return!1;var e=t.toLowerCase().replace(/\.$/,"");return Ht.some(function(t){return e===t||e.endsWith(".".concat(t))})}function Ut(t){return Ut="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},Ut(t)}var zt=["extension","word","gmail","outlook","docs","feed"],Wt=Object.freeze({disabledSurfaces:Object.freeze([]),inlineDefault:null});function Gt(t){if(!t||"object"!==Ut(t)||Array.isArray(t))return Wt;var e=new Set;Array.isArray(t.disabled_surfaces)&&t.disabled_surfaces.forEach(function(t){zt.includes(t)&&e.add(t)}),t.surfaces&&"object"===Ut(t.surfaces)&&!Array.isArray(t.surfaces)&&zt.forEach(function(n){!1===t.surfaces[n]&&e.add(n)});var n="boolean"==typeof t.inline_default?t.inline_default:null;return{disabledSurfaces:zt.filter(function(t){return e.has(t)}),inlineDefault:n}}function $t(t,e){var n=t&&t.disabledSurfaces||[];return function(t){return t&&"extension"!==t?["extension",t]:["extension"]}(e).find(function(t){return n.includes(t)})||null}var Yt={extension:"the browser extension",word:"Microsoft Word",gmail:"Gmail",outlook:"Outlook",docs:"Google Docs and Slides",feed:"social feeds"};function Vt(t){var e=Yt[t];return e?"Your team admin has turned off AI detection in ".concat(e,"."):"Your team admin has turned off AI detection here."}function Kt(t){return Boolean(t)&&403===t.status&&"aidetect_surface_disabled"===t.code}var Xt=n(216);function Jt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Zt=null,te=null,ee=null,ne=null,re=null,ie=null,oe=null,ae=null,se=null,ue=0,ce=0,le="en",de=!0,fe=!0,pe=!1,he=!0,ge=!1,ve=!0,me="free",ye=null,be="",De=null,we=null,xe=null,Ae=null,Ee=null,Se="\\",_e=!1,Ce=!1,ke=!1,Oe=!!l.AI_DETECT_ANYWHERE_EXTENSION,Te=null,Ie=null,je=null,Fe=!1,Ne=Gt(null),Pe=["en","zh","de","es","fr","he","it","jp","ja","ko","pt","ar","nl","pl","ru","sv","tl","no","hi","cs","da","el","et","fa","fi","hr","hu","id","lt","lv","ro","sk","sl","sr","th","tr","uk","vi"];function Re(t){return new Promise(function(e){!function(t,e,n){St("request/GET_USER",{ignoreCache:t},e,n)}(t,function(t){Me(t),e()},function(){e()})})}function Me(t){de=t.is_anonymous,fe=t.email_confirmed,be=Object.hasOwn(t,"email")?t.email:"",pe=t.suggest,Ee=t.shortcuts.complete,Se=t.shortcuts.snippet,he=t.snippets,ge=t.annotations,ve=t.power_button,le=t.lang,Object.hasOwn(t,"popup_editor")&&t.popup_editor,Object.hasOwn(t,"check_inputs")&&(_e=t.check_inputs),Object.hasOwn(t,"rephrase")&&(Ce=t.rephrase),Object.hasOwn(t,"tone")&&(ke=t.tone),Object.hasOwn(t,"ai_detect")&&(Oe=t.ai_detect),Object.hasOwn(t,"multiFillin")&&(Fe=t.multiFillin),Ne=Gt(t.ai_detect_policy);var e=t.subscription;e&&(me=e.tier,ye=e.end_datetime)}function Be(){return de}function Le(){return fe}function He(){return"free"!==me}function qe(){return me}function Ue(){return pe}function ze(){return he}function We(){return"SDK"===l.MODE?Sapling.advancedEdits.advanced_edits:ge}function Ge(){return Ee}function $e(){return Se}function Ye(){if(!ye)return ye;var t=new Date,e=new Date(ye);if(e.getTime()-t.getTime()<0)return null;var n=Math.round(Math.abs((e.getTime()-t.getTime())/864e5));return Math.max(n,1)}function Ve(t){var e=t.tagName.toLowerCase();return!!("textarea"===e||"lightning-textarea"===e||_e&&$(t))}function Ke(){return"SDK"!==l.MODE&&!l.AI_DETECT_ANYWHERE_EXTENSION&&qt(h())}function Xe(){return!Ke()&&!1!==xe}function Je(){return"SDK"===l.MODE||!Ke()&&(null!==we?we:!(!He()||!0!==Zt)||!1!==Zt&&Xe())}function Qe(){return"SDK"===l.MODE||!1!==oe&&(!0===oe||(null!==we?we:Xe()))}function Ze(t){return"SDK"===l.MODE||!!Je()&&("true"!==Xt(t).attr("sapling-ignore")&&("To"!==Xt(t).attr("aria-label")&&"Cc"!==Xt(t).attr("aria-label")&&"Bcc"!==Xt(t).attr("aria-label")&&(!h().includes("github.com")||"false"!==Xt(t).attr("spellcheck"))))}function tn(){return"SDK"===l.MODE?Sapling.autocomplete:!Ke()&&(!!h().includes("sapling.ai")||(null!==we?we:!(!He()||!1===te)))}function en(t){return!!tn()&&(("SDK"===l.MODE||"true"!==Xt(t).attr("sapling-ignore"))&&(!Xt(t).is("input")||"off"!==Xt(t).attr("autocomplete")&&"false"!==Xt(t).attr("autocomplete")))}function nn(t){var e=Jt(t,7);Zt=e[0],te=e[1],ee=e[2],ne=e[3],re=e[4],ie=e[5],oe=e[6]}function rn(t,e,n,r,i,o,a){var s=h(),u="crioenabled".concat(s),c="completeEnabled-".concat(s),l="badgeEnabled-".concat(s),d="toneEnabled-".concat(s),f="aiDetectEnabled-".concat(s),p="rephraseEnabled-".concat(s),g="advancedEditsEnabled-".concat(s),v={};v[u]=t,v[c]=e,v[l]=n,v[d]=r,v[f]=i,v[p]=o,v[g]=a,0===ue&&(ae=Je()||tn(),se=[Zt,te,ee,ne,re,ie,oe]);var m=[t,e,n,r,i,o,a];nn(m);var y=Je()||tn();ue+=1;var b,D,w,x=ce+=1;mm(v,function(){ue-=1;var t=y&&!ae,e=!y&&ae;ae=y,se=m,Dm({hostname:s,observersOn:t,observersOff:e,action:"background/GRAMMAR_OR_COMPLETE_TOGGLED"})},function(){ue-=1,x===ce&&nn(se)}),b=t,D=e,St("request/POST_SETTINGS",{context:w=It(),settings:[{hostname:w.hostname,enabled:b,completeEnabled:D}]})}function on(){return!!Ke()||(null!==De?De:!(Xe()||Je()||tn()||He()))}function an(){return sn()&&Ce}function sn(){return!1!==ie}function un(){return"SDK"===l.MODE||xn()&&Oe&&cn()}function cn(){return"SDK"!==l.MODE&&!1!==re}function ln(t,e){if("SDK"!==l.MODE){var n=!1,r=function(t){n||(n=!0,e(t))},i=setTimeout(function(){return r(!1)},3e3),o="aiDetectEnabled-".concat(t);vm([o],function(t){clearTimeout(i),"undefined"!=typeof chrome&&chrome.runtime&&chrome.runtime.lastError?r(!1):r(!t||!1!==t[o])})}else e(!1)}function dn(){return xn()&&Oe}function fn(t){return $t(Ne,t)}function pn(t){return function(t,e,n){return"boolean"==typeof e?e:t&&"boolean"==typeof t.inlineDefault?t.inlineDefault:n}(Ne,t,!1)}function hn(){return!1!==Ie}function gn(){return"SDK"===l.MODE?Sapling.toneEnabled:vn()&&xn()&&ke}function vn(){return"SDK"!==l.MODE&&!1!==ne}function mn(){return"SDK"===l.MODE?Sapling.statusBadge:!1!==ee&&!0!==Ae}function yn(){return"SDK"===l.MODE||_e}function bn(t){Pe.includes(t)&&(le=t),function(t){St("request/POST_SETTINGS",{context:It(),settings:[{lang:t}]})}(le)}function Dn(){return le}function wn(){return be}function xn(){return!Be()&&(!!Le()&&!!He())}var An=n(820),En=n.n(An),Sn=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),_n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Cn=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),kn="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Cn):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var On=["top","right","bottom","left","width","height","size","weight"],Tn="undefined"!=typeof MutationObserver,In=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&s()}function a(){kn(o)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,e);i=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){_n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Tn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){_n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;On.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),jn=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Fn=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Cn},Nn=Hn(0,0,0,0);function Pn(t){return parseFloat(t)||0}function Rn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+Pn(t["border-"+n+"-width"])},0)}function Mn(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Nn;var r=Fn(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=Pn(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Pn(r.width),u=Pn(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Rn(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Rn(r,"top","bottom")+a)),!function(t){return t===Fn(t).document.documentElement}(t)){var c=Math.round(s+o)-e,l=Math.round(u+a)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return Hn(i.left,i.top,s,u)}var Bn="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Fn(t).SVGGraphicsElement}:function(t){return t instanceof Fn(t).SVGElement&&"function"==typeof t.getBBox};function Ln(t){return _n?Bn(t)?function(t){var e=t.getBBox();return Hn(0,0,e.width,e.height)}(t):Mn(t):Nn}function Hn(t,e,n,r){return{x:t,y:e,width:n,height:r}}var qn=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Hn(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ln(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Un=function(t,e){var n,r,i,o,a,s,u,c=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),jn(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);jn(this,{target:t,contentRect:c})},zn=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Sn,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Fn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new qn(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Fn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Un(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Wn="undefined"!=typeof WeakMap?new WeakMap:new Sn,Gn=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=In.getInstance(),r=new zn(e,n,this);Wn.set(this,r)};["observe","unobserve","disconnect"].forEach(function(t){Gn.prototype[t]=function(){var e;return(e=Wn.get(this))[t].apply(e,arguments)}});const $n=void 0!==Cn.ResizeObserver?Cn.ResizeObserver:Gn;var Yn=n(216);function Vn(t,e){var n=function(t){for(var e=t&&t.parentNode;e;){if("[object ShadowRoot]"===e.toString())return e;e=e.parentNode}return!1}(t);return(n?e&&!function(t,e){for(var n=e.parentNode||e.host;null!=n;){if(n===t)return!0;n=n.parentNode||n.host}return!1}(e.contentDocument,n)?e.contentDocument:n:e?e.contentDocument:window).getSelection().getRangeAt(0)}function Kn(t){var e,n=function(t){for(var e=null,n=t;n&&"IFRAME"===n.nodeName;){e=n;var r=n.contentDocument;if(r||(r=tt(n).contents()[0]),!r)return{deepestIframe:null,deepFocusedElement:null};n=lt(r)}return{deepestIframe:e,deepFocusedElement:n}}(t),r=n.deepestIframe,i=n.deepFocusedElement;if(!i)return null;"true"===i.getAttribute("contenteditable")||""===i.getAttribute("contenteditable")||"plaintext-only"===i.getAttribute("contenteditable")?e={deepestIframe:r,isContentEditable:!0,isTextarea:!1,element:i,range:Vn(i,r)}:e=nt(i,!0)?{deepestIframe:r,isContentEditable:!1,isTextarea:!0,element:i,start:i.selectionStart,end:i.selectionEnd}:{deepestIframe:r,isContentEditable:!1,isTextarea:!1,element:i};return e}function Xn(t){var e=window.getSelection();e.getRangeAt&&e.rangeCount&&function(t,e){var n,r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=r.nodeType===Node.TEXT_NODE?r.length:r.childNodes.length,u=o.nodeType===Node.TEXT_NODE?o.length:o.childNodes.length,c=Math.min(i,s),l=Math.min(a,u);try{n=new StaticRange({startContainer:r,startOffset:c,endContainer:o,endOffset:l})}catch(t){}if(n){var d={inputType:"insertText",data:e,bubbles:!0,cancelable:!1,targetRanges:[n]};try{t.startContainer.dispatchEvent(new InputEvent("beforeinput",d))}catch(t){}}r===o?r.replaceData(c,l-c,e):r.insertData(c,e),t.selectNodeContents(o),t.collapse(!1)}(e.getRangeAt(0),t)}function Jn(t){if("TEXTAREA"===t.nodeName||"INPUT"===t.nodeName){var e=function(t,e,n){if(!Zn)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var o=document.createElement("div");o.id="input-textarea-caret-position-mirror-div",document.body.appendChild(o);var a=o.style,s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,u="INPUT"===t.nodeName;a.whiteSpace="pre-wrap",u||(a.wordWrap="break-word");a.position="absolute",r||(a.visibility="hidden");Qn.forEach(function(t){if(u&&"lineHeight"===t)if("border-box"===s.boxSizing){var e=parseInt(s.height),n=parseInt(s.paddingTop)+parseInt(s.paddingBottom)+parseInt(s.borderTopWidth)+parseInt(s.borderBottomWidth),r=n+parseInt(s.lineHeight);a.lineHeight=e>r?e-n+"px":e===r?s.lineHeight:0}else a.lineHeight=s.height;else a[t]=s[t]}),tr?t.scrollHeight>parseInt(s.height)&&(a.overflowY="scroll"):a.overflow="hidden";o.textContent=t.value.substring(0,e),u&&(o.textContent=o.textContent.replace(/\s/g,"\xa0"));var c=document.createElement("span");c.textContent=t.value.substring(e)||".",o.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.fontSize)};r?c.style.backgroundColor="#aaa":document.body.removeChild(o);return l}(t,t.selectionEnd),n=t.getBoundingClientRect();return{left:n.left+e.left-Yn(t).scrollLeft(),top:n.top+e.top-Yn(t).scrollTop(),height:e.height}}var r=t.getRootNode().getSelection().getRangeAt(0);if(0===r.startOffset){r=r.cloneRange();try{r.setEnd(r.startContainer,1)}catch(t){var i=r.startContainer.getBoundingClientRect(),o=Yn(r.startContainer),a=parseInt(o.css("padding-top"))+parseInt(o.css("border-top-width"))+parseInt(o.css("font-size")),s=parseInt(o.css("padding-left"))+parseInt(o.css("border-left-width"));return{left:i.left+s,top:i.top,height:a}}}var u=r.getBoundingClientRect();if(0===u.x&&0===u.y){var c=document.createTextNode("\ufeff");r.insertNode(c),u=r.getBoundingClientRect(),c.remove()}return u}var Qn=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],Zn="undefined"!=typeof window,tr=Zn&&null!=window.mozInnerScreenX;var er=n(216),nr=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","fontFamily","textAlign","textTransform","letterSpacing","wordSpacing","tabSize"];function rr(t,e){var n=getComputedStyle(t);er(nr).each(function(t,r){e.style[r]=n[r]})}var ir="#525f99",or="#313d66",ar="#525f99",sr="#313d66",ur="#e8eaf6",cr="#c6cbe4",lr="#1f2328",dr="#57606a",fr="#6e7781",pr="#ffffff",hr="#f6f8fa",gr="#ffffff",vr="#d0d7de",mr="#afb8c1",yr="#cf222e",br="#8b1a1a",Dr="#ffa31a",wr="#9a6600",xr="#24292f",Ar="#2196f3",Er="#fffbdd",Sr="#eed9a0",_r="#fff8c5",Cr="#eed9a0",kr="#7d4e00",Or="#ffcccc",Tr="#ff6666",Ir="#dafbe1",jr="#1a7f37",Fr="#fff1e5",Nr="#fdd2b4",Pr="#ddf4ff",Rr="#b6dcfb";function Mr(t,e){var n=t.replace("#",""),r=parseInt(n.slice(0,2),16),i=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return"rgba(".concat(r,", ").concat(i,", ").concat(o,", ").concat(e,")")}var Br='Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Lr="0 8px 24px rgb(31 35 40 / 0.16), 0 1px 3px rgb(31 35 40 / 0.12)",Hr="0 1px 2px rgb(0 0 0 / 0.15)",qr="\n :host {\n --sapling-blue: ".concat(ir,";\n --sapling-blue-dark: ").concat(or,";\n --sapling-accent-text: ").concat(ar,";\n --sapling-accent-text-strong: ").concat(sr,";\n --sapling-blue-tint: ").concat(ur,";\n --sapling-blue-tint-border: ").concat(cr,";\n\n --sapling-text: ").concat(lr,";\n --sapling-text-muted: ").concat(dr,";\n --sapling-text-subtle: ").concat(fr,";\n\n --sapling-surface: ").concat(pr,";\n --sapling-surface-muted: ").concat(hr,";\n --sapling-text-on-dark: ").concat(gr,";\n --sapling-border: ").concat(vr,";\n --sapling-border-strong: ").concat(mr,";\n\n --sapling-danger: ").concat(yr,";\n --sapling-premium: ").concat(Dr,";\n --sapling-premium-text: ").concat(wr,";\n --sapling-tooltip-bg: ").concat(xr,";\n --sapling-focus-ring: ").concat(Ar,";\n\n --sapling-warning-bg: ").concat(Er,";\n --sapling-warning-border: ").concat(Sr,";\n --sapling-banner-warning-bg: ").concat(_r,";\n --sapling-banner-warning-border: ").concat(Cr,";\n --sapling-banner-warning-text: ").concat(kr,";\n --sapling-danger-bg: ").concat(Or,";\n --sapling-danger-border: ").concat(Tr,";\n --sapling-success-bg: ").concat(Ir,";\n --sapling-success-text: ").concat(jr,";\n --sapling-premium-bg: ").concat(Fr,";\n --sapling-premium-border: ").concat(Nr,";\n --sapling-info-bg: ").concat(Pr,";\n --sapling-info-border: ").concat(Rr,";\n\n --sapling-radius-sm: 4px;\n --sapling-radius: 6px;\n --sapling-radius-lg: 12px;\n --sapling-radius-pill: 999px;\n\n --sapling-shadow-panel: ").concat(Lr,";\n --sapling-shadow-chip: ").concat(Hr,";\n\n --sapling-font: ").concat(Br,";\n }\n"),Ur=(qr.replace(":host",":root"),n(216));function zr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Wr(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Gr=null,$r="",Yr="",Vr=null;function Kr(){Ur("sapling-complete").length&&(Gr=Ur("sapling-complete")[0].shadowRoot,Ur("#sapling-complete-div-box",Gr).css("visibility","hidden"),Ur(Gr).text(""),Vr=null)}function Xr(t){var e=[],n=0;if("TEXTAREA"===t.nodeName)e=t.value.split("\n"),n=t.selectionEnd;else{if("function"!=typeof t.getRootNode().getSelection)return[e,n];var r=t.getRootNode().getSelection(),i=r.anchorNode;if(!i)return[e,n];e=i.textContent.split("\n"),n=r.focusOffset}return[e,n]}function Jr(t){for(var e=zr(Xr(t),2),n=e[0],r=e[1],i=0,o="",a=0;a<n.length;a++){if(""!==o?o+=" "+n[a]:o=n[a],i+n[a].length>=r)return o;i+=n[a].length+1}return""}function Qr(){try{return Gr=Ur("sapling-complete")[0].shadowRoot,Ur(Gr).find("span").first().attr("completion-hash")}catch(t){return""}}function Zr(t,e){var n=function(t){if(N(t))return t;for(var e=S(t).parentsUntil("body"),n=0;n<e.length;n+=1){var r=e[n];if(N(r))return r}return null}(e);if(null!==n){var r=h(),i=Ur(n).css("overflow");Ur(n).css("overflow","hidden"),"messenger.com"!==r&&"facebook.com"!==r||Ur("html").attr("style","overflow: hidden !important;"),t(),Ur(n).css("overflow",i),"facebook.com"===r&&Ur("html").attr("style","")}else t()}function ti(t,e,n){if(""===e||function(t){if("TEXTAREA"===t.nodeName||"INPUT"===t.nodeName)return t.selectionStart!==t.selectionEnd;var e=t.getRootNode(),n="function"==typeof e.getSelection?e.getSelection():window.getSelection();return!!n&&!n.isCollapsed}(t))Kr();else{var r=Qr();n&&"query"in n&&($r=n.query,Yr=n.model_version,r=n.hash);var i=Ur("sapling-complete");Gr=i[0].shadowRoot;var o='\n <style type="text/css">\n #sapling-complete-div {\n margin: 0;\n padding: 0;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n\n color: '.concat(ir,";\n opacity: 0.5;\n\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Firefox */\n -ms-user-select: none; /* IE10+/Edge */\n user-select: none; /* Standard */\n }\n #sapling-complete-div-box {\n z-index: 2147483647 !important;\n display: table;\n margin: 0;\n padding: 0;\n }\n </style>\n "),a=Ge();a||(a="`");var s='<span title="Hit the backtick or tab key to use Sapling\'s completion." style="margin-left: 1em; background: #ccc; font-weight: 500; border-radius: 0.2em; line-height: 0.6em; padding: 0 0.4em 0 0.3em;">'.concat(a,"</span>");Gr.innerHTML=o+'<div id="sapling-complete-div-box"><div id="sapling-complete-div"><span completion-hash="'.concat(r,'">').concat(e.replace(" ","&nbsp;"),"</span>").concat(s,"</div></div>");var u=Ur("#sapling-complete-div",Gr),c=Jn(t);if(void 0!==c){if(Vr=Kn(t),"TEXTAREA"===t.nodeName)rr(t,u[0]);else{for(var l=t.getRootNode().getSelection().anchorNode;l.nodeType===Node.TEXT_NODE;)l=l.parentNode;rr(l,u[0])}var d=Ur("#sapling-complete-div-box",Gr);d.offset({top:c.top+window.scrollY,left:c.left+window.scrollX});var f=t.getBoundingClientRect(),p=d.offset().left+d.width()-(f.left+f.width);p>0?u.css("max-width",d.width()-p):u.css("max-width",""),Zr(function(){d.css("visibility","visible")},t)}}}function ei(){try{Gr=Ur("sapling-complete")[0].shadowRoot}catch(t){return""}return Ur(Gr).find("span").first().text().replace(/\u00A0/g," ")}function ni(t){ti(t,ei().substring(1))}function ri(t,e){var n=t.key,r=t.originalEvent||t,i=r.isComposing,o="function"==typeof r.getModifierState&&r.getModifierState("AltGraph"),a=(t.ctrlKey||t.metaKey||t.altKey)&&!o;if(!i&&!a){var s,u=Ge();if("Tab"===n&&!t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey||!u&&"`"===n||u&&n===u){if(!function(t,e){if(!t||!e)return!1;if(t.isContentEditable){var n=t.range,r=e.range;return n.startContainer===r.startContainer&&n.startOffset===r.startOffset&&n.endContainer===r.endContainer&&n.endOffset===r.endOffset}return!!t.isTextarea&&t.start===e.start&&t.end===e.end}(Kn(e),Vr))return;var c=ei();if(""===c&&"chatTextArea"!==e.getAttribute("id"))return;if(t.preventDefault(),G(e)){var l={inputType:"insertText",data:c,bubbles:!0,cancelable:!1},d=window.getSelection().getRangeAt(0);setTimeout(function(){d.startContainer.dispatchEvent(new InputEvent("beforeinput",l))},100)}else e.className.includes("ck-editor")?Xn(c):(s=c,document.execCommand("insertText",!1,s));var f=Qr(),p=Y(t.target);Kr(),function(t,e,n,r){St("request/POST_COMPLETION",{completionHash:t,context:Ot(Ot({},It(n)),r),action:"accept",sessionId:n})}(f,0,p,{query:$r,completion:c,model_version:Yr})}}}var ii=n(545);function oi(){try{return window.self!==window.top}catch(t){return!0}}function ai(t,e){t.on("load",function(){setTimeout(e,500)});var n=t.get(0);try{n&&n.contentWindow&&"complete"===n.contentWindow.document.readyState&&setTimeout(e,500)}catch(t){setTimeout(e,500)}}function si(t){var e,n=t.ownerDocument;if((e=n.defaultView||n.parentWindow).self===e.top)return{x:0,y:0};for(var r=document.getElementsByTagName("iframe"),i=0;i<r.length;i++)if(r[i].contentWindow===e){var o=r[i].getBoundingClientRect();return{x:o.x,y:o.y}}return{x:0,y:0}}var ui=n(216);function ci(t,e,n,r,i,o,a,s){var u=arguments.length>8&&void 0!==arguments[8]&&arguments[8];if(!oi()){var c,l=ui("sapling-popup-controls");0===l.length?((c=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),ui("html").append(c)):(l.is(":last-child")||l.appendTo("html"),c=l[0]);var d=c.shadowRoot;ui(".sapling-tooltip-container",d)[0]?(ui(".sapling-tooltip-button-primary",d).off("mousedown"),ui(".sapling-tooltip-button-secondary",d).off("mousedown"),ui(".sapling-tooltip-container",d).off("blur")):function(t){ui(t).prepend(ui('\n<style type="text/css">\n\n@media print {\n .sapling-tooltip-container {\n display: none;\n }\n}\n\n.sapling-tooltip-container {\n z-index: 2147483647 !important;\n position: fixed;\n top: 0px;\n left: 0px;\n}\n\n.sapling-tooltip {\n position: fixed;\n padding: 10px;\n width: 220px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid '.concat(vr,";\n border-radius: 6px;\n background-color: ").concat(pr,";\n box-shadow: ").concat(Lr,";\n font-family: ").concat(Br,";\n /* Set an explicit text color: this shadow-DOM tree is injected into arbitrary\n host pages and 'color' inherits across the shadow boundary, so a dark-themed\n host would otherwise leave light text unreadable on this white surface. */\n color: ").concat(lr,';\n}\n\n.sapling-tooltip-icon {\n margin-top: 5px;\n width: 30px;\n height: 30px;\n background-size: cover;\n background-image: url("').concat(hm("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-tooltip-title {\n font-size: 16px;\n font-weight: 600;\n}\n\n.sapling-tooltip-body {\n font-size: 14px;\n line-height: 18px;\n}\n\n.sapling-tooltip-body{\n margin-top: 10px;\n text-align: center;\n}\n\n.sapling-tooltip-title {\n margin-top: 5px;\n text-align: center;\n}\n\n.sapling-tooltip-button-container {\n margin-top: 10px;\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n.sapling-tooltip-button {\n font-size: 16px;\n padding: 6px;\n margin: 5px;\n width: 140px;\n border-radius: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n color: ').concat(gr,";\n transition: all .15s ease;\n user-select: none;\n}\n\n.sapling-tooltip-button:hover {\n transform: translateY(-1px);\n box-shadow: ").concat(Hr,";\n}\n\n.sapling-tooltip-button:active {\n transform: translateY(0px);\n}\n\n.sapling-tooltip-button-primary {\n background-color: ").concat(ir,";\n}\n\n.sapling-tooltip-button-secondary {\n background-color: ").concat(dr,";\n}\n</style>"))),ui(t).append(ui('\n<div class="sapling-tooltip-container">\n <div class="sapling-tooltip">\n <div class="sapling-tooltip-icon"> </div>\n <div class="sapling-tooltip-title"></div>\n <div class="sapling-tooltip-body"></div>\n <div class="sapling-tooltip-button-container">\n <div class="sapling-tooltip-button sapling-tooltip-button-primary"></div>\n <div class="sapling-tooltip-button sapling-tooltip-button-secondary"></div>\n <div>\n </div>\n</div>'))}(d);var f=t.top,p=t.left,h=window.innerHeight+window.scrollY,g=window.innerWidth+window.scrollX;null!==f&&f+190>h&&(f=h-190,t.top=Math.max(f,0)),null!==p&&p+250>g&&(p=g-250,t.left=Math.max(p,0)),ui(".sapling-tooltip",d).css(t),e?ui(".sapling-tooltip-icon",d).show():ui(".sapling-tooltip-icon",d).hide(),ui(".sapling-tooltip-title",d).html(n),ui(".sapling-tooltip-body",d).html(r),ui(".sapling-tooltip-button-primary",d).text(i),o?ui(".sapling-tooltip-button-secondary",d).text(o):ui(".sapling-tooltip-button-secondary",d).hide(),u&&ui(".sapling-tooltip-container",d).attr("tabindex",-1).on("blur",function(){ui(this).hide()}),ui(".sapling-tooltip-button-primary",d).on("mousedown",function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),ui(".sapling-tooltip-container",d).hide(),a&&a())}),ui(".sapling-tooltip-button-secondary",d).on("mousedown",function(t){1===t.which&&(t.preventDefault(),t.stopPropagation(),ui(".sapling-tooltip-container",d).hide(),s&&s())}),u?ui(".sapling-tooltip-container",d).show().focus():ui(".sapling-tooltip-container",d).show()}}function li(){Be()&&vm(["ToolTipLogin"],function(t){var e=(new Date).getTime(),n=e-864e5;(!t.ToolTipLogin||t.ToolTipLogin<n)&&ci({right:8,bottom:8,top:"",left:""},!0,"Are you signed in?","For full access to Sapling, make sure you are on your team's enterprise plan.","Sign in","Cancel",function(){var t="".concat(l.WEBSITE_URL,"/user/sign-in");window.open(t),mm({ToolTipLogin:e})},function(){mm({ToolTipLogin:e})})})}function di(){if("chrome-extension:"===window.location.protocol){if("#saplingpopup"===window.location.hash)return!0;if(("chrome-extension:"===window.location.protocol||"moz-extension:"===window.location.protocol)&&window.location.pathname.endsWith("/sidepanel.html"))return!0}else{if("ms-browser-extension:"===window.location.protocol)return!0;if("moz-extension:"===window.location.protocol)return!0}return!1}var fi={paraphrase:'<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/>',formal:'<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/><rect width="20" height="14" x="2" y="6" rx="2"/>',scissors:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',shorten:'<path d="M4 14h6v6"/><path d="M20 10h-6V4"/><path d="m14 10 7-7"/><path d="m3 21 7-7"/>',expand:'<path d="M15 3h6v6"/><path d="M9 21H3v-6"/><path d="m21 3-7 7"/><path d="m3 21 7-7"/>',smile:'<circle cx="12" cy="12" r="10"/><path d="M8 14s1.5 2 4 2 4-2 4-2"/><path d="M9 9h.01"/><path d="M15 9h.01"/>',chevron:'<path d="m6 9 6 6 6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',wand:'<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"/><path d="m14 7 3 3"/><path d="M5 6v4"/><path d="M19 14v4"/><path d="M10 2v2"/><path d="M7 8H3"/><path d="M21 16h-4"/><path d="M11 3H9"/>',spinner:'<path d="M21 12a9 9 0 1 1-6.219-8.56"/>',search:'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',filePlus:'<path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M9 15h6"/><path d="M12 18v-6"/>',plus:'<path d="M5 12h14"/><path d="M12 5v14"/>',close:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',chart:'<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>',power:'<path d="M12 2v10"/><path d="M18.4 6.6a9 9 0 1 1-12.77.04"/>',user:'<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>',messagePlus:'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/><path d="M12 7v6"/><path d="M9 10h6"/>',message:'<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>',gauge:'<path d="m12 14 4-4"/><path d="M3.34 19a10 10 0 1 1 17.32 0"/>',sidePanel:'<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M15 3v18"/>',settings:'<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"/><circle cx="12" cy="12" r="3"/>',history:'<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l4 2"/>',notepad:'<path d="M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z"/><path d="M15 3v4a2 2 0 0 0 2 2h4"/>',dashboard:'<rect width="7" height="9" x="3" y="3" rx="1"/><rect width="7" height="5" x="14" y="3" rx="1"/><rect width="7" height="9" x="14" y="12" rx="1"/><rect width="7" height="5" x="3" y="16" rx="1"/>',keyboard:'<path d="M10 8h.01"/><path d="M12 12h.01"/><path d="M14 8h.01"/><path d="M16 12h.01"/><path d="M18 8h.01"/><path d="M6 8h.01"/><path d="M7 16h10"/><path d="M8 12h.01"/><rect width="20" height="16" x="2" y="4" rx="2"/>',logOut:'<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/><path d="m16 17 5-5-5-5"/><path d="M21 12H9"/>',logIn:'<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><path d="m10 17 5-5-5-5"/><path d="M15 12H3"/>',printer:'<path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"/><path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6"/><rect x="6" y="14" width="12" height="8" rx="1"/>',link:'<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>'};function pi(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16;return'<svg class="sapling-icon" xmlns="http://www.w3.org/2000/svg" width="'.concat(e,'" height="').concat(e,'"')+' viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"'+' stroke-linejoin="round" aria-hidden="true" focusable="false">'.concat(t,"</svg>")}(fi[t],arguments.length>1&&void 0!==arguments[1]?arguments[1]:16)}var hi=n(216);function gi(){return gi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yi(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},gi.apply(null,arguments)}function vi(t,e,n){return e=yi(e),function(t,e){if(e&&("object"==wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mi()?Reflect.construct(e,n||[],yi(t).constructor):e.apply(t,n))}function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mi=function(){return!!t})()}function yi(t){return yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yi(t)}function bi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Di(t,e)}function Di(t,e){return Di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Di(t,e)}function wi(t){return wi="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},wi(t)}function xi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ai(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Si(r.key),r)}}function Ei(t,e,n){return e&&Ai(t.prototype,e),n&&Ai(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Si(t){var e=function(t,e){if("object"!=wi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wi(e)?e:e+""}var _i=function(){return"SDK"===l.MODE&&Sapling.customStyles&&Sapling.customStyles.badgeTooltipLeft?"tooltiptext-left":""},Ci=function(){return Ei(function t(e){xi(this,t),this.elem=null,this.badgeDashboard=e},[{key:"shouldShow",value:function(){return!0}},{key:"refreshState",value:function(){this.shouldShow()?this.elem.show():this.elem.hide()}}])}(),ki=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"SignInButton"}},{key:"shouldShow",value:function(){return"SDK"!==l.MODE&&Be()}},{key:"createElement",value:function(){return this.elem=hi('<a target="_blank" href="'.concat(l.WEBSITE_URL,'/user/sign-in">\n <div class="sapling-dashboard-icon sapling-button-profile">\n ').concat(pi("user"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Sign in</span>\n </div>\n </a>')),this.elem}}])}(Ci),Oi=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"SearchSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==l.MODE&&(!di()&&(!Be()&&ze()))}},{key:"createElement",value:function(){var t=this;return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-search">\n '.concat(pi("search"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Search snippets</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer,r=n,i=K(n);i&&(r=Md(i)),r.focus(),Dm({action:"snippet-control",data:{mode:"insert"}})}}),this.elem}}])}(Ci),Ti=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"AddSnippetButton"}},{key:"shouldShow",value:function(){return"SDK"!==l.MODE&&(!Be()&&ze())}},{key:"createElement",value:function(){var t=this;return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-snippets">\n '.concat(pi("filePlus"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Save as snippet</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.badgeDashboard.parentContainer.textContent;n=btoa(unescape(encodeURIComponent(n)));var r=hi.param({preload:n}),i="".concat(l.WEBSITE_URL,"/snippets/new?").concat(r);window.open(i)}}),this.elem}}])}(Ci),Ii=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"AddSuggestionButton"}},{key:"shouldShow",value:function(){return"SDK"!==l.MODE&&(!Be&&(!!He()&&Ue()))}},{key:"createElement",value:function(){var t=this;return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-suggest">\n '.concat(pi("messagePlus"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Add suggestion</span>\n </div>')),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=hi(t.badgeDashboard.parentContainer).text().trim();n=btoa(unescape(encodeURIComponent(n)));var r=hi.param({preload:n}),i="".concat(l.WEBSITE_URL,"/suggest/new?").concat(r);window.open(i)}}),this.elem}}])}(Ci),ji=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"AnnotationsButton"}},{key:"shouldShow",value:function(){return"SDK"===l.MODE?We():!di()&&(!Be()&&We())}},{key:"updateIcon",value:function(){var t="Show annotations";this.badgeDashboard.containerInfo&&this.badgeDashboard.containerInfo.annotationsOverlay&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations&&this.badgeDashboard.containerInfo.annotationsOverlay.summaryAnnotations.summaryVisible()&&(t="Hide annotations"),hi(this.elem).find(".tooltiptext").html(t)}},{key:"createElement",value:function(){var t=this;return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-annotations">\n '.concat(pi("chart"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Show annotations</span>\n </div>')),this.elem.on("mousedown",function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.annotationsOverlay.toggleSummaryAnnotations(),t.updateIcon())}),this.elem}}])}(Ci),Fi=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"ToneButton"}},{key:"shouldShow",value:function(){return gn()}},{key:"updateIcon",value:function(){var t=this.badgeDashboard.containerInfo.toneOverlay;if(t){var e=t.getTopTone(),n="Show Tone";hi(t.toneOverlay).is(".visible")?n="Hide Tone":e&&(hi(this.elem).find(".top-tone-emoji").html(e[2]),n="".concat(e[1]," tone<br/>See more")),hi(this.elem).find(".tooltiptext").html(n)}}},{key:"createElement",value:function(){var t=this;return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-tone">\n <span class="top-tone-emoji">\u{1f610}</span>\n <span class="tooltiptext '.concat(_i(),' caret-mid">Show Tone</span>\n </div>')),this.elem.on("mousedown",function(e){1===e.which&&(e.preventDefault(),e.stopPropagation(),t.badgeDashboard.containerInfo.toneOverlay&&t.badgeDashboard.containerInfo.toneOverlay.toggleVisibility(),t.updateIcon())}),this.elem}}])}(Ci),Ni=function(t){function e(t){var n;return xi(this,e),(n=vi(this,e,[t])).isThrottled=!1,n}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"ThrottleButton"}},{key:"shouldShow",value:function(){return this.isThrottled}},{key:"createElement",value:function(){return this.elem=hi('<a target="_blank" href="'.concat(l.WEBSITE_URL,'/usage-limits">\n <div class="sapling-dashboard-icon sapling-button-throttled">\n ').concat(pi("gauge"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Usage limit exceeded</span>\n </div>\n </a>')),this.elem}}])}(Ci),Pi=function(t){function e(){return xi(this,e),vi(this,e,arguments)}return bi(e,t),Ei(e,[{key:"getName",value:function(){return"PowerButton"}},{key:"shouldShow",value:function(){return"SDK"===l.MODE?Sapling.userToggle:ve}},{key:"refreshState",value:function(){var t,n=h(),r="off";"SDK"===l.MODE?Sapling.userToggleEnabled?(r="off",t="Disable grammar checking"):(r="on",t="Enable grammar checking"):t="Turn ".concat(r," Sapling for ").concat(n);var i,o,a,s,u,c=hi(this.elem).find(".tooltiptext").html(c);c.text(t),(i=e,o="refreshState",a=this,u=gi(yi(1&(s=3)?i.prototype:i),o,a),2&s&&"function"==typeof u?function(t){return u.apply(a,t)}:u)([])}},{key:"createElement",value:function(){var t=this,e=h();return this.elem=hi('<div class="sapling-dashboard-icon sapling-button-power">\n '.concat(pi("power"),'\n <span class="tooltiptext ').concat(_i(),' caret-mid">Turn off Sapling for ').concat(e,"</span>\n </div>")),this.elem.on("mousedown",function(e){if(1===e.which){e.preventDefault(),e.stopPropagation();var n=t.elem.offset();t.badgeDashboard.hide(),function(t,e,n){var r="Sapling",i="Disable",o="Keep Enabled";"SDK"===l.MODE&&(r="grammar checking"),t||(i="Enable",o="Keep Disabled"),ci({top:e,left:n,right:"",bottom:""},!1,"".concat(i," ").concat(r),"".concat(i," ").concat(r," on pages of site: <b>").concat(h(),"</b>?"),i,o,function(){"SDK"===l.MODE?(Sapling.setUserToggleEnabled(!t),cm(t?"sdk-disable":"sdk-enable")):rn(!t,!t)},null,!0)}("SDK"===l.MODE?Sapling.userToggleEnabled:Je(),n.top-60,n.left-110)}}),this.elem}}])}(Ci),Ri=[ki,Oi,Ti,Ii,ji,Ni,Fi,Pi],Mi=n(216);function Bi(t){return Bi="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},Bi(t)}function Li(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Hi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ui(r.key),r)}}function Ui(t){var e=function(t,e){if("object"!=Bi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Bi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Bi(e)?e:e+""}var zi=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.parentContainer=null,this.popupControls=null,this.popupControlsJq=null,this.shadowRoot=null,this.shadowRootJq=null,this.containerId=null,this.containerInfo=null,this.badgeDashContainer=null,this.badgeDash=null,this.buttons={}},(e=[{key:"createPopupContainer",value:function(){var t;this.popupControls||(0===Mi("sapling-popup-controls").length?((t=document.createElement("sapling-popup-controls")).attachShadow({mode:"open"}),Mi("html").append(t)):t=Mi("sapling-popup-controls")[0],this.popupControls=t,this.popupControlsJq=Mi(t),this.shadowRoot=t.shadowRoot,this.shadowRootJq=Mi(this.shadowRoot))}},{key:"createDashboardContainer",value:function(){var t=this,e=this.popupControls.shadowRoot;if(!this.badgeDashContainer){var n=Mi('\n<style type="text/css">\n\n.sapling-badge-dash-container {\n position: absolute;\n z-index: 2147483647 !important;\n}\n\n/* A white pill of ghost icon buttons. Was a row of solid blue discs carrying\n tiny white raster icons, which read as heavy and hid what each one did. */\n.sapling-badge-dash {\n position: relative;\n box-sizing: border-box;\n height: 36px;\n bottom: 2px;\n right: 2px;\n display: flex;\n flex-direction: row-reverse;\n align-items: center;\n gap: 2px;\n padding: 0 4px;\n background-color: '.concat(pr,";\n border: 1px solid ").concat(vr,";\n border-radius: 18px;\n box-shadow: ").concat(Lr,";\n}\n\n.sapling-badge-dash > a {\n display: flex;\n text-decoration: none;\n}\n\n.connectivity-error .sapling-badge-dash {\n background-color: ").concat(Or,";\n}\n\n.sapling-dashboard-icon {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 50%;\n color: ").concat(ir,";\n cursor: pointer;\n transition: background-color .12s ease, color .12s ease;\n}\n\n.sapling-dashboard-icon:hover {\n background-color: ").concat(ur,";\n color: ").concat(or,";\n}\n\n.sapling-dashboard-icon .sapling-icon {\n display: block;\n flex: none;\n}\n\n/* Legacy edit-count button (currently not in ButtonClasses). */\n.sapling-button-edit-count {\n background-color: ").concat(ir,";\n}\n\n/* Stay dark on hover: the generic icon hover tint would put the white count on light blue. */\n.sapling-button-edit-count:hover {\n background-color: ").concat(or,";\n}\n\n.sapling-button-count {\n position: absolute;\n width: 28px;\n height: 28px;\n color: ").concat(gr,";\n font-weight: 600;\n font-family: ").concat(Br,';\n font-size: 12px;\n line-height: 28px;\n text-align: center;\n user-select: none;\n}\n\n.sapling-button-logo {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 24px;\n height: 24px;\n background-size: cover;\n background-image: url("').concat(hm("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n\n.sapling-button-tone .top-tone-emoji {\n font-size: 16px;\n line-height: 1;\n}\n\n.sapling-button-tone .tooltiptext {\n text-transform: capitalize;\n}\n\n/* Over the usage limit: amber, so it stands apart from the regular actions. */\n.sapling-button-throttled,\n.sapling-button-throttled:hover {\n background-color: ').concat(Er,";\n color: ").concat(wr,";\n}\n\n/* One tooltip rule for every button, centered with a transform instead of a\n per-button width/margin-left table that had to be retuned for each label. */\n.tooltiptext {\n visibility: hidden;\n position: absolute;\n z-index: 1;\n bottom: calc(100% + 8px);\n left: 50%;\n transform: translateX(-50%);\n width: max-content;\n max-width: 220px;\n padding: 4px 8px;\n font: 500 12px/1.4 ").concat(Br,";\n background-color: ").concat(xr,";\n color: ").concat(gr,';\n text-align: center;\n border-radius: 6px;\n user-select: none;\n pointer-events: none;\n}\n\n.sapling-dashboard-icon:hover .tooltiptext {\n visibility: visible;\n transition: visibility 0s 300ms;\n}\n\n/* SDK option (Sapling.customStyles.badgeTooltipLeft): right-align the tooltip\n to its button so it can\'t spill off the right edge of an embedding page. */\n.tooltiptext.tooltiptext-left {\n left: auto;\n right: 0;\n transform: none;\n}\n\n.caret-right::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: ').concat(xr,' transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: ').concat(xr," transparent transparent transparent;\n}\n\n.tooltiptext-left.caret-mid::after {\n left: auto;\n right: 10px;\n}\n\n</style>"));Mi(e).prepend(n),this.badgeDashContainer=Mi('<div class="sapling-badge-dash-container" style="display: none;"></div>'),this.badgeDash=Mi('<div class="sapling-badge-dash"></div>'),this.badgeDashContainer.append(this.badgeDash);var r,i=Li(Ri);try{for(i.s();!(r=i.n()).done;){var o=new(0,r.value)(this),a=o.createElement();this.badgeDash.append(a),this.buttons[o.getName()]=o,o.refreshState()}}catch(t){i.e(t)}finally{i.f()}this.badgeDash.hover(null,function(){t.hide()}),this.shadowRootJq.append(this.badgeDashContainer)}}},{key:"createUIElements",value:function(){this.createPopupContainer(),this.createDashboardContainer()}},{key:"show",value:function(t,e,n,r){if(this.parentContainer=t,this.popupControlsJq.is(":last-child")||this.popupControlsJq.appendTo("html"),n!==this.containerId){this.containerId=n,this.containerInfo=r,this.badgeDashContainer.containerId=n;for(var i=!0,o=0,a=Object.values(this.buttons);o<a.length;o++){var s=a[o];s.refreshState(),s.shouldShow()&&(i=!1)}if(!i){var u=e.badge[0].getBoundingClientRect(),c=u.right+window.scrollX-this.badgeDashContainer.width()+6,d=u.bottom+window.scrollY-this.badgeDashContainer.height()+6;if("SDK"===l.MODE){var f=si(t);c+=f.x,d+=f.y}d=Math.max(d,20),c=Math.max(c,0),this.badgeDashContainer.css({left:c,top:d}),this.buttons.EditCountButton&&this.buttons.EditCountButton.setEditCount(e.editCount),this.buttons.ToneButton&&this.buttons.ToneButton.updateIcon(),this.buttons.AnnotationsButton&&this.buttons.AnnotationsButton.updateIcon(),this.badgeDashContainer.show()}}}},{key:"hide",value:function(){this.badgeDashContainer&&(this.badgeDashContainer.hide(),this.containerId=null)}}])&&qi(t.prototype,e),n&&qi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Wi=n(216);function Gi(t){return Gi="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},Gi(t)}function $i(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Yi(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Yi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Ki(r.key),r)}}function Ki(t){var e=function(t,e){if("object"!=Gi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Gi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gi(e)?e:e+""}var Xi=null,Ji=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.showSpinner=this.regularShowSpinner,this.hideSpinner=this.regularHideSpinner,this.parentContainer=null,this.containerId=null,this.containerInfo=null,this.badgeShadowHost=null,this.badge=null,this.badgeSpinner=null,this.badgeContainer=null,this.hostname=h(),this.pathname=g(),this.editCount=0},(e=[{key:"firefoxShowSpinner",value:function(){this.isEnabled()&&(this.badge.hide(),this.badgeSpinner.show())}},{key:"firefoxHideSpinner",value:function(){this.isEnabled()&&(this.badge.show(),this.badgeSpinner.hide())}},{key:"regularShowSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeOut(300),this.badgeSpinner.stop().fadeIn(300))}},{key:"regularHideSpinner",value:function(){this.isEnabled()&&(this.badge.stop().fadeIn(300),this.badgeSpinner.stop().fadeOut(300))}},{key:"detectOverlappingElement",value:function(t,e){if(!this.isEnabled())return null;var n,r=$i(document.elementsFromPoint(e.right,e.bottom));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i&&!(i===t||i.getAttribute("is-sapling-overlay")||Wi(i).parents("[is-sapling-overlay]").length>0)){var o=i.getBoundingClientRect();if(o.width>0&&o.height>0){var a=window.getComputedStyle(i);if("none"!==a.display&&"hidden"!==a.visibility&&parseFloat(a.opacity)>0&&o.width<50&&o.height<50)return o}}}}catch(t){r.e(t)}finally{r.f()}return null}},{key:"createUIElements",value:function(t,e,n,r){var i=this;if(this.isEnabled()&&(this.parentContainer=t,this.containerId=n,this.containerInfo=r,"outlook.live.com"===this.hostname?(this.badgeShadowHost&&!at(this.badgeShadowHost)&&(this.badgeShadowHost.remove(),this.badgeShadowHost=null),this.badgeShadowHost||(this.badgeShadowHost=document.createElement("div"),this.badgeShadowHost.setAttribute("is-sapling-overlay",!0),this.badgeShadowHost.attachShadow({mode:"open"}),Wi(t.parentNode.parentNode).append(this.badgeShadowHost),Wi(this.badgeShadowHost).css({"pointer-events":"none",position:"sticky",bottom:"0px"}))):this.badgeShadowHost=e,!this.badgeContainer)){var o=this.badgeShadowHost.shadowRoot;Xi||(Xi=new zi).createUIElements();var a="2px";"outlook.live.com"===this.hostname&&(a="100px");var s=2,u=8,c=8,d=ir,f=br;if((Wi(t).height()<24||Wi(t).width()<140)&&(u=6,c=4,s=1),"SDK"===l.MODE){if(Sapling.appearance.customCSS){var p=Wi('<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>"));Wi(o).prepend(p)}Sapling.appearance.variables.badgeSize&&(u=Sapling.appearance.variables.badgeSize),Sapling.appearance.variables.badgeMargin&&(c=Sapling.appearance.variables.badgeMargin),Sapling.appearance.variables.badgeColor&&(d=Sapling.appearance.variables.badgeColor),Sapling.appearance.variables.badgeErrorColor&&(f=Sapling.appearance.variables.badgeErrorColor)}var h=Wi(function(t,e,n,r,i,o){return'\n<style type="text/css">\n.sapling-badge-container {\n position: absolute;\n bottom: '.concat(t,";\n right: 0px;\n font-family: ").concat(Br,";\n}\n\n.sapling-status-container {\n position: absolute;\n bottom: ").concat(e,"px;\n right: ").concat(e,"px;\n}\n\n.sapling-badge {\n position: absolute;\n width: ").concat(n,"px;\n height: ").concat(n,"px;\n bottom: ").concat(r,"px;\n right: ").concat(r,"px;\n text-align: center;\n border-radius: 50%;\n /* A thin surface-colored halo keeps the dot legible over page text or a\n colored editor background it may overlap. */\n box-shadow: 0 0 0 2px ").concat(pr,";\n}\n\n.errors {\n background-color: ").concat(o,";\n}\n\n.no-errors {\n background-color: ").concat(i,";\n}\n\n.connectivity-error .sapling-badge {\n background-color: ").concat(o,";\n}\n\n.throttled-error .sapling-badge {\n background-color: ").concat(Dr,';\n}\n\n/* Spinner ring, centered on the dot\'s position and 2px wider so it reads as\n "working" rather than as a clipped dot. */\n.sapling-badge-spinner {\n position: absolute;\n box-sizing: border-box;\n width: ').concat(n+2,"px;\n height: ").concat(n+2,"px;\n border: ").concat(Math.max(1.5,n/4),"px solid ").concat(i,";\n border-top-color: transparent;\n bottom: ").concat(r-1,"px;\n right: ").concat(r-1,"px;\n border-radius: 50%;\n animation: rotation 0.9s infinite linear;\n}\n\n.connectivity-error .sapling-badge-spinner {\n border-color: ").concat(o,";\n border-top-color: transparent;\n}\n\n.sapling-badge-hud {\n position: absolute;\n top: -22px;\n left: -42px;\n transition: all 0.25s;\n}\n\n.sapling-tone-hud {\n cursor: pointer;\n pointer-events: initial;\n display: flex;\n transition: all 0.25s;\n}\n\n@keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n</style>")}(a,s,u,c,d,f));Wi(o).prepend(h),this.badgeContainer=Wi('<div class="sapling-badge-container"></div>');var g=Wi('<div class="sapling-status-container"></div>');this.badge=Wi('<div class="sapling-badge no-errors"></div>'),this.badgeSpinner=Wi('<div class="sapling-badge-spinner" style="display: none;"> </div>'),this.headsUpContainer=Wi('<div class="sapling-badge-hud" style=""></div>'),this.badgeContainer.append(g),g.append(this.headsUpContainer),g.append(this.badge),g.append(this.badgeSpinner),Wi(o).append(this.badgeContainer),setTimeout(function(){i.adjustBadgePositionIfNeeded(t)},100)}}},{key:"adjustBadgePositionIfNeeded",value:function(t){if(this.badgeContainer&&this.isEnabled())for(var e=0,n=0;n<2;n+=1){var r=this.badgeShadowHost.getBoundingClientRect(),i={right:r.right-e,bottom:r.bottom},o=this.detectOverlappingElement(t,i);if(!o)break;e+=o.width+10,this.badgeContainer.css("right","".concat(e,"px"))}}},{key:"removeUIElements",value:function(){this.badgeShadowHost&&this.badgeShadowHost.remove()}},{key:"isEnabled",value:function(){return!!mn()&&!["notion.so","trello.com","canva.com"].includes(this.hostname)&&!this.pathname.includes("wp-admin")}},{key:"updateBadgeCount",value:function(t){this.isEnabled()&&(0===t?(this.badge.removeClass("errors"),this.badge.addClass("no-errors")):(this.badge.removeClass("no-errors"),this.badge.addClass("errors")),this.badgeContainer&&(this.badgeContainer.removeClass("connectivity-error"),this.hideSpinner(),this.editCount=t,this.containerId===Xi.badgeDashContainer.containerId&&Xi.buttons.EditCountButton&&Xi.buttons.EditCountButton.setEditCount(t)))}},{key:"showErrorState",value:function(){this.badgeContainer&&this.badgeContainer.addClass("connectivity-error"),this.badgeDashboard&&this.badgeDashboard.buttons&&this.badgeDashboard.buttons.EditCountButton&&this.badgeDashboard.buttons.EditCountButton.setToolTipText("Check your internet and firewall settings.")}},{key:"showThrottledState",value:function(){this.hideSpinner(),this.badgeContainer.addClass("throttled-error"),Xi.buttons.ThrottleButton&&(Xi.buttons.ThrottleButton.isThrottled=!0,Xi.buttons.ThrottleButton.refreshState())}},{key:"showBadgeDashboard",value:function(){Xi.show(this.parentContainer,this,this.containerId,this.containerInfo)}}])&&Vi(t.prototype,e),n&&Vi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Qi=n(216);function Zi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||io(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function to(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return eo(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(eo(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,eo(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,eo(d,"constructor",c),eo(c,"constructor",u),u.displayName="GeneratorFunction",eo(c,i,"GeneratorFunction"),eo(d),eo(d,i,"Generator"),eo(d,r,function(){return this}),eo(d,"toString",function(){return"[object Generator]"}),(to=function(){return{w:o,m:f}})()}function eo(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}eo=function(t,e,n,r){function o(e,n){eo(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},eo(t,e,n,r)}function no(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function ro(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){no(o,r,i,a,s,"next",t)}function s(t){no(o,r,i,a,s,"throw",t)}a(void 0)})}}function io(t,e){if(t){if("string"==typeof t)return oo(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oo(t,e):void 0}}function oo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ao(t){Qi(t).find("*").each(function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=io(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e.attributes);try{for(r.s();!(n=r.n()).done;){var i=n.value;"data-sapling-ignore"!==i.name&&e.removeAttribute(i.name)}}catch(t){r.e(t)}finally{r.f()}})}function so(t){if("textarea"===t.type)return t.value;var e=t.cloneNode(!0);Qi(e).find("script").remove(),Qi(e).find("style").remove(),Qi(e).find("xml").remove(),function(t){Qi(t).find(".gmail_quote").remove(),Qi(t).find(".gmail_attr").remove()}(e);for(var n=e.firstChild;null!==n;){var r=n.nodeType;if(r!==Node.TEXT_NODE&&r!==Node.ELEMENT_NODE){var i=n;if(i.nextSibling)n=i.nextSibling;else{var o=i.parentNode;if(o)for(;o!==e;){if(o.nextSibling){n=o.nextSibling;break}o=o.parentNode}else n=null}i.remove()}else n=M(n,e)}return ao(e),F(e.innerHTML||"")}function uo(t,e,n,r,i,o){var a=n,s=r,u=L(a,s,i.startIndex+e,t,!1,!1);if(null===u)return[a,s];var c=u.domElement,l=u.domOffset,d=L(a=c,s=u.indexSum,i.endIndex+e,t,!1,!0);if(null===d)return[a,s];var f=d.domElement,p=d.domOffset;a=f,s=d.indexSum;var h=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=document.createRange();if(s.setStart(e,n),s.setEnd(r,i),!fc(s,o))return null;return function(t,e,n,r){var i=r,o=Y(t),a=ql[o];if(!a)return;var s=a.edits;if(n.editId in a.edits){if(fc(s[n.editId].editRange,n,!1))return void(i&&delete i[n.editId])}if(i)for(var u=0,c=Object.keys(i);u<c.length;u++){var l=c[u],d=i[l],f=d.edit,p=d.editRange;if(Hs(p,e)){if(p.toString()===e.toString()){f.editId in s&&!s[l].isHover&&rd(o,f.editId),delete i[l];break}rd(o,l),delete i[l]}}n.editId in s?(s[n.editId].edit=n,s[n.editId].editRange=e):s[n.editId]={editRange:e,edit:n,domElements:[],isHover:!1};nd(o,n.editId)}(t,s,o,a)}(t,c,l,f,p,i,o);return h&&(a=h,s=i.startIndex+e),[a,s]}function co(t,e,n){return lo.apply(this,arguments)}function lo(){return(lo=ro(to().m(function t(e,n,r){var i,o;return to().w(function(t){for(;;)switch(t.n){case 0:if(i=L(e,0,n,e,!1,!1)){t.n=1;break}return t.a(2,[]);case 1:if(o=L(i.domElement,i.indexSum,r,e,!1,!0)){t.n=2;break}return t.a(2,[]);case 2:return t.n=3,cd(e,i.domElement,i.domOffset,o.domElement,o.domOffset);case 3:return t.a(2,t.v)}},t)}))).apply(this,arguments)}function fo(t,e,n,r){return po.apply(this,arguments)}function po(){return(po=ro(to().m(function t(e,n,r,i){var o,a,s,u,c,d,f,p,h;return to().w(function(t){for(;;)switch(t.n){case 0:if("SDK"!==l.MODE||Sapling.edits){t.n=1;break}return t.a(2);case 1:return o=Object.keys(n).map(function(t){return n[t]}).sort(function(t,e){return t.sortId-e.sortId}),t.n=2,co(e,r,r+i);case 2:a=t.v,s=e,u=0,c=1,d=0;case 3:if(!(d<o.length)){t.n=5;break}if(f=o[d],p=uo(e,r,s,u,f,a),h=Zi(p,2),s=h[0],u=h[1],++c%10!=0){t.n=4;break}return t.n=4,new Promise(function(t){return setTimeout(t,0)});case 4:d+=1,t.n=3;break;case 5:return a&&id(e,Object.keys(a)),t.a(2,!0)}},t)}))).apply(this,arguments)}var ho=!0;function go(t){ho=t}function vo(){return ho}function mo(){St("makeToolbarIconActive")}function yo(){St("makeToolbarIconThrottled")}function bo(){St("makeToolbarIconInactive")}function Do(t){St("updateToolbarIconEditCount",{editCount:t})}function wo(){St("updateToolbarIconDisconnected")}function xo(t){return xo="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},xo(t)}function Ao(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Eo(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eo(t,e){if(t){if("string"==typeof t)return So(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?So(t,e):void 0}}function So(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var _o="aiDetectInlineGmailEnabled",Co="aiDetectInlineExclusions",ko="aiDetectInlineCache",Oo=6048e5,To=6e5,Io=["human","mixed","ai_assisted","ai"];function jo(t,e){if(!t||!e)return!1;var n=String(t).trim().toLowerCase();if((e.senders||[]).includes(n))return!0;var r=n.lastIndexOf("@");if(r<0)return!1;var i=n.slice(r+1);return(e.domains||[]).some(function(t){return i===t||i.endsWith(".".concat(t))})}function Fo(t){if(!t||"object"!==xo(t))return{status:"error"};var e=["ok","too_short","quota_exceeded","error"].includes(t.status)?t.status:"error",n={status:e};return"ok"!==e||(Io.includes(t.verdict)&&(n.verdict=t.verdict),"number"==typeof t.score&&Number.isFinite(t.score)&&(n.score=Math.min(1,Math.max(0,t.score))),"number"==typeof t.ai_fraction&&Number.isFinite(t.ai_fraction)&&(n.ai_fraction=Math.min(1,Math.max(0,t.ai_fraction))),!0===t.low_confidence&&(n.low_confidence=!0,Array.isArray(t.low_confidence_reasons)&&(n.low_confidence_reasons=t.low_confidence_reasons.filter(function(t){return"string"==typeof t&&/^[a-z_]{1,40}$/.test(t)}).slice(0,5))),!0===t.truncated&&(n.truncated=!0)),n}var No={loading:"AI check\u2026",human:"Human",mixed:"Mixed",ai_assisted:"AI-assisted",ai:"AI",inconclusive:"Inconclusive",too_short:"Too short",quota:"AI limit reached",error:"AI check failed"},Po={human:"Reads as human-written.",mixed:"Contains both human-written and AI-generated passages.",ai_assisted:"Human-written with signs of AI editing.",ai:"Reads as AI-generated."},Ro="Click for sentence-level details.";function Mo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return{state:"loading",label:No.loading,title:"Sapling is checking this message for AI writing."};if("too_short"===t.status)return{state:"too_short",label:No.too_short,title:"Too little text to check for AI writing."};if("quota_exceeded"===t.status){var n=function(t){if(!t)return"";var e=new Date(t);if(Number.isNaN(e.getTime()))return"";try{return e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}catch(t){return e.toISOString()}}(e.resetAt);return{state:"quota",label:No.quota,title:"Today's inline AI checks are used up".concat(n?"; they reset at ".concat(n):"",". ")+"Click to run a full check on this message."}}if("ok"!==t.status)return{state:"error",label:No.error,title:"Sapling could not check this message right now. Click to run a full check."};if(!0===t.low_confidence){var r=(t.low_confidence_reasons||[]).includes("short_text");return{state:"inconclusive",label:No.inconclusive,title:"".concat(r?"Too short for a reliable result.":"This text can\u2019t be scored reliably."," ").concat(Ro)}}if(!t.verdict)return{state:"inconclusive",label:No.inconclusive,title:"This message could not be scored. ".concat(Ro)};var i="number"==typeof t.score?" AI likelihood ".concat(Math.round(100*t.score),"%."):"";return{state:t.verdict,label:No[t.verdict],title:"".concat(Po[t.verdict]).concat(i," ").concat("Indicators, not proof."," ").concat(Ro)}}function Bo(t){for(var e=2166136261,n=String(t||""),r=0;r<n.length;r+=1)e^=n.charCodeAt(r),e=Math.imul(e,16777619)>>>0;return e.toString(36)}function Lo(t){if("string"!=typeof t)return"";var e=t.trim();return e?e.length>128?"h:".concat(Bo(e)):e:""}function Ho(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.now,i=void 0===r?Date.now():r,o=n.max,a=void 0===o?500:o,s=n.ttlMs,u=void 0===s?Oo:s,c=new Map;return[t,e].forEach(function(t){Array.isArray(t)&&t.forEach(function(t){if(Array.isArray(t)&&!(t.length<3)){var e=Ao(t,3),n=e[0],r=e[2];if("string"==typeof n&&n&&"number"==typeof r&&!(i-r>u)){var o=c.get(n);(!o||o[2]<=r)&&c.set(n,t)}}})}),Array.from(c.values()).sort(function(t,e){return t[2]-e[2]}).slice(-a)}Promise.resolve();function qo(t,e){var n=t&&t.reset_at?Date.parse(t.reset_at):NaN;return Number.isFinite(n)&&n>e?n:e+36e5}function Uo(t){var e,n=t.send,r=t.surface,i=t.now,o=void 0===i?function(){return Date.now()}:i,a=t.setTimer,s=void 0===a?function(t,e){return setTimeout(t,e)}:a,u=t.clearTimer,c=void 0===u?function(t){return clearTimeout(t)}:u,l=t.debounceMs,d=void 0===l?400:l,f=t.requestTimeoutMs,p=void 0===f?3e4:f,h=t.errorBackoffMs,g=void 0===h?6e4:h,v=t.itemErrorCooldownMs,m=void 0===v?To:v,y=t.cacheMax,b=void 0===y?500:y,D=t.cacheTtlMs,w=void 0===D?Oo:D,x=t.onCacheChange,A=void 0===x?null:x,E=new Map,S=new Map,_=new Map,C=new Map,k=null,O=!1,T=null,I=null,j=!1,F=0,N=function(t){var e=E.get(t);return e?o()-e.ts>w?(E.delete(t),null):(E.delete(t),E.set(t,e),e.result):null},P=function(){return T&&o()<T.until?T:(T=null,null)},R=function(t){return{status:t.status}},M=function(t,e){t.forEach(function(t){try{t(e)}catch(t){}})},B=function(t){var e=Array.from(S.values());S.clear(),e.forEach(function(e){return M(e.callbacks,t)})},L=function(t){if(t&&"object"===xo(t)&&null!==(I={limit:"number"==typeof t.limit?t.limit:null,used:"number"==typeof t.used?t.used:null,reset_at:"string"==typeof t.reset_at?t.reset_at:null}).limit&&null!==I.used&&I.used>=I.limit){var e=qo(I,o());T={until:e,status:"quota_exceeded",resetAt:new Date(e).toISOString()}}},H=function(){null!==k||j||(k=s(function(){k=null,e()},arguments.length>0&&void 0!==arguments[0]?arguments[0]:d))},q=function(){if(O=!1,!j){var t=P();t?B(R(t)):S.size&&H(0)}};return e=function(){if(!O&&!j&&S.size){var t=P();if(t)B(R(t));else{var e=Array.from(S.keys()).slice(0,25),i=e.map(function(t){var e=S.get(t);return S.delete(t),_.set(t,e.callbacks),{id:t,text:e.text}});O=!0;var a=F,u=!1,l=s(function(){f({message:"timeout"})},p),d=function(t){var e=_.get(t)||[];return _.delete(t),e};try{n({items:i,surface:r},function(t){if(!u&&(u=!0,c(l),a===F)){L(t&&t.quota);var n=new Map;(t&&Array.isArray(t.results)?t.results:[]).forEach(function(t){t&&"string"==typeof t.id&&n.set(t.id,t)});var r=!1;e.forEach(function(t){var e=Fo(n.get(t));if("ok"===e.status||"too_short"===e.status)!function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o();for(E.delete(t),E.set(t,{result:e,ts:n});E.size>b;)E.delete(E.keys().next().value)}(t,e),C.delete(t),r=!0;else if("quota_exceeded"===e.status){if(!P()){var i=qo(I,o());T={until:i,status:"quota_exceeded",resetAt:new Date(i).toISOString()}}}else C.set(t,o());M(d(t),e)}),r&&function(){if(A)try{A()}catch(t){}}(),q()}},f)}catch(t){f({message:t&&t.message?t.message:"send failed"})}}}function f(t){if(!u&&(u=!0,c(l),a===F)){var n;if(t&&429===t.status){L(t.quota);var r,i=Number(t.retryAfter);r=Number.isFinite(i)&&i>0?o()+1e3*i:qo(t.quota,o()),T={until:r,status:"quota_exceeded",resetAt:new Date(r).toISOString()},n={status:"quota_exceeded"}}else T={until:o()+g,status:"error"},n={status:"error"};e.forEach(function(t){return M(d(t),n)}),q()}}},{request:function(t,n,r){var i=Lo(t),a="string"==typeof n?n.trim():"";if(i){var s=N(i);if(s)r(s);else if(a.length<50)r({status:"too_short"});else{var u=C.get(i);if(void 0!==u&&o()-u<m)r({status:"error"});else if(_.has(i))_.get(i).push(r);else if(S.has(i))S.get(i).callbacks.push(r);else{var l=P();if(l)r(R(l));else{if(S.set(i,{text:a.slice(0,6e3),callbacks:[r]}),S.size>=25&&!O)return null!==k&&(c(k),k=null),void e();H()}}}}else r({status:"error"})},peek:function(t){var e=Lo(t);return e?N(e):null},isAwaiting:function(t){var e=Lo(t);return!!e&&(S.has(e)||_.has(e))},getQuota:function(){return I},getBlock:function(){return P()},exportCache:function(){var t=o();return Array.from(E.entries()).filter(function(e){var n=Ao(e,2)[1];return t-n.ts<=w}).map(function(t){var e=Ao(t,2),n=e[0],r=e[1];return[n,r.result,r.ts]})},importCache:function(t){if(Array.isArray(t)){var e=o();for(t.forEach(function(t){if(Array.isArray(t)&&!(t.length<3)){var n=Ao(t,3),r=n[0],i=n[1],o=n[2],a=Lo(r);if(!(!a||E.has(a)||"number"!=typeof o||e-o>w)){var s=Fo(i);"ok"!==s.status&&"too_short"!==s.status||E.set(a,{result:s,ts:o})}}});E.size>b;)E.delete(E.keys().next().value);Array.from(S.keys()).forEach(function(t){var e=N(t);if(e){var n=S.get(t).callbacks;S.delete(t),M(n,e)}}),S.size||null===k||(c(k),k=null)}},cancelPending:function(){null!==k&&(c(k),k=null),S.clear()},cancel:function(t){var e=Lo(t);e&&S.delete(e)&&!S.size&&null!==k&&(c(k),k=null)},resetAccountState:function(){F+=1,T=null,I=null,C.clear(),_.clear(),O=!1,this.cancelPending()},destroy:function(){j=!0,null!==k&&(c(k),k=null),S.clear(),_.clear()}}}var zo="sapling-feed-ai-chip-row-aidetect",Wo=[".".concat(zo),"button","style","script","noscript","template",'[aria-hidden="true"]'],Go=[{id:"linkedin",label:"LinkedIn",hostnames:["www.linkedin.com","linkedin.com"],post:'div.feed-shared-update-v2[data-urn], div[data-urn^="urn:li:activity:"], div[data-id^="urn:li:activity:"]',text:".update-components-text, .feed-shared-update-v2__description, .feed-shared-inline-show-more-text",getId:function(t){return t.getAttribute("data-urn")||t.getAttribute("data-id")||""},exclude:[].concat(Wo,[".visually-hidden",".feed-shared-inline-show-more-text__see-more-less-toggle"])},{id:"x",label:"X",hostnames:["x.com","twitter.com","mobile.x.com","mobile.twitter.com"],post:'article[data-testid="tweet"]',text:'[data-testid="tweetText"]',textNotWithin:'[role="link"]',getId:function(t){var e=t.querySelector('a[href*="/status/"] time'),n=e?e.closest("a"):t.querySelector('a[href*="/status/"]'),r=n&&(n.getAttribute("href")||"").match(/\/status\/(\d+)/);return r?r[1]:""},exclude:Wo},{id:"reddit",label:"Reddit",hostnames:["www.reddit.com","reddit.com","new.reddit.com","sh.reddit.com"],post:"shreddit-post, shreddit-comment",text:':scope > [slot="text-body"], :scope > [slot="comment"], :scope > div[id$="-post-rtjson-content"]',getId:function(t){return t.getAttribute("thingid")||t.getAttribute("id")||t.getAttribute("permalink")||""},exclude:Wo},{id:"reddit",label:"Reddit",hostnames:["old.reddit.com"],post:"div.thing[data-fullname]",text:":scope > .entry .usertext-body .md",getId:function(t){return t.getAttribute("data-fullname")||""},exclude:Wo}];Go.reduce(function(t,e){return t.some(function(t){return t.id===e.id})||t.push({id:e.id,label:e.label}),t},[]);function $o(t,e){if(!t||!e)return null;try{return e.textNotWithin?Array.from(t.querySelectorAll(e.text)).find(function(n){var r=n.parentElement&&n.parentElement.closest(e.textNotWithin);return!r||r===t||!t.contains(r)})||null:t.querySelector(e.text)}catch(t){return null}}var Yo="aiDetectFeedEnabled",Vo="aiDetectFeedSitesDisabled",Ko="aiDetectFeedCache",Xo="sapling-aidetect-feed-muted";var Jo=["human","mixed","ai_assisted","ai","inconclusive"];Promise.resolve();new RegExp("([a-zA-Z]+)(-?\\d+)? ?","y");function Qo(t){return Qo="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},Qo(t)}function Zo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ta(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zo(Object(n),!0).forEach(function(e){ea(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zo(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function ea(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Qo(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qo(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var na={human:"Human",mixed:"Mixed",ai_assisted:"AI-assisted",ai:"AI"},ra={human:"Reads as human-written throughout.",mixed:"Contains both human-written and AI-generated passages.",ai_assisted:"Human-written with signs of AI editing.",ai:"Reads as AI-generated throughout."};function ia(t){var e=t&&t.verdict;return"string"==typeof e&&Object.prototype.hasOwnProperty.call(na,e)?e:null}function oa(t){return t&&na[t]||""}function aa(t){return t&&ra[t]||""}function sa(t){if(!t||!0!==t.low_confidence)return"";var e=Array.isArray(t.low_confidence_reasons)?t.low_confidence_reasons:[];return e.includes("short_text")?"Not enough text for a reliable result. Scores on passages under about 500 characters are often wrong; add more text for a dependable score.":e.includes("list_format")?"Lists and bullet points can't be scored reliably. Check a passage of prose for a dependable score.":"This text can't be scored reliably; treat the score as inconclusive."}function ua(t){t&&"function"==typeof t.querySelectorAll&&t.querySelectorAll("[style]").forEach(function(t){t.style.removeProperty("background-color"),t.style.removeProperty("background")})}function ca(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).createElement("span");return e.innerHTML=String(t||""),ua(e),e.innerHTML}var la=function(t){return"number"==typeof t&&Number.isFinite(t)};function da(t,e){if(t.length<=e)return t;var n=t.slice(0,e),r=/\s/.test(t[e])?e:n.lastIndexOf(" ");return"".concat((r>e/2?n.slice(0,r):n).replace(/[\s,;:]+$/,""),"\u2026")}function fa(t,e,n){for(var r=0,i=t.indexOf(e);i>=0&&i<n;i=t.indexOf(e,i+1))r+=1;return r}Promise.resolve();function pa(t){try{chrome.runtime.sendMessage(t,function(){chrome.runtime.lastError})}catch(t){}}var ha=[/^https:\/\/chromewebstore\.google\.com\/detail\/[a-p]{32}\/reviews$/,/^https:\/\/microsoftedge\.microsoft\.com\/addons\/detail\/[a-p]{32}$/];function ga(t){return ga="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},ga(t)}var va=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function ma(t){return"string"==typeof t&&va.test(t)}function ya(t){return t&&"object"===ga(t)?{historyId:ma(t.history_id)?t.history_id:"",skipReason:!1===t.history_saved&&"string"==typeof t.history_skip_reason?t.history_skip_reason:""}:{historyId:"",skipReason:""}}var ba={nonpersist:"Not saved to your Sapling account: your team\u2019s data-retention settings keep detections off the server.",disabled:"Not saved to your Sapling account: saving AI detection history is turned off in your account settings.",quota:"Not saved to your Sapling account: your account history is full. Delete older detections to save new ones.",unconfirmed_email:"Not saved to your Sapling account: confirm your email address to sync detection history."};function Da(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!t||"object"!==ga(t)||!function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("string"!=typeof t||t.length>512)return!1;try{e=new URL(t)}catch(t){return!1}var r=e.hostname,i="sapling.ai"===r||r.endsWith(".sapling.ai"),o=!!n&&r===n;return("https:"===e.protocol||"http:"===e.protocol&&o&&!i)&&(i||o)&&e.pathname.startsWith("/ai-detector/report/")&&!e.username&&!e.password}(t.share_url,e))return null;var n=Date.parse(t.shared_at);return{url:t.share_url,sharedAt:Number.isNaN(n)?null:n}}function wa(t,e,n){var r=!1,i=null,o=function(t){r||(r=!0,clearTimeout(i),n(t))};i=setTimeout(function(){return o({ok:!1,status:0,data:null})},arguments.length>3&&void 0!==arguments[3]?arguments[3]:95e3);try{chrome.runtime.sendMessage({action:"request/AI_DETECT_ACCOUNT_HISTORY",op:t,params:e||{}},function(t){!chrome.runtime.lastError&&t&&"object"===ga(t)?o({ok:!0===t.ok,status:Number(t.status)||0,data:void 0===t.data?null:t.data}):o({ok:!1,status:0,data:null})})}catch(t){o({ok:!1,status:0,data:null})}}function xa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Aa(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xa(Object(n),!0).forEach(function(e){Ea(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xa(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Ea(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Sa(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Sa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Sa(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sa(t){return Sa="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},Sa(t)}var _a="aiDetectHistory";function Ca(t){var e,n,r=t||{};return{scoreString:(e=r.scoreString,n="string"==typeof e?e:"",n.length<=15e4?n:""),totalWords:"number"==typeof r.totalWords?r.totalWords:0,truncated:!!r.truncated,pagesNote:String(r.pagesNote||"").slice(0,300),lowConfidence:!0===r.lowConfidence,verdict:ia(r)}}var ka=Promise.resolve();function Oa(t){var e=t&&"object"===Sa(t)?t:{},n=!!e.fromCache,r="number"==typeof e.certTs?e.certTs:null,i=Aa({ts:"number"==typeof e.ts?e.ts:Date.now(),score:"number"!=typeof e.score||Number.isNaN(e.score)?0:e.score,words:"number"==typeof e.words?e.words:0,snippet:String(e.snippet||"").trim().slice(0,120),source:String(e.source||""),hash:String(e.hash||""),host:String(e.host||""),historyId:ma(e.historyId)?e.historyId:""},Ca(e));return i.scoredTs=r||i.ts,ka=ka.then(function(){return new Promise(function(t){chrome.storage.local.get([_a],function(e){var o,a=e&&Array.isArray(e[_a])?e[_a]:[],s=i.hash?a.find(function(t){return t&&t.hash===i.hash}):null;if(n){var u=s&&(s.certTs||s.ts)||0;o=Math.max(r||0,u)||i.ts}else o=i.ts;if(!i.scoreString&&!i.lowConfidence&&s&&s.scoreString){var c=Ca(s);i.scoreString=c.scoreString,i.totalWords=c.totalWords,i.truncated=c.truncated,i.pagesNote||c.lowConfidence||(i.pagesNote=c.pagesNote)}!i.historyId&&s&&ma(s.historyId)&&(i.historyId=s.historyId),i.hash&&(a=a.filter(function(t){return t&&t.hash!==i.hash})),a.unshift(Aa(Aa({},i),{},{certTs:o}));var l=6e5,d=a.slice(0,100).map(function(t){var e=t&&"string"==typeof t.scoreString?t.scoreString.length:0;return e?e>l?Aa(Aa({},t),{},{scoreString:""}):(l-=e,t):t});chrome.storage.local.set(Ea({},_a,d),t)})})})}function Ta(t){var e=t.score,n=t.words,r=t.snippet,i=t.source,o=t.hash,a=t.host,s=t.fromCache,u=t.certTs,c=t.scoreString,d=t.totalWords,f=t.truncated,p=t.pagesNote,h=t.lowConfidence,g=t.verdict,v=t.historyId,m=t.onReviewAskDue;if(l.AI_DETECT_ANYWHERE_EXTENSION&&!("number"!=typeof e||Number.isNaN(e)||e<0)){var y=Aa(Aa({ts:Date.now(),score:e,words:n,snippet:String(r||"").trim().slice(0,120),source:i,hash:o,host:a,historyId:ma(v)?v:"",fromCache:!!s,certTs:"number"==typeof u?u:void 0},Ca({scoreString:c,totalWords:d,truncated:f,pagesNote:p,lowConfidence:h,verdict:g})),{},{reviewAsk:"function"==typeof m});try{chrome.runtime.sendMessage({action:"event/AI_DETECT_RECORD_HISTORY",entry:y},function(t){var e;chrome.runtime.lastError?Oa(y):t&&t.reviewAskUrl&&(!!m&&("string"==typeof(e=t.reviewAskUrl)&&ha.some(function(t){return t.test(e)}))&&!0===m(t.reviewAskUrl)||pa({action:"event/AI_DETECT_REVIEW_ASK_RELEASE",askedTs:t.reviewAskTs}))})}catch(t){Oa(y)}}}function Ia(t,e){try{if(navigator.clipboard&&navigator.clipboard.writeText)return void navigator.clipboard.writeText(t).then(function(){return e(!0)},function(){return e(!1)})}catch(t){}e(!1)}function ja(t,e){var n=e.historyId,r=e.share,i=void 0===r?null:r,o=e.websiteHostname,a=void 0===o?"":o,s=e.classPrefix,u=void 0===s?"sapling-ai-share":s,c=e.linkLabel,l=void 0===c?"Share report":c,d=e.onEvent,f=e.onChange,p=e.sourceId;if(!ma(n))return null;var h=t.createElement("span");h.className=u;var g=Da(i,a),v=!1,m=function(e,n,r,i){var o=t.createElement("a");o.className="".concat(u,"-action").concat(i?" ".concat(i):""),o.textContent=e,o.title=n,o.setAttribute("role","button"),o.tabIndex=0;var a=function(t){t.preventDefault(),t.stopPropagation(),v||r()};return o.addEventListener("click",a),o.addEventListener("keydown",function(t){"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||a(t)}),o},y=t.createElement("span");y.className="".concat(u,"-status"),y.setAttribute("role","status");var b=function(){return v=!0,y.textContent="Creating link\u2026",void wa("share",{id:n,sourceId:p},function(t){v=!1;var e=t.ok?Da(t.data,a):null;if(!e)return w(function(t){return 403===t?"This detection can\u2019t be shared: its text isn\u2019t kept on your account (data-retention settings).":404===t?"This detection is no longer in your account history.":"Couldn\u2019t create a share link. Check your connection and try again."}(t.ok?0:t.status)),void(d&&d("ai_detect_share_failed",{status:t.status||0}));g=e,f&&f(t.data),d&&d("ai_detect_share_created",{}),Ia(g.url,function(t){w(t?"Link copied. Anyone with the link can view this report.":"Select the link to copy it."),t&&setTimeout(function(){y.isConnected&&g&&(y.textContent="")},5e3)})})},D=function(){return v=!0,y.textContent="Revoking\u2026",void wa("unshare",{id:n,sourceId:p},function(t){v=!1,t.ok||404===t.status?(g=null,f&&f(null),d&&d("ai_detect_share_revoked",{}),w("Link revoked.")):w("Couldn\u2019t revoke the link. Try again.")})},w=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";h.firstChild;)h.removeChild(h.firstChild);if(g){var n=t.createElement("a");n.className="".concat(u,"-link"),n.href=g.url,n.target="_blank",n.rel="noopener noreferrer",n.textContent=g.url,h.appendChild(n),h.appendChild(m("Copy link","Copy the share link",function(){Ia(g.url,function(t){return w(t?"Link copied.":"Select the link to copy it.")}),d&&d("ai_detect_share_link_copied",{})})),h.appendChild(m("Revoke link","Turn this link off; anyone who has it can no longer open the report",D,"".concat(u,"-revoke")))}else h.appendChild(m(l,"Create a link to this report on sapling.ai. It stays live until you revoke it.",b));y.textContent=e,h.appendChild(y)};return w(),h}["nav","header","footer","aside","form","button","select","noscript","svg",'[aria-hidden="true"]',"[hidden]",'[role="navigation"]','[role="banner"]','[role="contentinfo"]','[role="complementary"]',".sapling-run-ai-detection-button"].join(", ");var Fa,Na=n(216);var Pa=null,Ra=!1,Ma="".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2)),Ba=null;function La(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Na("#slidecheck").prop("disabled",on()),Na("#slidecheck").prop("checked",Je()),Na("#advanced-edits-slidecheck").prop("disabled",on()),Na("#advanced-edits-slidecheck").prop("checked",Qe()),Na("#complete-slidecheck").prop("disabled",Ke()||!He()),Na("#complete-slidecheck").prop("checked",tn()),Na("#badge-slidecheck").prop("checked",mn()),Na("#tone-slidecheck").prop("checked",vn()),Na("#ai-detect-slidecheck").prop("checked",cn()),Na("#ai-detect-select-button-slidecheck").prop("checked",!0===Te||!1===Te?Te:!l.AI_DETECT_ANYWHERE_EXTENSION),Na("#ai-detect-gdoc-chip-slidecheck").prop("checked",hn()),Na("#rephrase-slidecheck").prop("checked",sn()),Na("#side-panel-slidecheck").prop("checked",!0===je),Na("#lang-select").val(Dn()),Na("#subscription-banner").toggleClass("subscription-banner-throttled",t),t)return Be()?Na("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Do you need to <a href="https://sapling.ai/user/sign-in">sign in</a>?'):Na("#subscription-banner").html('Daily limit exceeded for <a href="https://sapling.ai/integrations" target="_blank">premium domain</a>.<br/> Contact <a href="https://sapling.ai/contact" target="_blank">Sapling Sales</a> to subscribe.'),Na("#subscription-banner").css({"font-weight":"500",border:"2px solid #555"}),void Na("#subscription-banner").show();Je()||tn()?mo():bo()}var Ha=function(t){var e=String(t||"");return e.charAt(0).toUpperCase()+e.slice(1)};function qa(t){var e=t.closest("#sapling-embedded-popup").find("#plan-badge");if(e.hide(),He()){var n=Ye();if(null===n||n>30){if(e.length)return e.text(qe()).show(),Na("#team-premium-banner").hide(),void t.hide();t.html("<strong>".concat(Ha(qe()),"</strong>")),t.css({"background-color":"var(--sapling-success-bg, ".concat(Ir,")"),color:"var(--sapling-success-text, ".concat(jr,")"),border:"0"}),Na("#team-premium-banner").hide()}else n<=1?t.html('<a target="_blank" href="'.concat(l.WEBSITE_URL,'/plans"><strong>').concat(Ha(qe())," trial</strong></a> \xb7 <strong>1 day</strong> left")):t.html('<a target="_blank" href="'.concat(l.WEBSITE_URL,'/plans"><strong>').concat(Ha(qe())," trial</strong></a> \xb7 <strong>").concat(n," days</strong> left")),t.css({"background-color":"var(--sapling-banner-warning-bg, ".concat(_r,")"),color:"var(--sapling-banner-warning-text, ".concat(kr,")"),border:"1px solid var(--sapling-banner-warning-border, ".concat(Cr,")")});t.show()}else Le()?(t.html("You're on the Free plan. "+'<a target="_blank" href="'.concat(l.WEBSITE_URL,'/plans"><strong>Upgrade to Pro</strong></a>')+" for premium edits."),t.css({"background-color":"var(--sapling-banner-warning-bg, ".concat(_r,")"),border:"0",color:"var(--sapling-banner-warning-text, ".concat(kr,")")})):Be()||Le()?(t.html('<strong><a target="_blank" href="'.concat(l.WEBSITE_URL,'/user/register">Create a free account</a></strong>')),t.css({"background-color":"var(--sapling-banner-warning-bg, ".concat(_r,")"),border:"0",color:"var(--sapling-banner-warning-text, ".concat(kr,")")})):(t.html("<strong>Please confirm your email using the link in the email we sent you.</strong>"),t.css({"background-color":"var(--sapling-banner-warning-bg, ".concat(_r,")"),border:"0",color:"var(--sapling-banner-warning-text, ".concat(kr,")")})),t.show()}var Ua=4194304;En().debounce(function(){if(!Ra){var t=Fa.innerHTML;t!==Ba&&(t.length>Ua||(Ba=t,Pa.postMessage({html:t,sourceId:Ma})))}},200,{leading:!1,trailing:!0});new Map;var za=n(216);function Wa(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Ga(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Ga(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ga(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Ga(d,"constructor",c),Ga(c,"constructor",u),u.displayName="GeneratorFunction",Ga(c,i,"GeneratorFunction"),Ga(d),Ga(d,i,"Generator"),Ga(d,r,function(){return this}),Ga(d,"toString",function(){return"[object Generator]"}),(Wa=function(){return{w:o,m:f}})()}function Ga(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Ga=function(t,e,n,r){function o(e,n){Ga(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Ga(t,e,n,r)}function $a(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var Ya=new Set;function Va(t,e,n,r){var i;return i=[],Object.keys(Cs).forEach(function(t){var e=Cs[t];Object.keys(e).forEach(function(t){i.push(e[t])})}),Object.keys(ks).forEach(function(t){i.push(ks[t])}),i.filter(function(t){return t.isLoading}).length>0&&function(t){var e=ql[t];if(!e||!e.badge)return;e.badge.showSpinner()}(r),St("makeToolbarIconLoading"),function(t){var e=ql[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.queryAndUpdate()}(r),function(t,e,n,r){St("request/GET_EDITS",{html:m()(t,2097152),sessionId:e,context:It()},n,r)}(t,r,function(){var t,i=(t=Wa().m(function t(i){var o,a;return Wa().w(function(t){for(;;)switch(t.n){case 0:if(!(o=i.edits).includes("throttled")){t.n=1;break}return li(),yo(),Yl(r),"sapling-embedded-editable"===n.id&&La(!0),t.a(2);case 1:return Ns(r,e),Ts(),a=0,t.n=2,Ps(n,r,e,o);case 2:a=Wl(n),go(!0),a>0&&!Ya.has(r)&&(Pt("edits_applied",{num_edits:a},r),Ya.add(r)),vo()&&("sapling-embedded-editable"===n.id?mo():Do(a)),$l(r),Kl(r),Vl(r);case 3:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){$a(o,r,i,a,s,"next",t)}function s(t){$a(o,r,i,a,s,"throw",t)}a(void 0)})});return function(t){return i.apply(this,arguments)}}(),function(t){go(!1),wo(),$l(r),function(t){var e=ql[t];if(!e)return;if(!e.badge)return;e.badge.showErrorState()}(r)})}function Ka(t,e){if(function(){if(!Ur("sapling-complete").length){var t=Ur("<sapling-complete></sapling-complete>");t.css({display:"inline",width:0,height:0});var e=t[0];e.attachShadow({mode:"open"}),Gr=e.shadowRoot,Ur("html").append(t)}}(),Kr(),!function(t){for(var e=zr(Xr(t),2),n=e[0],r=e[1],i=0,o=0;o<n.length;o++){var a=i+n[o].length;if(i<=r&&a>r)return!0;i=a+1}return!1}(t=za(t)[0])){var n=Jr(t);n&&n.trim()&&function(t,e,n,r){St("request/GET_COMPLETION",{query:t.slice(-300),sessionId:e,context:It()},n,r)}(n,e,function(e){if(Jr(t)===n){var r=e.completion;r&&r.output&&r.output.trim()&&ti(t,r.output,r)}else Kr()},function(){go(!1),wo()})}}function Xa(t,e,n,r){var i={hidden:document.hidden};return Object.assign(i,r),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=It();Object.assign(o,i),St("request/GET_SUGGEST",{query:t.slice(-300),multiquery:e,context:o},n,r)}(t,e,function(t){n(t)},function(){},i)}function Ja(t,e,n){!function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=It();Object.assign(i,r),St("request/GET_MATCH_SUGGEST",{inp:t.slice(-300),context:i},e,n)}(t,function(t){e(t)},function(){},n)}function Qa(t,e,n){if(!n.isPointInRange(t,e))return null;var r=n.cloneRange();return r.setEnd(t,e),r.toString().length}function Za(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.createRange();if(n.selectNodeContents(t),e)return t.selectionStart;if(!t.getRootNode().getSelection)return 0;var r=t.getRootNode().getSelection(),i=null,o=null;return r.anchorNode&&(i=Qa(r.anchorNode,r.anchorOffset,n)),r.focusNode&&(o=Qa(r.focusNode,r.focusOffset,n)),i&&o?Math.min(i,o):i||o}var ts=n(216);function es(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return ns(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(ns(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,ns(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,ns(d,"constructor",c),ns(c,"constructor",u),u.displayName="GeneratorFunction",ns(c,i,"GeneratorFunction"),ns(d),ns(d,i,"Generator"),ns(d,r,function(){return this}),ns(d,"toString",function(){return"[object Generator]"}),(es=function(){return{w:o,m:f}})()}function ns(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}ns=function(t,e,n,r){function o(e,n){ns(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},ns(t,e,n,r)}function rs(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function is(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){rs(o,r,i,a,s,"next",t)}function s(t){rs(o,r,i,a,s,"throw",t)}a(void 0)})}}var os=4e3,as=[new RegExp("[\\s\\S]{0,".concat(os,"}</div>"),"imy"),new RegExp("[\\s\\S]{0,".concat(os,"}</p>"),"imy"),new RegExp("[\\s\\S]{0,".concat(os,"}<br ?/?>"),"imy"),new RegExp("[\\s\\S]{0,".concat(os,"}(\\.|\\?|!)(?=[^>]*(<|$))"),"imy")];function ss(t,e){if(t.length-e<=2e3)return{sectionHtml:t,sectionTextLength:ts("<span>".concat(t,"</span>")).text().length,endIndex:t.length,skippedText:0};for(var n=e+os,r=0;r<as.length;r+=1){as[r].lastIndex=e;var i=t.match(as[r]);i&&(n=e+i[0].length)}for(var o=t.indexOf("<code>",e);-1!==o&&o<n;){var a=t.indexOf("</code>",o);if(a>=0){var s=t.slice(o,a+7);if(/<br\s?\/?>/i.test(s)){var u=t.slice(e,o);return{sectionHtml:u,sectionTextLength:ts("<span>".concat(u,"</span>")).text().length,endIndex:a+7,skippedText:ts("<span>".concat(s,"</span>")).text().length}}}o=t.indexOf("<code>",o+6)}var c=t.slice(e,n);return{sectionHtml:c,sectionTextLength:ts("<span>".concat(c,"</span>")).text().length,endIndex:n,skippedText:0}}function us(t){var e=0,n=null;if(0===t.length)return e;for(n=0;n<t.length;n+=1)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}function cs(t){return ls.apply(this,arguments)}function ls(){return(ls=is(es().m(function t(e){var n,r,i,o,a,s,u,c,l;return es().w(function(t){for(;;)switch(t.n){case 0:n=[],r=0,i=0,o=0;case 1:if(!(r<e.length)){t.n=3;break}if(a=ss(e,r),s=a.sectionHtml,u=a.sectionTextLength,c=a.endIndex,l=a.skippedText,n.push({html:s,htmlLength:s.length,htmlOffset:r,htmlHash:us(s),textOffset:i,textLength:u}),r=c,i+=u+l,++o%25!=0){t.n=2;break}return t.n=2,new Promise(function(t){return setTimeout(t,50)});case 2:t.n=1;break;case 3:return t.a(2,n)}},t)}))).apply(this,arguments)}function ds(t,e){var n=L(t,0,e.textOffset,t,!1,!1),r=document.createRange();return r.selectNodeContents(n.domElement),r.getBoundingClientRect().top}function fs(t,e){var n=window.innerHeight/2;t.sort(function(t,r){var i=ds(e,t),o=ds(e,r);return Math.abs(i-n)-Math.abs(o-n)});for(var r=0;r<t.length;r+=1){var i=t[r];i.priority=r<8?r:100}return t}function ps(t,e){t.sort(function(t,n){return Math.abs(t.textOffset-e)-Math.abs(n.textOffset-e)});for(var n=0;n<t.length;n+=1){var r=t[n];r.priority=n<8?n:100}return t}function hs(t,e){return gs.apply(this,arguments)}function gs(){return(gs=is(es().m(function t(e,n){var r,i;return es().w(function(t){for(;;)switch(t.n){case 0:return r=Za(n)||0,t.n=1,cs(e);case 1:if(0!==(i=t.v).length){t.n=2;break}return t.a(2,[]);case 2:return t.a(2,ps(i,r))}},t)}))).apply(this,arguments)}function vs(t,e){return ms.apply(this,arguments)}function ms(){return(ms=is(es().m(function t(e,n){var r;return es().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,cs(e);case 1:if(0!==(r=t.v).length){t.n=2;break}return t.a(2,[]);case 2:return t.a(2,fs(r,n))}},t)}))).apply(this,arguments)}var ys=n(216);function bs(t){return bs="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},bs(t)}function Ds(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return ws(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ws(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ws(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xs(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(bs(t)+" is not iterable")}function As(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Es(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Es(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Es(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Es(d,"constructor",c),Es(c,"constructor",u),u.displayName="GeneratorFunction",Es(c,i,"GeneratorFunction"),Es(d),Es(d,i,"Generator"),Es(d,r,function(){return this}),Es(d,"toString",function(){return"[object Generator]"}),(As=function(){return{w:o,m:f}})()}function Es(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Es=function(t,e,n,r){function o(e,n){Es(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Es(t,e,n,r)}function Ss(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function _s(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Ss(o,r,i,a,s,"next",t)}function s(t){Ss(o,r,i,a,s,"throw",t)}a(void 0)})}}var Cs={},ks={};function Os(t,e){if(t in Cs){var n=Cs[t];e in n&&(n[e].isLoading&&(ks[e]=n[e]),delete n[e])}}function Ts(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[];Object.keys(Cs).forEach(function(t){var n=Cs[t];Object.keys(n).forEach(function(t){e.push(n[t])})});var n=(new Date).getTime(),r=e.filter(function(t){return!t.isComplete}),i=e.filter(function(t){return t.isLoading&&n-t.requestTime<15e3});r.sort(function(e,n){if(t&&e.containerId!==n.containerId){if(e.containerId===t)return-1;if(e.containerId===t)return 1}return e.priority-n.priority});var o=[];Object.keys(ks).forEach(function(t){o.push(ks[t])});var a=o.filter(function(t){return t.isLoading&&n-t.requestTime<15e3}),s=i.length+a.length;if(s<1)for(var u=Math.min(r.length,1-s),c=0;c<u;c+=1){var l=r[c];l.requestTime=(new Date).getTime(),l.isLoading=!0,l.htmlHash in ks?(l.requestObj=ks[l.htmlHash].requestObj,delete ks[l.htmlHash]):(l.requestObj=l.requestFunction(),l.requestTime=n)}}function Is(t,e){return js.apply(this,arguments)}function js(){return(js=_s(As().m(function t(e,n){var r,i,o,a,s,u,c;return As().w(function(t){for(;;)switch(t.n){case 0:if(r=(r=so(e)).replace(/\u00A0/g," ").replace(/\u200B/g," ").replace(/\uFEFF/g," "),i=Y(e),!n){t.n=2;break}return t.n=1,vs(r,e);case 1:o=t.v,t.n=4;break;case 2:return t.n=3,hs(r,e);case 3:o=t.v;case 4:Cs[i]=Cs[i]||{},a=Cs[i],s={},u=As().m(function t(){var n,r,u,l;return As().w(function(t){for(;;)switch(t.n){case 0:if(n=o[c],r=ys("<span>".concat(n.html,"</span>")).text(),0!==r.replace(/(\r\n\t|\n|\r\t)/gm,"").trim().length){t.n=1;break}return t.a(2,1);case 1:if(s[n.htmlHash]=s[n.htmlHash]||[],s[n.htmlHash].push([n.textOffset,n.textLength]),!(n.htmlHash in a)){t.n=5;break}if((u=a[n.htmlHash]).priority=n.priority,!("edits"in u)){t.n=3;break}return t.n=2,fo(e,u.edits,n.textOffset,n.textLength);case 2:t.n=4;break;case 3:u.isComplete=!1;case 4:t.n=6;break;case 5:l=function(){return Va(n.html,n.htmlHash,e,i)},a[n.htmlHash]={requestFunction:l,containerId:i,priority:n.priority,hash:n.htmlHash,requestTime:null};case 6:return t.a(2)}},t)}),c=0;case 5:if(!(c<o.length)){t.n=8;break}return t.d(xs(u()),6);case 6:if(!t.v){t.n=7;break}return t.a(3,7);case 7:c++,t.n=5;break;case 8:Object.keys(a).forEach(function(t){t in s?a[t].textOffsets=s[t]:Os(i,t)});case 9:return t.a(2)}},t)}))).apply(this,arguments)}function Fs(t,e){if(t in Cs)for(var n=Cs[t],r=Object.keys(n),i=0;i<r.length;i+=1){var o=r[i];n[o].edits&&delete n[o].edits[e]}}function Ns(t,e){t in Cs&&e in Cs[t]&&(Cs[t][e].isLoading=!1,Cs[t][e].isComplete=!0),e in ks&&delete ks[e]}function Ps(t,e,n,r){return Rs.apply(this,arguments)}function Rs(){return(Rs=_s(As().m(function t(e,n,r,i){var o,a,s,u,c,l,d,f,p,h,g;return As().w(function(t){for(;;)switch(t.n){case 0:for(o={},a=0,s=0;s<i.length;s+=1)u=i[s],c="".concat(u.id,":").concat(u.start.offset),o[c]={sortId:a,editId:c,editHash:u.id,startIndex:u.start.offset,endIndex:u.end.offset,startText:u.start.text,endText:u.end.text,originalText:u.original_text,replacementText:u.replacement_text,replacementContext:u.replacement_context,premium:u.premium,fillin:u.replacement_text&&u.replacement_text.includes("SAPLING_FILLIN"),description:u.description,requireLogin:u.require_login,category:u.category,generalErrorType:u.general_error_type,difficulty:u.difficulty,errorType:u.error_type,dictionary:u.dictionary},a+=1;if(!Cs[n]||!(r in Cs[n])){t.n=3;break}(l=Cs[n][r]).edits=o,d=l.textOffsets,f=0;case 1:if(!(f<d.length)){t.n=3;break}return p=Ds(d[f],2),h=p[0],g=p[1],t.n=2,fo(e,o,h,g);case 2:f+=1,t.n=1;break;case 3:return t.a(2)}},t)}))).apply(this,arguments)}function Ms(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)&&t.isPointInRange(i,o)}function Bs(t,e){var n=e.endContainer,r=e.endOffset;return t.isPointInRange(n,r)}function Ls(t,e){var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return t.isPointInRange(n,r)||t.isPointInRange(i,o)}function Hs(t,e){return Ls(t,e)||Ls(e,t)}function qs(t,e){return e<=(t.nodeType===Node.TEXT_NODE?t.length:t.childNodes.length)}function Us(t){var e=t.startContainer,n=t.startOffset,r=t.endContainer,i=t.endOffset;return!!e&&!!r&&e.ownerDocument===r.ownerDocument&&qs(e,n)&&qs(r,i)}function zs(t){return!!["TEXTAREA","INPUT"].includes(t.nodeName)||!!t.isContentEditable}function Ws(){return!!["TEXTAREA","INPUT"].includes(document.activeElement.nodeName)||!!document.activeElement.isContentEditable}var Gs=[{hostnames:["chat.openai.com","chatgpt.com"],textNodesSelector:'[data-message-author-role="assistant"]',textExtractor:function(t){var e=t.querySelector(".markdown");return((e?e.innerText:t.innerText)||"").replace(/^chatgpt\s+/i,"")}},{hostnames:["claude.ai"],textNodesSelector:".font-claude-response, .font-claude-message",customCss:'\n [data-mode="dark"] .sapling-run-ai-detection-button,\n [data-theme="dark"] .sapling-run-ai-detection-button {\n color: white;\n background: '.concat(ir,";\n }\n "),textExtractor:function(t){var e=t.querySelectorAll('.standard-markdown, [class*="markdown"]');if(e.length)return Array.from(e).map(function(t){return t.innerText||""}).join("\n\n");var n=t.querySelector("div");return n?n.innerText:t.innerText}},{hostnames:["gemini.google.com"],textNodesSelector:".model-response-text",customCss:"\n body.dark-theme .sapling-run-ai-detection-button {\n color: white;\n background: ".concat(ir,";\n }\n "),textExtractor:function(t){var e=t.querySelector(".markdown");return e?e.innerText:t.innerText}},{hostnames:["grok.com"],textNodesSelector:'.message-bubble[data-testid="assistant-message"], [data-testid="assistant-message"] .message-bubble',textExtractor:function(t){return t.innerText}},{hostnames:["chat.deepseek.com"],textNodesSelector:".ds-markdown",textExtractor:function(t){return t.innerText}},{hostnames:["copilot.microsoft.com"],textNodesSelector:'[data-testid="as-message"]',textExtractor:function(t){return t.innerText}},{hostnames:["www.perplexity.ai","perplexity.ai"],textNodesSelector:'[data-testid="answer"] .prose',textExtractor:function(t){return t.innerText}},{hostnames:["www.amazon.com","www.amazon.co.uk","www.amazon.ca","www.amazon.com.au","www.amazon.in","www.amazon.de","www.amazon.fr","www.amazon.it","www.amazon.es","www.amazon.nl","www.amazon.se","www.amazon.co.jp","www.amazon.com.mx","www.amazon.com.br"],textNodesSelector:'[data-hook="review-body"]',minWords:50,staticText:!0,textExtractor:function(t){return(t.innerText||"").replace(/\s*Read more$/i,"")}},{hostnames:["trustpilot.com"],hostnameSuffixes:[".trustpilot.com"],textNodesSelector:"[data-service-review-text-typography]",minWords:50,staticText:!0,textExtractor:function(t){return t.innerText}},{hostnames:["www.goodreads.com"],textNodesSelector:".ReviewText__content",minWords:50,staticText:!0,textExtractor:function(t){var e=t.querySelector(".Formatted");return e?e.innerText:t.innerText}}];var $s="gdoc chip",Ys="gslides chip";function Vs(t){return t===$s||t===Ys}function Ks(t){var e=t.score,n=t.verdict;return"ai"===n?"ai":"mixed"===n||"ai_assisted"===n?"mixed":"human"===n?"human":e>70?"ai":e>25?"mixed":"human"}function Xs(t,e){var n=e||{kind:"idle"},r=t&&t.status;return"result"!==r||"number"==typeof t.score&&t.score>=0?"result"===r?{kind:"result",score:t.score,verdict:t.verdict||null,lowConfidence:!!t.lowConfidence}:"short"===r?{kind:"short"}:"error"===r?{kind:"error"}:n:{kind:"error"}}function Js(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Qs(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qs(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Zs="sapling-ai-passage",tu=null;function eu(t,e,n){for(var r=t.indexOf(e),i=0;r>=0&&i<n;i+=1){var o=t.indexOf(e,r+1);if(o<0)break;r=o}return r}function nu(t,e,n){var r=function(t,e){if(!t||!e||!t.ownerDocument)return null;for(var n=t.ownerDocument,r=n.createTreeWalker(t,4),i="",o=[],a=r.nextNode();a;a=r.nextNode())for(var s=a.nodeValue||"",u=0;u<s.length;u+=1)/\s/.test(s[u])||(i+=s[u],o.push([a,u]));var c=Number.isInteger(e.occurrence)&&e.occurrence>0?e.occurrence:0,l=String(e.matchText||""),d=l?eu(i,l,c):-1,f=d+l.length;if(d<0){var p=String(e.firstSentence||"").replace(/\s+/g,"").slice(0,80);if((d=p?eu(i,p,c):-1)<0)return null;f=d+p.length;var h=String(e.lastSentence||"").replace(/\s+/g,"").slice(-80),g=h?i.indexOf(h,d):-1;g>=0&&(f=Math.max(f,g+h.length))}var v=Js(o[d],2),m=v[0],y=v[1],b=Js(o[f-1],2),D=b[0],w=b[1],x=n.createRange();return x.setStart(m,y),x.setEnd(D,w+1),x}(t,e);if(!r)return!1;var i=r.startContainer.parentElement,o="function"==typeof r.getBoundingClientRect?r:i;if(n&&o&&"function"==typeof n.getBoundingClientRect){var a=o.getBoundingClientRect(),s=n.getBoundingClientRect();n.scrollTop+=a.top-s.top-Math.max(0,(n.clientHeight-a.height)/2)}else i&&"function"==typeof i.scrollIntoView&&i.scrollIntoView({block:"nearest"});try{var u=t.ownerDocument.defaultView,c=u&&u.CSS;c&&c.highlights&&"function"==typeof u.Highlight&&(c.highlights.set(Zs,new u.Highlight(r)),clearTimeout(tu),tu=setTimeout(function(){return c.highlights.delete(Zs)},2500))}catch(t){}return!0}function ru(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.classPrefix,i=void 0===r?"sapling-ai-passages":r,o=n.getTextRoot,a=n.getScrollContainer,s=n.onEvent,u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.maxPassages,r=void 0===n?3:n,i=e.maxChars,o=void 0===i?160:i;if(!t||!Array.isArray(t.segments)||!Array.isArray(t.sentence_scores))return null;var a=t.sentence_scores.filter(function(t){return t&&"string"==typeof t.sentence&&la(t.start)&&la(t.end)}).sort(function(t,e){return t.start-e.start}),s=a.map(function(t){return t.sentence.replace(/\s+/g,"")}),u=t.segments.filter(function(t){return t&&la(t.start)&&la(t.end)&&t.end>t.start}).sort(function(t,e){return t.start-e.start}).map(function(t){var e=a.map(function(e,n){return e.start>=t.start&&e.end<=t.end&&e.sentence.trim()?n:-1}).filter(function(t){return t>=0}),n=e.map(function(t){return a[t].sentence.trim().replace(/\s+/g," ")}),r=e.map(function(t){return s[t]}).join(""),i=e.length?s.slice(0,e[0]).join("").length:0;return{text:n.join(" "),matchText:r,occurrence:r?fa(s.join(""),r,i):0,firstSentence:n[0]||"",lastSentence:n[n.length-1]||"",score:la(t.score)?Math.min(1,Math.max(0,t.score)):null}}).filter(function(t){return t.text});if(!u.length)return null;var c=la(t.ai_fraction)?Math.min(1,Math.max(0,t.ai_fraction)):null;return{passages:u.slice(0,Math.max(1,r)).map(function(t){return ta(ta({},t),{},{text:da(t.text,o)})}),total:u.length,aiFraction:c}}(e);if(!u)return null;var c=function(t,e){"function"==typeof s&&s(t,e)},l=u.passages,d=u.total,f=u.aiFraction,p=t.createElement("details");p.className=i;var h=t.createElement("summary");h.className="".concat(i,"-summary");var g=null!==f?" \xb7 ".concat(function(t){var e=Math.round(100*t);return 0===e&&t>0?"<1%":"".concat(e,"%")}(f)," of the text"):"";h.textContent="".concat(d," AI-flagged passage").concat(1===d?"":"s").concat(g),h.title="Runs of consecutive sentences scored as AI-generated",p.appendChild(h),p.addEventListener("toggle",function(){p.open&&c("ai_detect_passages_opened",{count:d})});var v=t.createElement("ol");if(v.className="".concat(i,"-list"),l.forEach(function(e,n){var r=t.createElement("li"),s=t.createElement("a");s.className="".concat(i,"-item"),s.setAttribute("role","button"),s.tabIndex=0,s.title="Show this passage in the text";var u=t.createElement("span");if(u.className="".concat(i,"-text"),u.textContent="\u201c".concat(e.text,"\u201d"),s.appendChild(u),null!==e.score){var l=t.createElement("span");l.className="".concat(i,"-score"),l.textContent="".concat(Math.round(100*e.score),"% AI"),s.appendChild(l)}var d=function(t){t.preventDefault();var r="function"==typeof o?o():null,i="function"==typeof a?a():null,s=nu(r,e,i);c("ai_detect_passage_clicked",{index:n,found:s})};s.addEventListener("click",d),s.addEventListener("keydown",function(t){"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||d(t)}),r.appendChild(s),v.appendChild(r)}),p.appendChild(v),d>l.length){var m=t.createElement("div");m.className="".concat(i,"-more");var y=d-l.length;m.textContent="+ ".concat(y," more passage").concat(1===y?"":"s"," highlighted in the text"),p.appendChild(m)}return p}var iu=n(216);function ou(t){return ou="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},ou(t)}function au(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function su(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?au(Object(n),!0).forEach(function(e){uu(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):au(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function uu(t,e,n){return(e=lu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,lu(r.key),r)}}function lu(t){var e=function(t,e){if("object"!=ou(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ou(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ou(e)?e:e+""}var du=new WeakMap;var fu=l.AI_DETECT_ANYWHERE_EXTENSION?"-aidetect":"SDK"===l.MODE?"-sdk":"-grammar",pu="sapling-ai-detect-controls".concat(fu),hu="sapling-ai-detect-button".concat(fu),gu="data-sapling-ai-detect-owner".concat(fu),vu="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2));function mu(){return!!document.documentElement&&(document.documentElement.setAttribute(gu,vu),!0)}function yu(){return!!document.documentElement&&document.documentElement.getAttribute(gu)===vu}var bu=new Map;function Du(t,e){bu.has(t)?bu.delete(t):bu.size>=10&&bu.delete(bu.keys().next().value),bu.set(t,e)}function wu(t,e,n){iu(t).attr({role:"button",tabindex:"0","aria-label":e}).on("click",n).on("keydown",function(t){"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),n())})}var xu="aiDetectCtxHintShownCount",Au="aiDetectCtxMenuUsed",Eu="Processing your text, please wait...",Su=function(t){return(t||"").trim().split(/\s+/).filter(Boolean).length},_u=function(t){var e="string"==typeof t?t.trim():"";return(e.length>0?e:"unknown").toLowerCase().replace(/\s+/g,"_")},Cu=['[data-testid="model-switcher-dropdown-button"]',".items-center.sm\\:justify-center span"];var ku="\n<style>\n".concat(qr,"\n .sapling-ai-detect-select-button::after {\n content: 'Run AI Detection';\n position: absolute;\n display: none;\n background-color: var(--sapling-tooltip-bg);\n color: #fff;\n padding: 5px;\n border-radius: var(--sapling-radius-sm);\n width: 150px;\n left: 50%;\n transform: translateX(-50%);\n bottom: -100%;\n text-align: center;\n }\n\n .sapling-ai-detect-select-button:hover::after {\n display: block;\n }\n\n .sapling-ai-detect-select-button {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-button:hover {\n opacity: 1;\n }\n\n .sapling-ai-detect-select-content {\n width: 80vw;\n min-height: 40vh;\n max-height: 90vh;\n background: var(--sapling-surface);\n border-radius: var(--sapling-radius-lg);\n position: fixed;\n overflow: hidden;\n top: 5vh;\n left: 10vw;\n z-index: 9999;\n box-shadow: var(--sapling-shadow-panel);\n font-family: var(--sapling-font);\n font-size: 12px;\n color: var(--sapling-text);\n display: flex;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-content-header {\n background-color: var(--sapling-surface-muted);\n color: var(--sapling-text);\n font-size: 14px;\n font-weight: 600;\n padding: 8px;\n border-bottom: 1px solid var(--sapling-border);\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n\n .sapling-ai-detect-select-content-header .left {\n display: flex;\n align-items: center;\n }\n\n .sapling-ai-detect-select-content-header .left img {\n height: 20px;\n padding: 5px 10px;\n border-right: 1px solid var(--sapling-border);\n padding-right: 20px;\n margin-right: 20px;\n }\n\n .sapling-ai-detect-select-content-header .right {\n display: flex;\n align-items: center;\n padding: 5px 10px;\n }\n\n .sapling-ai-detect-select-content-header .right .sapling-icon {\n display: block;\n color: var(--sapling-text-muted);\n }\n\n .sapling-ai-detect-select-content-header .right .sapling-ai-detect-select-header-button:hover .sapling-icon {\n color: var(--sapling-text);\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner {\n padding: 5px 10px;\n margin: 0 15px;\n font-size: 13px;\n border-radius: var(--sapling-radius-sm);\n }\n\n .sapling-ai-detect-select-content-header #subscription-banner a {\n text-decoration: none;\n }\n\n .sapling-ai-detect-select-header-button {\n cursor: pointer;\n padding: 4px;\n border-radius: var(--sapling-radius-sm);\n }\n\n .sapling-ai-detect-select-header-button:hover {\n background-color: var(--sapling-border);\n }\n\n .sapling-ai-detect-select-header-button:focus-visible {\n outline: 2px solid var(--sapling-blue);\n outline-offset: 1px;\n }\n\n /* Status indicator, not a control: no hover tile, no pointer. It stays in\n the layout at opacity 0 when idle so copy/close don't shift as it fades. */\n .sapling-ai-detect-select-spinner {\n pointer-events: none;\n }\n\n .sapling-ai-detect-select-content-body {\n display: flex;\n flex-grow: 1;\n position: relative;\n overflow: hidden;\n justify-content: center;\n }\n\n .sapling-ai-detect-select-content-body .hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-overall {\n flex-basis: 35%;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n }\n\n .sapling-ai-detect-select-overall .overall-score {\n font-size: 46px;\n font-weight: 600;\n font-variant-numeric: tabular-nums;\n }\n\n .sapling-ai-detect-select-overall .overall-message {\n text-align: center;\n font-size: 16px;\n color: var(--sapling-text-muted);\n margin: 15px;\n }\n\n .sapling-ai-detect-select-overall .overall-verdict {\n font-size: 12px;\n font-weight: 700;\n border-radius: var(--sapling-radius-pill);\n padding: 2px 10px;\n margin-top: 8px;\n }\n\n .sapling-ai-detect-select-overall .overall-verdict-human {\n background-color: var(--sapling-success-bg);\n color: var(--sapling-success-text);\n }\n\n .sapling-ai-detect-select-overall .overall-verdict-mixed,\n .sapling-ai-detect-select-overall .overall-verdict-ai_assisted {\n background-color: var(--sapling-warning-bg);\n color: var(--sapling-banner-warning-text);\n }\n\n .sapling-ai-detect-select-overall .overall-verdict-ai {\n background-color: var(--sapling-danger-bg);\n color: ").concat(br,";\n }\n\n .sapling-ai-detect-select-overall .overall-inconclusive {\n font-size: 28px;\n color: var(--sapling-text);\n }\n\n .sapling-ai-detect-select-overall .overall-meta {\n font-size: 12px;\n color: var(--sapling-text-subtle);\n margin-bottom: 8px;\n }\n\n .sapling-ai-detect-select-overall .sapling-ai-detect-review-ask {\n font-size: 12px;\n color: var(--sapling-text-muted);\n text-align: center;\n margin: 4px 20px 8px;\n }\n\n .sapling-ai-detect-review-ask a,\n .sapling-ai-detect-review-ask button {\n font: inherit;\n margin-left: 8px;\n cursor: pointer;\n }\n\n .sapling-ai-detect-review-ask a {\n color: ").concat(ir,";\n font-weight: 600;\n }\n\n .sapling-ai-detect-review-ask button {\n background: none;\n border: none;\n padding: 0;\n color: var(--sapling-text-subtle);\n text-decoration: underline;\n }\n\n .sapling-ai-detect-select-overall .sapling-ai-passages {\n width: 100%;\n box-sizing: border-box;\n padding: 0 16px;\n margin-bottom: 8px;\n font-size: 12px;\n color: var(--sapling-text-muted);\n }\n\n .sapling-ai-passages-summary {\n cursor: pointer;\n text-align: center;\n font-weight: 600;\n }\n\n .sapling-ai-passages-list {\n max-height: 30vh;\n overflow-y: auto;\n margin: 6px 0 0;\n padding-left: 18px;\n text-align: left;\n }\n\n .sapling-ai-passages-list li {\n margin-bottom: 6px;\n }\n\n .sapling-ai-passages-item {\n cursor: pointer;\n color: var(--sapling-text);\n text-decoration: none;\n }\n\n .sapling-ai-passages-item:hover .sapling-ai-passages-text,\n .sapling-ai-passages-item:focus-visible .sapling-ai-passages-text {\n text-decoration: underline;\n }\n\n .sapling-ai-passages-score {\n margin-left: 6px;\n white-space: nowrap;\n font-weight: 600;\n color: ").concat(br,";\n }\n\n .sapling-ai-passages-more {\n margin-top: 2px;\n color: var(--sapling-text-subtle);\n }\n\n ::highlight(").concat(Zs,") {\n background-color: ").concat(ir,';\n color: #fff;\n }\n\n .sapling-ai-detect-select-score-string {\n overflow: auto;\n font-size: 13px;\n padding: 20px;\n width: 100%;\n }\n\n .sapling-ai-detect-select-score-string .score-strings {\n padding: 5px;\n text-align: justify;\n border: 1px solid var(--sapling-border-strong);\n color: var(--sapling-text);\n }\n\n .sapling-ai-detect-select-sentences {\n padding: 20px 40px;\n font-size: 16px;\n overflow: auto;\n max-height: 65vh;\n color: var(--sapling-text);\n }\n\n .sapling-ai-detect-select-sentences .sentence-row {\n display: flex;\n margin: 15px 0;\n }\n\n .sapling-ai-detect-select-sentences .sentence-row .sentence-text {\n flex-basis: 85%;\n margin-right: 15px;\n }\n\n .sapling-ai-detect-select-error.hidden,\n .sapling-ai-detect-select-short.hidden,\n .sapling-ai-detect-select-waiting.hidden {\n display: none;\n }\n\n .sapling-ai-detect-select-error {\n color: var(--sapling-danger);\n }\n\n .sapling-ai-detect-select-error,\n .sapling-ai-detect-select-short,\n .sapling-ai-detect-select-waiting,\n .sapling-ai-detect-select-premium {\n color: var(--sapling-text);\n position: absolute;\n height: 100%;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 16px;\n top: 0;\n left: 0;\n text-align: center;\n background: var(--sapling-surface);\n }\n\n .sapling-ai-detect-select-premium a {\n padding: 5px 15px;\n margin: 10px;\n background-color: var(--sapling-blue);\n color: white;\n text-transform: capitalize;\n text-decoration: none;\n border-radius: var(--sapling-radius-sm);\n }\n\n .sapling-ai-detect-select-spinner {\n transition: all 0.25s;\n transform: rotate(0deg);\n right: 30px;\n opacity: 0;\n }\n\n .sapling-ai-detect-select-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 0.8s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .sapling-ai-detect-select-analysis-mode {\n margin-left: 10px;\n font-size: 16px;\n border: 1px solid var(--sapling-blue);\n padding: 5px 10px;\n border-radius: var(--sapling-radius);\n cursor: pointer;\n transition: all 0.25s;\n }\n\n .sapling-ai-detect-select-analysis-mode.inactive {\n opacity: 0.5;\n }\n\n .sapling-ai-detect-select-analysis-mode:hover {\n background-color: var(--sapling-blue);\n color: white;\n }\n\n .sapling-ai-detect-select-edit-recheck {\n display: block;\n margin: 5px auto;\n margin-top: -10px;\n width: 100%;\n border: none;\n border-radius: var(--sapling-radius-sm);\n padding: 5px;\n background-color: var(--sapling-blue);\n color: white;\n font-size: 13px;\n cursor: pointer;\n }\n\n .sapling-ai-detect-select-edit-recheck:disabled {\n opacity: 0.5;\n cursor: default;\n }\n\n .sapling-ai-detect-copy-button {\n position: relative;\n }\n\n .sapling-ai-detect-copy-button .copy-tooltip {\n display: none;\n position: absolute;\n background: var(--sapling-tooltip-bg);\n color: #fff;\n font-size: 12px;\n padding: 3px 8px;\n border-radius: var(--sapling-radius-sm);\n white-space: nowrap;\n bottom: 120%;\n right: 0;\n }\n\n .sapling-ai-detect-copy-button:hover .copy-tooltip,\n .sapling-ai-detect-copy-button:focus-visible .copy-tooltip {\n display: block;\n }\n\n .sapling-ai-detect-ctx-hint {\n position: absolute;\n display: flex;\n align-items: center;\n gap: 8px;\n max-width: 320px;\n background: var(--sapling-blue-tint);\n color: var(--sapling-text);\n /* Was a 2px border plus a heavy two-layer panel shadow \u2014 a lot of\n visual weight for a dismissible hint pill. --sapling-shadow-chip\n is the token already defined for exactly this ("a lighter shadow\n for small in-page chips/badges... the full panel shadow reads as\n too heavy", design-tokens.js). */\n border: 1px solid var(--sapling-blue);\n border-radius: var(--sapling-radius-pill);\n padding: 7px 12px;\n font: 13px var(--sapling-font);\n line-height: 1.35;\n cursor: pointer;\n z-index: 9998;\n box-shadow: var(--sapling-shadow-chip);\n }\n\n .sapling-ai-detect-ctx-hint .hint-new {\n background: var(--sapling-blue);\n color: #fff;\n border-radius: var(--sapling-radius-pill);\n padding: 1px 8px;\n font-size: 11px;\n font-weight: bold;\n flex-shrink: 0;\n }\n\n .sapling-ai-detect-ctx-hint .hint-dismiss {\n color: var(--sapling-blue);\n font-weight: bold;\n padding: 0 2px;\n flex-shrink: 0;\n }\n\n .sapling-ai-detect-ctx-hint .hint-dismiss:hover {\n color: var(--sapling-text);\n }\n\n .sapling-ai-share {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: 4px 10px;\n margin: 0 15px 6px;\n font-size: 13px;\n }\n\n .sapling-ai-share-action {\n cursor: pointer;\n color: ').concat(ir,";\n }\n\n .sapling-ai-share-revoke {\n color: ").concat(br,";\n }\n\n .sapling-ai-share-link {\n color: ").concat(ir,";\n overflow-wrap: anywhere;\n }\n\n .sapling-ai-share-status {\n flex-basis: 100%;\n text-align: center;\n font-size: 11px;\n color: var(--sapling-text-subtle);\n }\n\n .sapling-ai-share-status:empty {\n display: none;\n }\n\n .sapling-ai-detect-select-overall .overall-history-note {\n font-size: 11px;\n color: var(--sapling-text-subtle);\n margin: 0 15px 8px;\n text-align: center;\n }\n</style>\n"),Ou=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.shadowHost=e,this.contentShadowHost=n,this.aiDetectSelectButton=null,this.aiDetectSelectContent=null,this._lastResult=null,this._requestGeneration=0,this._outcome=null,this.ctxHint=null,this._hintState=null,this._hintStatePromise=null,this._detectShortcutPromise=null,this._hintCountedThisLoad=!1,this.assetUrls={"thumbs-up-regular":hm("assets/thumbs-up-regular.svg"),"thumbs-down-regular":hm("assets/thumbs-down-regular.svg"),"sapling-logo-horizontal":hm("assets/sapling-logo-horizontal.png"),"fa-hand-sparkles-solid":hm("assets/fa-hand-sparkles-solid.svg")}},e=[{key:"isConnected",value:function(){return this.shadowHost.isConnected&&this.contentShadowHost.isConnected}},{key:"currentRunGeneration",value:function(){return this._requestGeneration}},{key:"positionButton",value:function(){var t=window.getSelection();if(t&&t.rangeCount&&t.toString().trim()){var e=t.getRangeAt(0).getBoundingClientRect(),n=an()?15:0;iu(this.aiDetectSelectButton).css({left:Math.min(e.right+10+n,window.innerWidth-50)+window.scrollX,top:Math.max(e.top-10+n,50)+window.scrollY,background:ur,padding:"12px 10px 7px 10px",position:"absolute",cursor:"pointer",borderRadius:"35px",border:"1px solid ".concat(ir),zIndex:9998})}}},{key:"_displayResults",value:function(t,e){var n=this;if(t){var r=t.score,i=t.sentence_scores,o=t.score_string,a=void 0===o?"":o,s=t.hash,u=t.sectionMeta||null;r=100*("number"!=typeof r||isNaN(r)?0:r),this._lastResult={score:r,sentence_scores:i,hash:s};var c,d=function(t){return t>90?"Highly likely composed by AI.":t>70?"Significant chance of AI authorship.":t>50?"Toss-up: might be AI-generated.":t>25?"Low likelihood of AI creation.":t>10?"Minimal signs of AI origin.":"Unlikely AI-authored; appears human-written."}(Math.round(r)),f=u?null:ia(t),p=u?"":sa(t),h=f?aa(f):d,g=u?u.scoredWords:Su(m()(e||"",y)),v=Su(e||""),b=Array.isArray(i)?i.length:0;if(u){var D=u.scoredSections;c=g<v?"".concat(g.toLocaleString()," of ").concat(v.toLocaleString()," words")+" analyzed in ".concat(D," section").concat(1===D?"":"s"):"All ".concat(v.toLocaleString()," words analyzed")+" in ".concat(D," sections"),u.unscoredSections&&(c+=" \xb7 ".concat(u.unscoredSections)+" section".concat(1===u.unscoredSections?"":"s"," could not be scored"))}else c=v>g?"First ".concat(g," of ").concat(v," words \xb7 ").concat(b," sentences analyzed"):"".concat(g," words \xb7 ").concat(b," sentences analyzed");var w=l.AI_DETECT_ANYWHERE_EXTENSION?'\n <div>\n <a class="sapling-ai-detect-print-report" role="button" tabindex="0" style="color: '.concat(ir,'; cursor: pointer;" title="Open a printable report of this analysis (print or save as PDF).">\n Printable report</a>\n </div>\n '):"",x=(u?{historyId:""}:ya(t)).historyId,A=s?'\n <div>\n <a href="https://sapling.ai/ai-content-detector/'.concat(s,'" target="_blank" style="color: ').concat(ir,';" title="Use to share a detailed link to this AI Detection analysis. Link will expire in 3 days.">\n Sapling AI Detection certificate</a>\n </div>\n '):"";x&&(A='<div class="sapling-ai-detect-share-slot"></div>');var E=f&&!p?'<div class="overall-verdict overall-verdict-'.concat(f,'"\n title="').concat(aa(f),'">').concat(oa(f),"</div>"):"",S=p?'\n <b class="overall-score overall-inconclusive">Inconclusive</b>\n <div class="overall-message">'.concat(p,'</div>\n <div class="overall-meta">Raw score ').concat(Math.round(r),"% \xb7 ").concat(c,"</div>\n "):'\n <b class="overall-score" style="color: '.concat(Q(r),'">\n ').concat(Math.round(r),"%\n </b>\n ").concat(E,'\n <div class="overall-message">').concat(h,'</div>\n <div class="overall-meta">').concat(c,"</div>\n ");if(iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html("\n ".concat(S,"\n ").concat(A,"\n ").concat(w,"\n ")),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall .sapling-ai-detect-print-report").on("click",function(){return n._openPrintableReport()}).on("keydown",function(t){"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),n._openPrintableReport())}),x){var _=ja(document,{historyId:x,websiteHostname:l.WEBSITE_HOSTNAME,classPrefix:"sapling-ai-share",onEvent:function(t,e){return Pt(t,su(su({},e),{},{surface:"select"}))}});_&&iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall .sapling-ai-detect-share-slot").append(_)}var C,k=ya(t).skipReason,O=u?"":"string"==typeof(C=k)&&Object.prototype.hasOwnProperty.call(ba,C)?ba[C]:"";if(O){var T=document.createElement("div");T.className="overall-history-note",T.textContent=O,iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall .overall-meta").after(T)}if(!u&&function(t){return!!t&&!sa(t)&&"ai"!==ia(t)}(t)){var I=ru(document,t,{classPrefix:"sapling-ai-passages",getTextRoot:function(){return n.scoreStrings},getScrollContainer:function(){return iu(n.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string")[0]},onEvent:function(t,e){return Pt(t,su(su({},e),{},{surface:"select"}))}});if(I){var j=iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall"),F=j.find(".overall-history-note")[0]||j.find(".overall-meta")[0];iu(F).after(I)}}var N=document.createElement("div");if(N.innerHTML=a,N.querySelectorAll("span").forEach(function(t){t.setAttribute("sapling-ignore","true")}),p&&ua(N),!N.innerHTML&&!u){var P=document.createElement("span");P.style.whiteSpace="pre-wrap",P.textContent=m()(e||"",y),N.appendChild(P)}a=N.innerHTML,Object.assign(this._lastResult,{scoreString:a,analyzedWords:g,totalWords:v,truncated:u?u.truncated:v>g,coverageNote:u?c:null,unscoredSections:u?u.unscoredSections:0,lowConfidenceNote:p,verdict:p?null:f,fetchedAt:"number"==typeof t.fetchedAt?t.fetchedAt:null,scoredAt:"number"==typeof t.fetchedAt?t.fetchedAt:Date.now()}),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").addClass("has-backend-response").attr("sapling-ignore","true").html("".concat(a));var R=u&&"number"==typeof t.remainderChars?t.remainderChars:0;if(R>0){var M=document.createElement("span");M.style.whiteSpace="pre-wrap",M.textContent=(e||"").slice(-R),this.scoreStrings.appendChild(M)}this.lastQueryText=this.scoreStrings.innerText.replace(/\n+/g,"\n\n"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-edit-recheck").prop("disabled",!0);var B=document.createRange();B.selectNodeContents(this.scoreStrings),B.collapse(!1);var L=window.getSelection();L.removeAllRanges(),L.addRange(B);var H=iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences");H.html(""),(i||[]).forEach(function(t){if(t){var e=t.score,n=t.sentence,r="number"==typeof e&&e>=0;e=r?100*e:e;var i=r?"".concat(Math.round(e),"%"):"n/a",o=document.createElement("div");o.className="sentence-row";var a=document.createElement("div");a.className="sentence-text",a.textContent=n||"";var s=document.createElement("div");s.className="sentence-score",r&&!p&&(s.style.color=Q(e)),s.textContent=i,o.appendChild(a),o.appendChild(s),H.append(o)}}),this._notifyOutcome({status:"result",score:Math.round(r),verdict:p?null:f,lowConfidence:!!p})}}},{key:"_notifyOutcome",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._requestGeneration,n=this._outcome;if(n&&n.generation===e){this._outcome=null;try{n.notify(t)}catch(t){}}}},{key:"_reviewAskCallback",value:function(t){var e=this;return function(n){return t===e._requestGeneration&&e._showReviewAsk(n)}}},{key:"_showReviewAsk",value:function(t){var e=iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-overall")[0];if(!e)return!1;var n=document.createElement("div");n.className="sapling-ai-detect-review-ask";var r=document.createElement("span");r.textContent="Finding this useful? A rating on the ".concat(function(t){return String(t||"").startsWith("https://microsoftedge.microsoft.com/")?"Microsoft Edge Add-ons":"Chrome Web Store"}(t))+" helps others find it.";var i=document.createElement("a");i.href=t,i.target="_blank",i.rel="noopener noreferrer",i.textContent="Rate it",i.addEventListener("click",function(){pa({action:"event/AI_DETECT_REVIEW_ASK_RATED"}),Pt("ai_detect_review_ask_clicked",{surface:"select"}),n.remove()});var o=document.createElement("button");return o.type="button",o.textContent="Not now",o.addEventListener("click",function(){Pt("ai_detect_review_ask_dismissed",{surface:"select"}),n.remove()}),n.append(r,i,o),e.appendChild(n),Pt("ai_detect_review_ask_shown",{surface:"select"}),!0}},{key:"_recordDetection",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;if(!r||t.hash){var o=e||"",a=m()(o,y),s=t.sectionMeta?"":sa(t);Ta({score:100*Number(t.score),words:t.sectionMeta?t.sectionMeta.scoredWords:Su(a),snippet:e,source:n,hash:t.hash,host:window.location.hostname,fromCache:r,certTs:"number"==typeof t.fetchedAt?t.fetchedAt:void 0,scoreString:s?ca(t.score_string):t.score_string,totalWords:Su(o),truncated:t.sectionMeta?t.sectionMeta.truncated&&!t.sectionMeta.unscoredSections:a.length<o.length,pagesNote:t.sectionMeta&&this._lastResult?this._lastResult.coverageNote:s||void 0,lowConfidence:!!s,verdict:s||t.sectionMeta?null:ia(t),onReviewAskDue:i,historyId:t.sectionMeta?"":ya(t).historyId})}}},{key:"_copyReport",value:function(){if(this._lastResult){var t=this._lastResult,e=t.score,n=t.sentence_scores,r=t.hash,i=t.coverageNote,o=t.lowConfidenceNote,a=o?["Sapling AI Detection Report","Result: Inconclusive (raw AI probability ".concat(Math.round(e),"%)"),"Note: ".concat(o)]:["Sapling AI Detection Report","Overall AI probability: ".concat(Math.round(e),"%")];i&&a.push("Coverage: ".concat(i)),a.push(""),Array.isArray(n)&&n.length>0&&(a.push("Per-sentence analysis:"),n.forEach(function(t){if(t){var e=t.sentence,n=t.score,r="number"==typeof n&&n>=0?"".concat(Math.round(100*n),"%"):"n/a";a.push(" ".concat(r," ").concat(e||""))}}),a.push("")),r&&a.push("Full report: https://sapling.ai/ai-content-detector/".concat(r)),navigator.clipboard&&navigator.clipboard.writeText&&navigator.clipboard.writeText(a.join("\n")).catch(function(){}),Pt("ai_detect_select_copy_report")}}},{key:"_openPrintableReport",value:function(){if(this._lastResult){var t=this._lastResult,e={score:t.score,scoreString:t.scoreString,sentences:t.sentence_scores,source:window.location.hostname,analyzedWords:t.analyzedWords,totalWords:t.totalWords,truncated:"boolean"==typeof t.truncated?t.truncated:t.totalWords>t.analyzedWords,coverageNote:t.coverageNote||void 0,unscoredSections:t.unscoredSections||0,pagesNote:t.lowConfidenceNote||void 0,verdict:t.verdict,lowConfidence:!!t.lowConfidenceNote,hash:t.hash,certTs:"number"==typeof t.fetchedAt?t.fetchedAt:void 0,scoredAt:"number"==typeof t.scoredAt?t.scoredAt:void 0};try{chrome.runtime.sendMessage({action:"event/AI_DETECT_OPEN_REPORT",report:e},function(){chrome.runtime.lastError})}catch(t){}Pt("ai_detect_report_opened",{surface:"select"})}}},{key:"_showPolicyBlocked",value:function(t){iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden").text(Eu),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-short").text(t).removeClass("hidden"),this._notifyOutcome({status:"disabled"})}},{key:"_getAIDetectionScores",value:function(t,e){var n=this;this._lastResult=null,this._requestGeneration+=1;var r=this._requestGeneration;if(this._outcome&&this._outcome.generation!==r&&this._notifyOutcome({status:"superseded"},this._outcome.generation),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-error").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-short").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").text(Eu),!1===(null==e?void 0:e.siteEnabled))return iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-short").text("Sapling could not confirm that AI detection is enabled for this site. Check the site setting in the Sapling toolbar and try again.").removeClass("hidden"),void this._notifyOutcome({status:"disabled"});var i=fn(Vs(null==e?void 0:e.source)||"docs"===(null==e?void 0:e.aiDetectSurface)?"docs":"extension");if(i)this._showPolicyBlocked(Vt(i));else{if(!(e&&"boolean"==typeof e.siteEnabled?dn():un()))return iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-premium").removeClass("hidden"),void this._notifyOutcome({status:"premium"});if(t=t.trim(),Su(t)<50){var o;if(t||"context menu"!==(null==e?void 0:e.source)&&"shortcut"!==(null==e?void 0:e.source))if(Vs(null==e?void 0:e.source)){var a=e.source===Ys?"presentation":"document";o="This ".concat(a," has fewer than ").concat(50," words of text \u2014 ")+"the minimum for a reliable AI detection score."}else o="page"===(null==e?void 0:e.source)||"page shortcut"===(null==e?void 0:e.source)?"Sapling couldn't find ".concat(50," words of readable text on this page \u2014 ")+"the minimum for a reliable AI detection score. Try selecting the text and right-clicking it instead.":"At least ".concat(50," words of text are needed for a reliable ")+"AI detection score. Select more text and try again.";else o=["Sapling couldn't read this editor's selection. Copy the text, ","open Sapling from the toolbar, and paste it into the detector."].join("");return iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-short").text(o).removeClass("hidden"),void this._notifyOutcome({status:"short"})}iu(this.loadingIndicator).addClass("sapling-loading"),this.lastQueryText=t;var s=function(t){if(!bu.has(t))return null;var e=bu.get(t);return bu.delete(t),bu.set(t,e),e}(t);if(s)return iu(this.loadingIndicator).removeClass("sapling-loading"),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),this._displayResults(s,t),this._recordDetection(s,t,null==e?void 0:e.source,!0),void Pt("ai_detect_select_cached_".concat(_u(null==e?void 0:e.source)));if("chat.openai.com"===window.location.hostname||"chatgpt.com"===window.location.hostname){var u=function(){for(var t=0,e=Cu;t<e.length;t++){var n=e[t];try{var r=document.querySelector(n),i=r&&r.innerText?r.innerText.trim():"";if(i)return i}catch(t){}}return null}();u&&(e.openai_model=u)}var c=function(t){for(var e=[],n=t;n&&e.length<8;){var r=m()(n,y);if(r.length<n.length){var i=r.search(/\s+\S*$/);i>0&&(r=r.slice(0,i))}var o=n.slice(r.length),a=o.match(/^\s+/),s=a?a[0]:"";e.push({text:r,separator:s}),n=o.slice(s.length)}if(!n&&e.length>1){var u=e[e.length-1];u.text.split(/\s+/).filter(Boolean).length<50&&(e.pop(),n=u.text)}return{sections:e,remainder:n}}(t),l=c.sections,d=c.remainder;l.length>1?this._runSectionedDetection({selectedText:t,sections:l,remainder:d,context:e,requestGeneration:r}):jt(t,"en",window.location.href,e,function(i){if(i&&i.aidetect&&Du(t,su(su({},i.aidetect),{},{fetchedAt:Date.now()})),r===n._requestGeneration){if(iu(n.loadingIndicator).removeClass("sapling-loading"),iu(n.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").addClass("hidden"),!i||!i.aidetect)return iu(n.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden"),void n._notifyOutcome({status:"error"});n._displayResults(i.aidetect,t);var o=n._reviewAskCallback(r);n._recordDetection(i.aidetect,t,null==e?void 0:e.source,!1,o),Pt("ai_detect_select_processed_".concat(_u(null==e?void 0:e.source)));var a=ia(i.aidetect),s=!!sa(i.aidetect);(a||s)&&Pt("ai_detect_result_signals",{surface:"select",verdict:a||"",low_confidence:s})}},function(t){r===n._requestGeneration&&(iu(n.loadingIndicator).removeClass("sapling-loading"),Kt(t&&t.err)?n._showPolicyBlocked(Vt(null)):(iu(n.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden"),n._notifyOutcome({status:"error"})))},{saveHistory:!0})}}},{key:"_runSectionedDetection",value:function(t){var e=this,n=t.selectedText,r=t.sections,i=t.remainder,o=t.context,a=t.requestGeneration,s=function(){return a===e._requestGeneration},u=iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting"),c=[],l=function(){iu(e.loadingIndicator).removeClass("sapling-loading"),u.addClass("hidden").text(Eu),iu(e.aiDetectSelectContent).find(".sapling-ai-detect-select-error").removeClass("hidden"),e._notifyOutcome({status:"error"},a)},d=null,f=function(t){if(s())if(t>=r.length)!function(){var t=c.filter(function(t){return null!==t.scoreString}),r=c.length-t.length;if(Pt("ai_detect_sections_completed",{sections:c.length,unscored:r,truncated:!!i,surface:"select"}),t.length){var s=t.reduce(function(t,e){return t+e.words},0),d=t.reduce(function(t,e){return t+e.score*e.words},0)/s,f=document.createElement("div"),p=function(t){var e=document.createElement("span");e.style.whiteSpace="pre-wrap",e.textContent=t,f.appendChild(e)};c.forEach(function(t){if(null!==t.scoreString){var e=document.createElement("span");e.innerHTML=t.scoreString,f.appendChild(e)}else p(t.text);t.separator&&p(t.separator)});var h=c.flatMap(function(t){return t.sentences||[]}),g={score:d/100,score_string:f.innerHTML,remainderChars:i?i.length:0,sentence_scores:h,hash:"",sectionMeta:{scoredWords:s,scoredSections:t.length,totalSections:c.length,unscoredSections:r,truncated:!!i}};Du(n,su(su({},g),{},{fetchedAt:Date.now()})),iu(e.loadingIndicator).removeClass("sapling-loading"),u.addClass("hidden").text(Eu),e._displayResults(g,n);var v=e._reviewAskCallback(a);e._recordDetection(g,n,null==o?void 0:o.source,!1,v),Pt("ai_detect_select_processed_".concat(_u(null==o?void 0:o.source)))}else l()}();else{u.text("Analyzing section ".concat(t+1," of ").concat(r.length,"\u2026")).removeClass("hidden"),clearTimeout(d),d=setTimeout(function(){s()&&(e._requestGeneration+=1,l())},3e4);var p=r[t];jt(p.text,"en",window.location.href,o,function(e){if(s())if(clearTimeout(d),e&&e.aidetect){var n=e.aidetect.score;n=100*("number"!=typeof n||Number.isNaN(n)?-1:n),c.push(su(su({},p),{},n>=0?{score:n,scoreString:e.aidetect.score_string||"",sentences:e.aidetect.sentence_scores,words:Su(p.text)}:{score:null,scoreString:null,sentences:[],words:Su(p.text)})),f(t+1)}else l()},function(t){if(s()){if(clearTimeout(d),Kt(t&&t.err))return iu(e.loadingIndicator).removeClass("sapling-loading"),void e._showPolicyBlocked(Vt(null));l()}})}};Pt("ai_detect_sections_started",{sections:r.length,surface:"select"}),f(0)}},{key:"createUIElements",value:function(){var t=this;this.aiDetectSelectButton||(iu(this.shadowHost.shadowRoot).find(".sapling-ai-detect-select-button").remove(),this.aiDetectSelectButton=iu('\n <div class="sapling-ai-detect-select-button">\n <img src="'.concat(this.assetUrls["fa-hand-sparkles-solid"],'" style="height: 20px" />\n </div>\n ')),this.aiDetectSelectButton.hide(),iu(this.shadowHost.shadowRoot).append(ku),iu(this.shadowHost.shadowRoot).append(this.aiDetectSelectButton),iu(this.contentShadowHost.shadowRoot).append(ku),this.aiDetectSelectContent=iu('\n <div class="sapling-ai-detect-select-content">\n <div class="sapling-ai-detect-select-content-header">\n <div class="left">\n <img src="'.concat(this.assetUrls["sapling-logo-horizontal"],'" style="height: 20px" />\n <span style="margin-right: 10px;">AI Detector</span>\n <span class="sapling-ai-detect-select-analysis-mode" id="sapling-ai-detect-select-overall-analysis">\n Overall Analysis\n </span>\n <span class="sapling-ai-detect-select-analysis-mode inactive" id="sapling-ai-detect-select-sentence-analysis">\n Sentence-level Analysis\n </span>\n <span id="subscription-banner"></span>\n </div>\n <div class="right"></div>\n </div>\n <div class="sapling-ai-detect-select-content-body">\n <div class="sapling-ai-detect-select-overall">\n </div>\n <div class="sapling-ai-detect-select-score-string">\n <button class="sapling-ai-detect-select-edit-recheck" disabled>\n Re-check edited text\n </button>\n </div>\n <div class="sapling-ai-detect-select-sentences hidden">\n </div>\n <div class="sapling-ai-detect-select-error hidden">\n An unknown error has occurred.<br/>Please try again in some time, or contact support@sapling.ai\n </div>\n <div class="sapling-ai-detect-select-short hidden">\n At least ').concat(50,' words of text are needed for a reliable\n AI detection score. Select more text and try again.\n </div>\n <div class="sapling-ai-detect-select-premium hidden">\n Please <a href="https://sapling.ai/pricing" target="_blank">subscribe</a> to access the AI Detection feature.\n </div>\n <div class="sapling-ai-detect-select-waiting">\n Processing your text, please wait...\n </div>\n </div>\n </div>\n ')),this.aiDetectSelectContent.hide(),iu(this.contentShadowHost.shadowRoot).append(this.aiDetectSelectContent),this.aiDetectSelectContent[0].addEventListener("mousedown",function(t){t.stopPropagation()}),this.aiDetectSelectContent[0].addEventListener("contextmenu",function(t){t.stopPropagation()}),this.loadingIndicator=document.createElement("div"),iu(this.loadingIndicator).html(pi("spinner")),iu(this.loadingIndicator).addClass("sapling-ai-detect-select-spinner"),iu(this.loadingIndicator).addClass("sapling-ai-detect-select-header-button"),iu(this.aiDetectSelectContent).find(".right").append(this.loadingIndicator),this.copyButton=document.createElement("div"),iu(this.copyButton).html("\n ".concat(pi("copy"),'\n <span class="copy-tooltip">Copy report</span>\n ')),iu(this.copyButton).addClass("sapling-ai-detect-copy-button"),iu(this.copyButton).addClass("sapling-ai-detect-select-header-button"),wu(this.copyButton,"Copy report",function(){return t._copyReport()}),iu(this.aiDetectSelectContent).find(".right").append(this.copyButton),this.cancelButton=document.createElement("div"),iu(this.cancelButton).html(pi("close")),iu(this.cancelButton).addClass("sapling-ai-detect-select-cancel"),iu(this.cancelButton).addClass("sapling-ai-detect-select-header-button"),wu(this.cancelButton,"Close",function(){return t.hide()}),iu(this.aiDetectSelectContent).find(".right").append(this.cancelButton),iu(document).keyup(function(e){"Escape"===e.key&&t.hide()}),this.scoreStrings=document.createElement("div"),iu(this.scoreStrings).addClass("score-strings"),iu(this.scoreStrings).attr("sapling-ignore","true"),iu(this.scoreStrings).attr("contenteditable","true"),this.scoreStringsObserver=new MutationObserver(function(e,n){iu(t.scoreStrings).is(".has-backend-response")?iu(t.scoreStrings).removeClass("has-backend-response"):iu(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n")!=t.lastQueryText&&(iu(t.scoreStrings).find("span").css("background-color",""),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-edit-recheck").prop("disabled",!1),t._lastResult=null)}),this.scoreStringsObserver.observe(this.scoreStrings,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").append(this.scoreStrings),this.aiDetectSelectButton[0].addEventListener("mousedown",function(e){e.preventDefault(),iu(t.aiDetectSelectContent).fadeIn(50),t._getAIDetectionScores(t._getSelectedText(),{source:"selected text"}),Pt("ai_detect_select_overlay_visible_selected_text")}),iu(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-edit-recheck",function(e){t._getAIDetectionScores(iu(t.aiDetectSelectContent).find(".score-strings")[0].innerText.replace(/\n+/g,"\n\n"),{source:"edited text"})}),iu(this.aiDetectSelectContent).on("click",".sapling-ai-detect-select-analysis-mode",function(e){iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-analysis-mode").addClass("inactive"),iu(e.target).removeClass("inactive"),iu(e.target).is("#sapling-ai-detect-select-overall-analysis")?(iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").removeClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").removeClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").addClass("hidden")):(iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").addClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string").addClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").removeClass("hidden"))}),qa(iu(this.aiDetectSelectContent).find("#subscription-banner")))}},{key:"_getSelectedText",value:function(){return document.getSelection().toString().replace(/\n+/g,"\n\n")}},{key:"showContent",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;"context menu"!==e&&"page"!==e&&"shortcut"!==e&&"page shortcut"!==e||this._markContextMenuUsed(),qa(iu(this.aiDetectSelectContent).find("#subscription-banner")),iu(this.aiDetectSelectContent).fadeIn(50),iu(this.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),this._outcome&&this._notifyOutcome({status:"superseded"},this._outcome.generation),this._outcome="function"==typeof r?{generation:this._requestGeneration+1,notify:r}:null,this._getAIDetectionScores(t.replace(/\n+/g,"\n\n").trim(),su({source:e},n)),Pt("ai_detect_select_overlay_visible_".concat(_u(e)))}},{key:"show",value:function(){var t=this,e=this._getSelectedText().trim();Su(e)<5||setTimeout(function(){t.positionButton(),t.aiDetectSelectButton.fadeIn(50)},200)}},{key:"_loadContextMenuHintState",value:function(){var t=this;return this._hintStatePromise||(this._hintStatePromise=new Promise(function(e){vm([xu,Au],function(n){var r=n&&"number"==typeof n[xu]?n[xu]:0;t._hintState={count:r,used:!(!n||!n[Au])},e()})})),this._hintStatePromise}},{key:"_markContextMenuUsed",value:function(){this._hintState?this._hintState.used=!0:(this._hintState={count:3,used:!0},this._hintStatePromise=Promise.resolve()),mm(uu({},Au,!0)),this.hideContextMenuHint()}},{key:"_dismissContextMenuHint",value:function(){this._hintState&&(this._hintState.used=!0),mm(uu({},xu,3)),this.hideContextMenuHint()}},{key:"hideContextMenuHint",value:function(){this.ctxHint&&this.ctxHint.hide()}},{key:"maybeShowContextMenuHint",value:function(){var t=this;Su(this._getSelectedText().trim())<5||this._loadContextMenuHintState().then(function(){t._hintState.used||t._hintState.count>=3||Su(t._getSelectedText().trim())<5||t._showContextMenuHint()})}},{key:"_fetchDetectShortcut",value:function(){return this._detectShortcutPromise||(this._detectShortcutPromise=new Promise(function(t){try{chrome.runtime.sendMessage({action:"event/AI_DETECT_GET_COMMAND_SHORTCUT"},function(e){chrome.runtime.lastError,t(e&&e.shortcut||"")})}catch(e){t("")}})),this._detectShortcutPromise}},{key:"_showContextMenuHint",value:function(){var t=this;this.ctxHint||(this.ctxHint=iu('\n <div class="sapling-ai-detect-ctx-hint">\n <span class="hint-new">New</span>\n <span class="hint-text">Right-click a selection and choose\n &ldquo;Detect AI writing with Sapling&rdquo;<span\n class="hint-shortcut"></span> &mdash; or click here</span>\n <span class="hint-dismiss">&#x2715;</span>\n </div>\n '),this._fetchDetectShortcut().then(function(e){e&&t.ctxHint&&iu(t.ctxHint).find(".hint-shortcut").text(" (or press ".concat(e,")"))}),this.ctxHint.hide(),iu(this.shadowHost.shadowRoot).append(this.ctxHint),this.ctxHint[0].addEventListener("mousedown",function(e){if(e.preventDefault(),e.stopPropagation(),e.target.classList.contains("hint-dismiss"))return t._dismissContextMenuHint(),void Pt("ai_detect_ctx_hint_dismissed");t.hideContextMenuHint(),iu(t.aiDetectSelectContent).fadeIn(50),t._getAIDetectionScores(t._getSelectedText(),{source:"context menu hint"}),Pt("ai_detect_select_overlay_visible_context_menu_hint")})),setTimeout(function(){var e=window.getSelection();if(e&&e.rangeCount&&e.toString().trim()){var n=e.getRangeAt(0).getBoundingClientRect();iu(t.ctxHint).css({left:Math.min(n.right+10,window.innerWidth-350)+window.scrollX,top:Math.max(n.top-10,50)+window.scrollY}),t.ctxHint.fadeIn(50),t._hintCountedThisLoad||(t._hintCountedThisLoad=!0,t._hintState.count+=1,mm(uu({},xu,t._hintState.count)),Pt("ai_detect_ctx_hint_shown"))}},200)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hideContextMenuHint(),e||(this._requestGeneration+=1,iu(this.loadingIndicator).removeClass("sapling-loading"),this._outcome&&this._notifyOutcome({status:"superseded"},this._outcome.generation)),this.aiDetectSelectButton&&setTimeout(function(){t.aiDetectSelectButton.hide(),e||(t.aiDetectSelectContent.fadeOut(250),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-waiting").removeClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-short").addClass("hidden"),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-overall").html(""),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-sentences").html(""),iu(t.aiDetectSelectContent).find(".sapling-ai-detect-select-score-string .score-strings").html(""))},200)}}],e&&cu(t.prototype,e),n&&cu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function Tu(){if(un()){var t=ju().aiDetectSelectButton;if(t){var e,n=(e=window.location.hostname)&&Gs.find(function(t){return t.hostnames&&t.hostnames.includes(e)||(t.hostnameSuffixes||[]).some(function(t){return e.endsWith(t)})})||null;n&&function(t,e){var n=t.textNodesSelector,r=t.customCss,i=void 0===r?"":r,o=t.textExtractor,a=t.minWords,s=void 0===a?5:a,u=t.staticText,c=void 0!==u&&u,l=document.createElement("style");l.textContent="\n .sapling-run-ai-detection-button {\n position: absolute;\n border: 1px solid ".concat(ir,";\n border-radius: 6px;\n font-family: ").concat(Br,";\n font-size: 12px;\n line-height: 1.4;\n padding: 2px 10px;\n text-align: center;\n color: ").concat(ir,";\n right: 0;\n bottom: -26px;\n background: white;\n cursor: pointer;\n transition: all 0.25s;\n white-space: nowrap;\n z-index: 1;\n }\n\n .sapling-run-ai-detection-button:hover, .dark .sapling-run-ai-detection-button {\n color: white;\n background: ").concat(ir,";\n }\n\n ").concat(i,"\n "),(document.body||document.documentElement).append(l);var d=new Set,f=new WeakMap,p=function(t,e){try{return e&&e.remove(),o(t)||""}catch(t){return""}finally{e&&t.append(e)}},h=setInterval(function(){if(!yu()||!e.isConnected())return clearInterval(h),d.forEach(function(t){return t.remove()}),d.clear(),void l.remove();var t;d.forEach(function(t){if(!t.isConnected){var e=f.get(t);t.remove(),d.delete(t),e&&Iu.delete(e)}});try{t=document.querySelectorAll(n)}catch(t){return}t.forEach(function(t){if(!Iu.get(t)){var n=p(t,null),r=Su(n);if(r<s)c&&r>0&&Iu.set(t,!0);else{Iu.set(t,!0);var i=t;"static"===window.getComputedStyle(i).position&&(i.style.position="relative");var o=document.createElement("div");iu(o).html("Detect AI"),iu(o).addClass("sapling-run-ai-detection-button"),iu(o).on("click",function(){if(!yu()||!e.isConnected())return d.delete(o),void o.remove();e.showContent(p(t,o),"".concat(window.location.hostname," generated"))}),d.add(o),f.set(o,i),iu(i).append(o)}}})},1e3)}(n,t)}}}var Iu=new WeakMap;function ju(){if(!yu())return{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null};for(var t=Array.from(document.querySelectorAll(pu)),e=0;e<t.length;e+=1){var n=t[e],r=du.get(n),i=r&&r.shadowHost;if(r&&r.isConnected()&&n.shadowRoot&&i.shadowRoot)return{aiDetectHost:n,buttonHost:i,aiDetectSelectButton:r}}document.querySelectorAll("".concat(pu,", ").concat(hu)).forEach(function(t){return t.remove()});var o=document.documentElement;if(!o)return{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null};var a=document.createElement(pu),s=document.createElement(hu);try{a.attachShadow({mode:"open"}),s.attachShadow({mode:"open"}),o.append(a,s);var u=new Ou(s,a);return du.set(a,u),u.createUIElements(),{aiDetectHost:a,buttonHost:s,aiDetectSelectButton:u}}catch(t){return du.delete(a),a.remove(),s.remove(),{aiDetectHost:null,buttonHost:null,aiDetectSelectButton:null}}}var Fu=n(216);function Nu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Pu(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pu(t,e){if(t){if("string"==typeof t)return Ru(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ru(t,e):void 0}}function Ru(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Mu(t,e,n){var r=e.editId,i=e.replacementText,o=wd(t);if(o){var a=o.edits,s=o.textAreaId,u=o.containerDomElement;if(a){var c=a[r];if(c){var l=c.editRange;Rt(e.editHash,"accept",t,n),s?function(t,e,n){if(t in Pd){zd(Pd[t].textArea,e.startOffset,e.endOffset,n)}}(s,l,i):Xd(l,i,u),rd(t,r)}}Ju(),pd()}}function Bu(t,e){var n=wd(t);if(n){var r=n.edits;if(r){var i=r[e];if(i){var o=i.edit.originalText;St("request/POST_DICTIONARY",{entry:o}),Fs(t,e),rd(t,e)}}Ju(),pd()}}function Lu(){if(Fu("sapling-rephrase-controls").length)return[Fu("sapling-rephrase-controls")[0],Fu("sapling-rephrase-button")[0]];var t=Fu("<sapling-rephrase-controls></sapling-rephrase-controls>");t.css({zIndex:"2147483647",font:"11pt ".concat(Br),position:"absolute"});var e=t[0],n=Fu("<sapling-rephrase-button></sapling-rephrase-button>")[0];return e.attachShadow({mode:"open"}),n.attachShadow({mode:"open"}),Fu("html").append(e),Fu("html").append(n),[e,n]}function Hu(){var t=Fu("sapling-rephrase-controls")[0],e=Fu("sapling-rephrase-button")[0];if(t&&e&&t.shadowRoot&&e.shadowRoot){var n=Nu(gf(t,e),2),r=n[0],i=n[1];r.hideControls(),uf()||i.hide()}}function qu(){if(an()){var t=Nu(Lu(),2),e=gf(t[0],t[1])[1];if(e)if(Ws())uf()?(Kr(),e.show()):e.hide();else e.hide()}}var Uu=n(216),zu=null,Wu=null,Gu=null,$u=!1;function Yu(t){st(l.CONTROL_ELEMENT).forEach(function(t){return Uu(t).remove()});var e=t&&t.ownerDocument;e&&e!==document&&st(l.CONTROL_ELEMENT,e).forEach(function(t){return Uu(t).remove()})}function Vu(t){if("DIALOG"!==t.tagName||!t.open)return!1;if("function"==typeof t.matches)try{return t.matches(":modal")}catch(t){return!0}return!0}function Ku(t){return function(t,e){for(var n=ct(t);n;){if(e(n))return n;n=ct(n)}return null}(t,Vu)||document.documentElement}function Xu(t){var e=Ku(t);Gu.parentNode!==e&&e.appendChild(Gu),$u="DIALOG"===e.tagName,Uu(Gu).css({position:$u?"fixed":"absolute"})}function Ju(){Uu("#active-edit",Wu).removeAttr("id"),Uu("#active-edit",Wu).removeAttr("sapling-edit-id"),Uu("#active-edit",Wu).removeAttr("sapling-container-id"),Uu(Gu).remove(),Yu(),Gu=null,Wu=null,$u=!1,pd()}function Qu(t){if(Gu&&Gu.isConnected)Xu(t);else{Yu(t),Gu=document.createElement(l.CONTROL_ELEMENT),Uu(Gu).css({zIndex:"2147483647",font:"12pt ".concat(Br),textAlign:"center"}),Xu(t),Gu.attachShadow({mode:"open"}),Wu=Gu.shadowRoot,Uu(Gu).hide();var e="Ignore",n="Accept",r='<style type="text/css">\n\n#sapling-edit-controls {\n border-radius: 6px;\n}\n\n.edit-controls-row {\n overflow: hidden;\n}\n\n#accept-text, #ignore-text, #snooze-text, #dictionary-text{\n line-height: 2em;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n width: 36px;\n}\n\n#accept-button, #ignore-button, #explanations, #snooze-button, #dictionary-button\n{\n background-color: '.concat(pr,";\n align-items: center;\n justify-content: left;\n width: 100%;\n /* Matches the panel's own compact radius; editCSS()'s base button rules set none. */\n border-radius: 6px;\n}\n\n#accept-text, #snooze-text, .icon-sapling-accept {\n color: ").concat(ir,";\n}\n\n#ignore-row,\n#description-row,\n#snooze-row,\n#dictionary-row {\n border-top: 0.5px solid ").concat(vr,";\n}\n\n#accept-button:hover,\n#ignore-button:hover,\n#explanations:hover,\n#dictionary-button:hover,\n#snooze-button:hover {\n background-color: ").concat(hr,";\n}\n\n#accept-button:focus,\n#ignore-button:focus,\n#explanations:focus,\n#dictionary-button:focus,\n#snooze-button:focus {\n outline: none;\n background-color: ").concat(hr,";\n}\n#accept-button:active,\n#ignore-button:active,\n#explanations:active,\n#dictionary-button:active,\n#snooze-button:active {\n background-color: ").concat(vr,";\n}\n\n.icon-sapling-description {\n padding: 0px 8px 0px 4px;\n display: flex;\n align-items: center;\n}\n\n.icon-sapling-description:before {\n font-family: 'icomoon' !important;\n color: ").concat(Dr,';\n content: "\\f071";\n}\n#description-row {\n padding: 8px;\n}\n#description-text {\n margin-left: 2px;\n}\n </style>'),i="";"SDK"===l.MODE&&(e=Sapling.appearance.variables.ignoreText,n=Sapling.appearance.variables.acceptText,Sapling.appearance.compact||(r='<style type="text/css">\n\n#sapling-edit-controls #type-row,\n#sapling-edit-controls #text-row,\n#sapling-edit-controls #description-row {\n display: flex;\n}\n\n#sapling-edit-controls {\n position: relative;\n padding: 15px 20px;\n border-radius: 12px;\n min-width: 210px;\n /* Matches --sapling-shadow-panel in design-tokens.js instead of the old\n 3-layer Material elevation shadow (dated next to the rest of the UI). */\n box-shadow: 0 8px 24px rgb(31 35 40 / 0.16), 0 1px 3px rgb(31 35 40 / 0.12);\n}\n\n#accept-row,\n#ignore-row {\n border: none;\n position: absolute;\n bottom: 15px;\n user-select: none;\n}\n\n#accept-row {\n left: 20px;\n}\n\n#ignore-row {\n right: 20px;\n}\n\n.icon-sapling-accept,\n.icon-sapling-reject {\n width: 24px;\n}\n\n.icon-sapling-accept,\n#accept-text {\n color: white;\n}\n\n#accept-text,\n#ignore-text {\n padding: 0px;\n padding-right: 8px;\n padding-left: 4px;\n}\n\n#accept-button,\n#ignore-button {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 33px;\n padding: 7px 5px;\n border-radius: 12px;\n transition: all .15s ease;\n}\n\n#accept-button {\n border: none;\n background-color: '.concat(ir,";\n}\n\n#accept-button:hover,\n#ignore-button:hover {\n transform: translateY(-1px);\n box-shadow: ").concat(Hr,";\n max-height: none;\n}\n\n#accept-button:active,\n#ignore-button:active {\n transform: translateY(0px);\n}\n\n#ignore-button {\n border: 1px solid ").concat(mr,";\n background-color: transparent;\n color: ").concat(dr,";\n}\n\n#description-text {\n font-size: 0.9em;\n line-height: 1.5em;\n color: ").concat(dr,";\n margin-bottom: 50px;\n}\n\n#text-row.gated-text-row {\n color: ").concat(ir,";\n cursor: pointer;\n margin-bottom: 45px;\n margin-left: 5px;\n}\n\n </style>")),Sapling.appearance.customCSS&&(i=Sapling.appearance.customCSS)),Uu(Wu).html("\n ".concat('<style type="text/css">\n#sapling-edit-controls {\n z-index: 2147483647 !important;\n background-color: '.concat(pr,";\n color: ").concat(lr,";\n border: 0.5px solid ").concat(vr,";\n overflow: hidden;\n}\n.edit-controls-row {\n max-width: 500px;\n display: flex;\n}\n#explanations {\n font-size: 14px;\n color: ").concat(fr,";\n padding: 7px 12px 0px 12px;\n}\n#accept-button, #ignore-button {\n line-height: 1.1em;\n}\n#accept-button,\n#ignore-button,\n#explanations,\n#dictionary-button,\n#snooze-button {\n cursor: pointer;\n}\n\n#premium-button {\n cursor: pointer;\n background-color: ").concat(Dr,';\n}\n#premium-button:hover {\n filter: brightness(0.92);\n}\n#accept-button {\n float: left;\n}\n\n.icon-sapling-right-arrow {\n background-image: url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><polygon points="8.59,16.59 13.17,12 8.59,7.41 10,6 16,12 10,18 8.59,16.59" fill="').concat(encodeURIComponent(fr),'"/><polygon points="3,13 13,13 13,11 3,11" fill="').concat(encodeURIComponent(fr),"\"/></svg>');\n background-size: 24px 24px;\n background-position: center;\n background-repeat: no-repeat;\n width: 24px;\n height: 24px;\n margin-left: 5px;\n}\n\n.icon-sapling-accept, .icon-sapling-reject {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n}\n\n#snooze-text {\n font-size: 14px;\n}\n#accept-button,\n#ignore-button,\n#premium-button,\n#dictionary-button,\n#snooze-button {\n display: flex;\n}\n#ignore-text,\n#snooze-text,\n#dictionary-text,\n.icon-sapling-reject {\n color: ").concat(fr,";\n}\n\n#accept-text,\n#ignore-text,\n#dictionary-text,\n#snooze-text {\n display: table-cell;\n text-align: left;\n white-space: nowrap;\n padding-right: 8px;\n}\n#description-row {\n display: flex;\n font-size: 12px;\n color: ").concat(fr,";\n}\n\n#description-text {\n flex-grow: 1;\n width: min-content;\n text-align: left;\n}\n#premium-text {\n padding: 4px 8px 4px 8px;\n line-height: 1.2em;\n font-size: 90%;\n color: #fff;\n}\n\n.advanced-edit {\n color: ").concat(wr,";\n text-decoration: none;\n}\n.register-edit {\n color: ").concat(ir,';\n text-decoration: none;\n font-weight: 500;\n}\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^="icon-sapling-"], [class*=" icon-sapling-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: \'icomoon\' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#type-row,\n#text-row,\n#description-row,\n#snooze-row,\n#dictionary-row,\n#premium-banner-row\n{\n display: none;\n}\n\n.icon-sapling-accept:before {\n font-family: \'icomoon\' !important;\n content: "\\f00c";\n}\n.icon-sapling-close:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-remove:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n.icon-sapling-reject:before {\n font-family: \'icomoon\' !important;\n content: "\\f00d";\n}\n\n#type-row,\n#text-row {\n margin-bottom: 10px;\n}\n\n#type-text {\n text-transform: uppercase;\n font-size: 10px;\n color: ').concat(fr,";\n}\n\n#original-text-row,\n#replacement-text-row,\n#text-row {\n align-items: center;\n}\n\n#original-text-row,\n#replacement-text-row {\n max-width: 200px;\n word-wrap: break-word;\n}\n\n#text-row {\n justify-content: flex-start;\n}\n\n#description-text:empty {\n margin-bottom: 40px;\n}\n\n.icon-sapling-type {\n border-radius: 50%;\n display: inline-block;\n vertical-align: middle;\n}\n\n.grammar,\n.spelling,\n.punctuation,\n.fluency,\n.other,\n.voice,\n.adverbs,\n.simplifications,\n.hard_to_read,\n.qualifiers,\n.profanity,\n.dei\n{\n width: 6px;\n height: 6px;\n margin: 3px;\n background-color: ").concat(ir,";\n}\n\n </style>"),"\n ").concat(r,'\n <style type="text/css">\n ').concat(i,'\n </style>\n <div id="sapling-edit-controls" role="menu">\n\n <div id="type-row">\n <div class="icon-sapling-type"></div>\n <div id="type-text"></div>\n </div>\n\n <div id="text-row">\n <div id="original-text-row">\n <div class="icon-sapling-original-text"></div>\n <div id="original-text"></div>\n </div>\n\n <div class="icon-sapling-right-arrow"></div>\n\n <div id="replacement-text-row">\n <div class="icon-sapling-replacement-text"></div>\n <div id="replacement-text"></div>\n </div>\n </div>\n\n <div id="accept-row" class="edit-controls-row">\n <div id="accept-button" tabindex="-1" role="menuitem" aria-keyshortcuts="Enter ArrowDown">\n <div class="icon-sapling-accept"></div>\n <div id="accept-text" aria-label="Accept">').concat(n,'</div>\n </div>\n </div>\n\n <div id="ignore-row" class="edit-controls-row">\n <div id="ignore-button" tabindex="-1" role="menuitem" aria-keyshortcuts="Enter ArrowUp">\n <div class="icon-sapling-reject"></div>\n <div id="ignore-text" aria-label="Reject">').concat(e,'</div>\n </div>\n </div>\n\n <div id="description-row" class="edit-controls-row">\n <div class="icon-sapling-description"></div>\n <div id="description-text"></div>\n </div>\n\n <div id="snooze-row" class="edit-controls-row">\n <div id="snooze-button" tabindex="-1">\n <div class="icon-sapling-reject"></div>\n <div id="snooze-text">Hide Advanced Edits</div>\n </div>\n </div>\n\n <div id="dictionary-row" class="edit-controls-row">\n <div id="dictionary-button" tabindex="-1">\n <div class="icon-sapling-reject"></div>\n <div id="dictionary-text">Add to Dictionary</div>\n </div>\n </div>\n\n <div id="premium-banner-row" class="edit-controls-row">\n <div id="premium-button" tabindex="-1">\n <div id="premium-text">\n Your trial ends in 1 day\n </div>\n </div>\n </div>\n\n <span id="hide-control" tabindex="-1"></span>\n </div>')),Uu("#sapling-edit-controls",Wu).on("keydown",function(t){if("Escape"===t.key){var e=Dd(Uu(Gu).attr("sapling-container-id")),n=K(e);n&&(e=Md(n)),Ju(),e.focus()}}),Uu("#hide-control",Wu).focus(function(t){t.preventDefault(),t.stopPropagation();var e=Dd(Uu(Gu).attr("sapling-container-id")),n=K(e);n&&(e=Md(n)),Ju(),e.focus()})}}function Zu(t,e,n){Mu(t,e,n)}function tc(t,e,n){!function(t,e,n){wd(t)&&(Rt(e.editHash,"reject",t,n),Fs(t,e.editId),rd(t,e.editId),Ju(),pd(),$l(t))}(t,e,n)}function ec(t){!function(t){var e=ql[t];if(!e)return;if(!e.annotationsOverlay)return;e.annotationsOverlay.hideEdits()}(t),Ju()}function nc(){window.open("".concat(l.WEBSITE_URL,"/plans#trial_pro_edit_click"))}function rc(){window.open("".concat("https://sapling.ai","/user/sign-in#edit_click"))}function ic(t,e){if(e.description){Uu("#description-text",Wu).html(Z(e.description));var n=Math.min(e.description.length,35)/35*220;Uu("#description-text",Wu).css("min-width",n),Uu("#description-row",Wu).css("display","flex")}}function oc(t,e){e.category&&("SDK"===l.MODE&&Sapling.autoShowAdvancedEdits||Uu("#snooze-row",Wu).show(),Uu("#type-text",Wu).html(Z(e.category.replace(/_/g," "))),Uu(".icon-sapling-type",Wu).addClass(e.category),"voice"!==e.category&&"hard_to_read"!==e.category&&"profanity"!==e.category||(Uu("#text-row",Wu).hide(),Uu("#accept-row",Wu).hide()))}function ac(t,e,n){Uu("#accept-button",Wu).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Uu("#ignore-button",Wu).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Uu("#snooze-button",Wu).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Uu("#dictionary-button",Wu).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Uu("#premium-button",Wu).mousedown(function(t){t.stopPropagation(),t.preventDefault()}),Uu("#ignore-button",Wu).click(function(){return tc(t,e,n)}),Uu("#premium-button",Wu).click(nc),Uu("#snooze-button",Wu).click(function(){return ec(t)}),Uu("#dictionary-button",Wu).click(function(){return function(t,e){Bu(t,e.editId)}(t,e)}),Uu("#ignore-button",Wu).keyup(function(r){"Enter"===r.key?(tc(t,e,n),Dd(t).focus()):"ArrowUp"===r.key&&Uu("#accept-button",Wu).focus()}),function(t,e,n){wd(t)&&Rt(e.editHash,"hover",t,n)}(t,e,n)}function sc(){(function(){if(Ul&&Ul.containerId in ql){var t=ql[Ul.containerId].edits;if(!(Ul.editId in t))return!0;var e=t[Ul.editId].editRange;if(!at(e.startContainer)||!at(e.endContainer))return!0}return!1})()&&Ju()}function uc(){clearTimeout(zu),zu=null}function cc(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];uc(),Uu("#active-edit",Wu).removeAttr("id");var o=n[0];if(o){var a,s;Qu(o),Uu("#accept-button",Wu).off("click mousedown keyup"),Uu("#ignore-button",Wu).off("click mousedown keyup"),Uu("#snooze-button",Wu).off("click mousedown keyup"),Uu("#dictionary-button",Wu).off("click mousedown keyup"),Uu("#premium-button",Wu).off("click mousedown keyup"),Uu("#type-text",Wu).html(""),Uu("#description-text",Wu).html(""),Uu("#snooze-row",Wu).hide(),Uu("#dictionary-row",Wu).hide(),Uu("#accept-row",Wu).show(),Uu("#ignore-row",Wu).show(),Uu("#text-row",Wu).hide(),Uu("#description-row",Wu).hide(),Uu(".icon-sapling-type",Wu).attr("class","icon-sapling-type"),"SDK"!==l.MODE||Sapling.appearance.compact||(Uu("#text-row",Wu).css("display","flex"),Uu("#description-row",Wu).show()),"SDK"===l.MODE?function(t,e){var n=Z(e.replacementText),r=Z(e.originalText);""===e.replacementText?n="<del> ".concat(r," </del>"):r="<del> ".concat(r," </del>");var i=Uu("#accept-button",Wu),o={is_premium:e.premium,is_enabled:!0};i.click(function(){return Zu(t,e,o)}),i.keyup(function(n){"Enter"===n.key?Zu(t,e,o):"ArrowDown"===n.key&&Uu("#ignore-button",Wu).focus()}),Uu("#type-text",Wu).html(Z(e.generalErrorType)),Uu("#original-text",Wu).html(r),Uu("#replacement-text",Wu).html(n),Uu("#description-text",Wu).html(Z(e.description));var a=e.generalErrorType;a&&(a=a.split(" ")[0].split("/")[0].toLowerCase()),Uu(".icon-sapling-type",Wu).addClass(a);var s=null;e.premium&&null==e.replacementText&&(Be()?(n="[Sign in to see premium edit]",i.off("click").click(rc),s=rc,i.off("keyup"),o.is_enabled=!1):Le()?He()||(n="[Pro Edit: Only in Sapling Pro]",i.off("click").click(nc),s=nc,i.off("keyup"),o.is_enabled=!1):(n="[Confirm email to see premium edit]",i.off("click").click(rc),s=rc,i.off("keyup"),o.is_enabled=!1)),Sapling.appearance.compact?Uu("#accept-text",Wu).html(n):(s&&(Uu("#text-row",Wu).addClass("gated-text-row").html(n),Uu("#text-row",Wu).click(s),Uu("#description-text",Wu).hide()),Uu("#accept-text",Wu).html(Sapling.appearance.variables.acceptText)),oc(0,e),ic(0,e),Sapling.addToDictionary&&"Grammar"!==e.generalErrorType&&e.dictionary&&Uu("#dictionary-row",Wu).show(),ac(t,e,o)}(t,e):function(t,e){var n=Z(e.replacementText);""===e.replacementText&&(n="<del> ".concat(Z(e.originalText)," </del>"));var r=Uu("#accept-button",Wu),i={is_premium:e.premium,is_enabled:!0};r.keyup(function(n){"Enter"===n.key?Zu(t,e,i):"ArrowDown"===n.key&&Uu("#ignore-button",Wu).focus()}),r.click(function(){return Zu(t,e,i)}),h()===l.WEBSITE_HOSTNAME||(Be()&&(e.requireLogin||e.premium)?(n="[Sign in to see premium edit]",r.off("click").click(rc),r.off("keyup"),i.is_enabled=!1):e.premium&&(Le()?He()||(n="[Pro Edit: Only in Sapling Pro]",r.off("click").click(nc),r.off("keyup"),i.is_enabled=!1):(n="[Confirm email to see premium edit]",r.off("click").click(rc),r.off("keyup"),i.is_enabled=!1))),Uu("#accept-text",Wu).html(n),oc(0,e),ic(0,e),ac(t,e,i)}(t,e),a=e.premium,null!==(s=Ye())&&a&&s<4?(1===s?Uu("#premium-text",Wu).html("Your trial ends in 1 day"):s<4&&Uu("#premium-text",Wu).html("Your trial ends in ".concat(s," days")),Uu("#premium-banner-row",Wu).show()):Uu("#premium-banner-row",Wu).hide(),Uu(Gu).attr("sapling-edit-id",e.editId),Uu(Gu).attr("sapling-container-id",t),Uu(o).attr("id","active-edit");var u=o.getBoundingClientRect(),c=$u&&o.ownerDocument&&o.ownerDocument.defaultView||window,d=u.left-18,f=$u?0:window.scrollX;d=Math.min(d,c.innerWidth+f-Uu(Gu).width()-16),d=Math.max(d,8);for(var p=u.top+Uu(o).height(),g=1;g<n.length;g++){var v=n[g],m=v.getBoundingClientRect().top+Uu(v).height();m>p&&(p=m)}var y=$u?0:window.scrollY,b=p+y;if(b+Uu(Gu).height()>c.innerHeight+y){var D=u.top-Uu(Gu).height()+y;D>=0&&(b=D)}if("SDK"===l.MODE&&!$u){var w=si(o);d+=w.x,b+=w.y}var x=function(t){var e,n=R(t),r={height:(e=n).clientHeight,width:e.clientWidth},i=S(n).offset();return{top:i.top,bottom:i.top+r.height,left:i.left,right:i.left+r.width}}(R(r));Uu(Gu).data("bounds",x),Uu(Gu).data("defaultHeight",Uu(Gu).outerHeight()),Uu(Gu).data("defaultOrigin",{left:d,top:b}),Uu(Gu).css({left:d,top:b}),Uu(Gu).fadeIn(200),i&&Uu("#accept-button",Wu).focus()}}function lc(){zu||(zu=setTimeout(Ju,300))}function dc(t){return t.match(/^[0-9a-z]+$/)}function fc(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=F(t.toString()),i=F(e.startText),o=F(e.endText),a=r.substring(0,i.length),s=r.substring(r.length-o.length);if(a!==i||s!==o)return n&&"Incorrect inner text |".concat(a,"|!=|").concat(i,"||").concat(s,"|!=|").concat(o,"|"),!1;if(function(t,e){return!(void 0===t||t.length<=e||0===e)&&dc(F(t.substr(e,1)))&&dc(F(t.substr(e-1,1)))}(t.endContainer.data,t.endOffset)){var u=Dn();return u&&(u=u.toLowerCase()),"jp"===u||"zh"===u||"ko"===u||"ar"===u}return!0}var pc={voice:{"background-image":"linear-gradient(to right, rgba(22, 112, 49, 0.8), rgb(22, 112, 49, 0.8))","background-color":"rgba(22, 112, 49, 0.2)"},adverbs:{"background-image":"linear-gradient(to right, rgba(0, 170, 193, 0.8), rgba(0, 170, 193, 0.8))","background-color":"rgba(0, 170, 193, 0.2)"},simplifications:{"background-image":"linear-gradient(to right, rgba(51, 146, 255, 0.8),rgba(51, 146, 255, 0.8))","background-color":"rgba(51, 146, 255, 0.2)"},qualifiers:{"background-image":"linear-gradient(to right, rgba(35, 62, 143, 0.8),rgba(35, 62, 143, 0.8))","background-color":"rgba(35, 62, 143, 0.2)"},dei:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},profanity:{"background-image":"linear-gradient(to right, rgba(111, 39, 153, 0.8),rgba(111, 39, 153, 0.8))","background-color":"rgba(111, 39, 153, 0.2)"},hard_to_read:{"background-image":"linear-gradient(to right, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.2))","background-image2":"linear-gradient(to right, rgba(255, 255, 50, 0.4), rgba(255, 255, 50, 0.4))","background-color":"rgba(255, 100, 100, 0.2)","background-color2":"rgba(255, 255, 200, 0.2)"}};function hc(){return'<style type="text/css">\n .sapling-edit {\n position: absolute;\n box-sizing: content-box;\n display: inline;\n min-width: 0.5em;\n opacity: 0.85;\n background-position: 0px calc(100% + 1px);\n background-repeat: no-repeat;\n background-size: calc(100% + 1px) 2px;\n border-bottom: 2px solid transparent;\n background-image: linear-gradient(to right, '.concat(yr,", ").concat(yr,");\n }\n\n .sapling-edit:hover {\n background-color: ").concat(Or,";\n -webkit-transition: background-color 200ms linear;\n -ms-transition: background-color 200ms linear;\n transition: background-color 200ms linear;\n }\n</style>")}var gc=n(216);function vc(t){return vc="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},vc(t)}function mc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yc(r.key),r)}}function yc(t){var e=function(t,e){if("object"!=vc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=vc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vc(e)?e:e+""}var bc=function(){return t=function t(e,n,r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.draggableJq=e,this.dragJq=n||e,this.ignoreJqSelector=r,this.ignoreScroll=i,this.dragMove=this.dragMove.bind(this),this.dragMouseUp=this.dragMouseUp.bind(this),this.dragMouseDown=this.dragMouseDown.bind(this),this.posX=0,this.posY=0,this.dragJq.on("mousedown",this.dragMouseDown),window.addEventListener("mouseup",this.dragMouseUp,!1)},e=[{key:"dragMove",value:function(t){var e=t.clientY+this.posY,n=t.clientX+this.posX;this.ignoreScroll||(e+=window.scrollY,n+=window.scrollX),this.draggableJq.css({top:e,left:n,bottom:"",right:""})}},{key:"dragMouseUp",value:function(){window.removeEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grab"})}},{key:"dragMouseDown",value:function(t){if(!this.ignoreJqSelector||!gc(t.target).is(this.ignoreJqSelector)){t.preventDefault();var e=this.draggableJq[0].getBoundingClientRect();this.posX=e.left-t.clientX,this.posY=e.top-t.clientY,window.addEventListener("mousemove",this.dragMove,!0),this.dragJq.css({cursor:"grabbing"})}}}],e&&mc(t.prototype,e),n&&mc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Dc=n(216);function wc(t){return wc="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},wc(t)}function xc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ac(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ac(t,e){if(t){if("string"==typeof t)return Ec(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ec(t,e):void 0}}function Ec(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Sc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,_c(r.key),r)}}function _c(t){var e=function(t,e){if("object"!=wc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=wc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wc(e)?e:e+""}var Cc=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.annotationsOverlay=n,this.summaryWrapper=null,this.summaryList=null,this.annotationsSpinner=null,this.annotationsError=null,this.shadowRoot=null,this.summaryAnnotationsContainer=null,this.summaryDragger=null,this.annotationsCache=[],this.statisticsCache={}},e=[{key:"handleDismiss",value:function(t){1===t.which&&this.annotationsOverlay.hideSummaryAnnotations()}},{key:"maybeEmbedSaplingSummaryAnnotations",value:function(){var t,e=Dc("sapling-summary-annotations");if(e.length&&(this.summaryAnnotationsContainer||(this.summaryAnnotationsContainer=e.first(),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot)),!this.summaryAnnotationsContainer){this.summaryAnnotationsContainer=Dc("<sapling-summary-annotations>\n </sapling-summary-annotations>");var n="\n ".concat((t="","SDK"===l.MODE&&Sapling.appearance.customCSS&&(t='<style type="text/css">'.concat(Sapling.appearance.customCSS,"</style>")),"".concat(t,'<style type="text/css">\n\n/* Structures */\n\n.summary-annotations-wrapper {\n width: 400px;\n min-height: 80px;\n opacity: 0.9;\n background-color: ').concat(pr,";\n box-shadow: ").concat(Lr,";\n border-radius: 8px;\n font: 9pt ").concat(Br,";\n /* Set an explicit text color: this panel is injected into arbitrary host\n pages and 'color' inherits across the shadow boundary, so a dark-themed\n host would otherwise leave light text unreadable on this white surface. */\n color: ").concat(lr,";\n}\n\n.annotations-dismiss {\n cursor: pointer;\n margin-left: auto;\n position: absolute;\n right: 0px;\n top: -1px;\n width: 1.5em;\n height: 1.5em;\n line-height: 1.5em;\n text-align: center;\n user-select: none;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n color: rgba(110, 115, 128, 0.95);\n transition: all .15s ease;\n}\n\n.summary-annotations {\n display: block;\n padding: 0.5em;\n padding-bottom: 0;\n}\n.sapling-summary-annotation {\n background-color: ").concat(ur,";\n padding: 5px;\n border-radius: 5px;\n margin-bottom: 0.5em;\n}\n.sapling-annotation-count {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n background-color: ").concat(ir,";\n color: ").concat(gr,";\n font-weight: bold;\n}\n\n\n/* begin toggle css */\n\n.sapling-annotation-toggle.switch {\n position: relative;\n display: inline-block;\n width: 28px;\n height: 18px;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle.switch input {\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.sapling-annotation-toggle .slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ").concat(mr,';\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle .slider:before {\n position: absolute;\n content: "";\n height: 10px;\n width: 10px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n -webkit-transition: .4s;\n transition: .4s;\n border-radius: 3px;\n}\n\n.sapling-annotation-toggle input:checked + .slider {\n background-color: ').concat(ir,";\n}\n\n.sapling-annotation-toggle input:focus + .slider {\n box-shadow: 0 0 1px ").concat(Ar,";\n}\n\n.sapling-annotation-toggle input:checked + .slider:before {\n -webkit-transform: translateX(10px);\n -ms-transform: translateX(10px);\n transform: translateX(10px);\n}\n\n/* end toggle css */\n\n.sapling-annotation-toggle-row {\n width: 200px;\n margin-bottom: 10px;\n padding-left: 5px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sapling-annotation-explanation .toggle-text {\n left-margin: 5px;\n cursor: pointer;\n padding-left: 4px;\n padding-top: 8px;\n padding-bottom: 8px;\n padding-right: 8px;\n}\n\n.sapling-annotation-type {\n display: inline-block;\n padding: 5px 10px;\n border-radius: 3px;\n align-items:center;\n color: ").concat(gr,";\n font-weight:bold;\n}\n.sapling-annotation-explanation {\n display: inline;\n padding: 5px;\n line-height: 1.5em;\n}\n.sapling-annotations-error {\n padding: 0.2em 0.4em;\n background-color: ").concat(Or,";\n text-align: right;\n color: ").concat(br,";\n}\n\n\n/* Spinner */\n\n.sapling-annotations-spinner {\n position: absolute;\n right: 5px;\n bottom: 5px;\n display: inline-block;\n}\n.sapling-annotations-spinner img {\n display: block;\n height: 12px;\n width: 12px;\n\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n}\n@keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n}\n\n/* Statistics */\n\ndiv.dl-cols {\n display: grid;\n padding: 1em 1em 0.5em 1em;\n grid-template-columns: max-content auto;\n}\ndl {\n display: grid;\n grid-template-columns: max-content auto;\n margin: 0;\n line-height: 1.5;\n}\ndt {\n font-weight: bold;\n grid-column-start: 1;\n}\ndd {\n grid-column-start: 2;\n}\ndl + dl {\n margin-left: 4em;\n}\n</style>")),'\n <div class="summary-annotations-wrapper">\n <span class="annotations-dismiss">\xd7</span>\n <div class="dl-cols summary-annotations-statistics">\n <dl>\n <dt>Characters</dt>\n <dd class="summary-chars">-</dd>\n <dt >Words</dt>\n <dd class="summary-words">-</dd>\n <dt>Sentences</dt>\n <dd class="summary-sentences">-</dd>\n </dl>\n <dl>\n <dt>Readability (Grade)</dt>\n <dd class="summary-readability">-</dd>\n <dt>Reading Time (min)</dt>\n <dd class="summary-reading_time_min">- min</dd>\n <dt>&nbsp;</dt>\n <dd>&nbsp;</dd>\n </dl>\n </div>\n <div class="summary-annotations">\n </div>\n <div class="sapling-annotations-error"></div>\n <div class="sapling-annotations-spinner" style=""><img src="').concat(hm("assets/fa-spinner-solid.svg"),'" /></div>\n </div>');this.summaryAnnotationsContainer[0].attachShadow({mode:"open"}),this.shadowRoot=this.summaryAnnotationsContainer[0].shadowRoot,Dc(this.shadowRoot).html(n),Dc("html").append(this.summaryAnnotationsContainer)}this.summaryWrapper=Dc(this.shadowRoot).find(".summary-annotations-wrapper").first(),this.summaryList=Dc(this.shadowRoot).find(".summary-annotations").first(),this.annotationsSpinner=Dc(this.shadowRoot).find(".sapling-annotations-spinner").first(),this.annotationsError=Dc(this.summaryWrapper).find(".sapling-annotations-error").first(),Dc(this.summaryWrapper).find(".annotations-dismiss").on("mousedown",this.handleDismiss.bind(this)),this.annotationsError.hide(),this.summaryDragger=new bc(this.summaryWrapper,this.summaryWrapper,null,!1)}},{key:"summaryVisible",value:function(){return this.summaryAnnotationsContainer.attr("container-id")===this.containerId}},{key:"showSummary",value:function(t){this.summaryAnnotationsContainer&&(this.updateAnnotationsDOM(),this.summaryAnnotationsContainer.attr("container-id",this.containerId),this.updateToggle(t),this.summaryAnnotationsContainer.show())}},{key:"hideSummary",value:function(){this.summaryAnnotationsContainer&&(this.summaryAnnotationsContainer.hide(),this.summaryAnnotationsContainer.attr("container-id",""))}},{key:"buildSummaryElement",value:function(t,e,n){var r=pc[t]["background-color"].replace("0.2)","1.0)"),i=t.replaceAll(" ","-"),o=t.replaceAll("_"," ");return"dei"===o&&(o="DEI"),Dc('\n <div class="sapling-summary-annotation">\n <span class="sapling-annotation-count">'.concat(e,'</span>\n <span class="sapling-annotation-type ').concat(i,'" style="background-color: ').concat(r,';">').concat(o,'</span>\n <span class="sapling-annotation-explanation">\n ').concat(n,"\n </span>\n </div>\n "))}},{key:"setSummaryAnnotations",value:function(t){this.annotationsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"setStatistics",value:function(t){this.statisticsCache=t,this.summaryVisible()&&this.updateAnnotationsDOM()}},{key:"updateAnnotationsDOM",value:function(){if(this.summaryWrapper)for(var t=0,e=Object.entries(this.statisticsCache);t<e.length;t++){var n=xc(e[t],2),r=n[0],i=n[1];this.summaryWrapper.find(".summary-".concat(r)).text(i)}this.clear(),this.annotationsError.hide();var o,a=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ac(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.annotationsCache);try{for(a.s();!(o=a.n()).done;){var s=o.value,u=this.buildSummaryElement(s.type,s.count,s.explanation);this.summaryList.append(u)}}catch(t){a.e(t)}finally{a.f()}"SDK"===l.MODE&&Sapling.freemium&&!xn()||(this.summaryList.append(Dc('\n <div>\n <label class="sapling-annotation-toggle-row">\n <div class="sapling-annotation-toggle switch">\n <input type="checkbox">\n <span class="slider"></span>\n </div>\n <span class="sapling-annotation-explanation">\n <span class="toggle-text">Hide Advanced Edits</span>\n </span>\n </label>\n </div>\n ')),Dc("input",this.summaryList).change(this.editsToggled.bind(this)))}},{key:"editsToggled",value:function(t){var e=t.currentTarget.checked;this.updateToggle(e),e?this.annotationsOverlay.showEdits():this.annotationsOverlay.hideEdits()}},{key:"updateToggle",value:function(t){Dc("input",this.summaryList).prop("checked",t),t?Dc(".toggle-text",this.summaryList).text("Advanced Edits Shown"):Dc(".toggle-text",this.summaryList).text("Advanced Edits Hidden")}},{key:"clear",value:function(){this.summaryList&&this.summaryList.html("")}},{key:"setErrorStatus",value:function(t){this.annotationsError.text(t),this.annotationsError.show()}},{key:"showSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.show()}},{key:"hideSpinner",value:function(){this.annotationsSpinner&&this.annotationsSpinner.hide()}}],e&&Sc(t.prototype,e),n&&Sc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),kc=n(216);function Oc(t){return Oc="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},Oc(t)}function Tc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ic(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ic(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ic(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function jc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Fc(r.key),r)}}function Fc(t){var e=function(t,e){if("object"!=Oc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Oc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Oc(e)?e:e+""}var Nc=function(){return t=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=e,this.shadowHost=n,this.annotationsContainer=null,this.summaryAnnotations=null,this.annotationsAlwaysVisible=!1,this.editsVisible=!0,this.annotationEditInfos={},this.lastQueryText=null},(e=[{key:"createUIElements",value:function(){if(We()){Qe()||(this.editsVisible=!1);var t=this.shadowHost.shadowRoot;this.annotationsContainer=kc(".sapling-annotations-container",t),this.annotationsContainer.length||(this.annotationsContainer=kc('\n <div class="sapling-annotations-container">\n </div>\n ')),kc(t).append(this.annotationsContainer),this.summaryAnnotations||(this.summaryAnnotations=new Cc(this.containerId,this),this.summaryAnnotations.maybeEmbedSaplingSummaryAnnotations()),this.hideSummaryAnnotations(),"SDK"===l.MODE&&Sapling.autoShowAdvancedEdits&&(this.annotationsAlwaysVisible=!0)}}},{key:"positionAnnotations",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=this.summaryAnnotations.summaryWrapper,n=t.left+window.scrollX+t.width-e.width()-6,r=t.bottom+window.scrollY-e.height()-25;r=Math.max(r,20),n=Math.max(n,0),e.css({position:"absolute",left:n,top:r})}},{key:"updateAnnotationSummary",value:function(){for(var t={},e=0,n=Object.values(this.annotationEditInfos);e<n.length;e++){var r=n[e],i=r.edit.category;if(i){var o=r.edit.description;t[i]||(t[i]={type:i,count:0,explanation:o}),t[i].count++}}this.summaryAnnotations.setSummaryAnnotations(Object.values(t)),this.positionAnnotations(),this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"updateAnnotationForOverlay",value:function(t,e){this.annotationEditInfos[t]=e;var n,r=Tc(e.domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.annotationsAlwaysVisible||this.editsVisible?kc(i).show():kc(i).hide()}}catch(t){r.e(t)}finally{r.f()}}},{key:"clearAnnotationForOverlay",value:function(t){delete this.annotationEditInfos[t]}},{key:"queryAndUpdate",value:function(){var t=this;if(We()){this.summaryAnnotations.showSpinner();var e=kc(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id]").first()[0];if(void 0!==e&&e){var n=e.innerHTML.trim();if(n&&this.lastQueryText!==n){this.lastQueryText=n;var r=kc(this.shadowHost).prev().attr("sapling-id");r||(r=kc(this.shadowHost).prev().attr("sapling-textarea-id")),function(t,e,n,r,i){St("request/GET_STATISTICS",{html:m()(t,5e4),sessionId:n,context:It()},r,i)}(n,0,r,function(e){t.summaryAnnotations.setStatistics(e.statistics)},function(e){e&&t.setErrorStatus(e.toString())}),this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}else this.summaryAnnotations.hideSpinner()}}},{key:"toggleSummaryAnnotations",value:function(){this.summaryAnnotations.summaryVisible()?this.hideSummaryAnnotations():this.showSummaryAnnotations()}},{key:"showEdits",value:function(){this.editsVisible=!0;for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Tc(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;kc(i).show()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}},{key:"hideEdits",value:function(){if(this.editsVisible=!1,!this.annotationsAlwaysVisible){for(var t=0,e=Object.values(this.annotationEditInfos);t<e.length;t++){var n,r=Tc(e[t].domElements);try{for(r.s();!(n=r.n()).done;){var i=n.value;kc(i).hide()}}catch(t){r.e(t)}finally{r.f()}}this.summaryAnnotations.updateToggle(this.editsVisible)}}},{key:"showSummaryAnnotations",value:function(){this.summaryAnnotations.showSummary(this.editsVisible),this.positionAnnotations()}},{key:"hideSummaryAnnotations",value:function(){this.summaryAnnotations.hideSummary()}},{key:"removeUIElements",value:function(){this.shadowHost&&this.shadowHost.remove(),this.annotationEditInfos={}}}])&&jc(t.prototype,e),n&&jc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),Pc=n(216);function Rc(t){return Rc="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},Rc(t)}function Mc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Lc(r.key),r)}}function Bc(t,e,n){return(e=Lc(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lc(t){var e=function(t,e){if("object"!=Rc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Rc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Rc(e)?e:e+""}var Hc="\n ".concat(qr,"\n\n .sapling-utility-overlay {\n background-color: rgba(255, 255, 255, 0.9);\n display: none;\n position: absolute;\n z-index: 999;\n box-shadow: var(--sapling-shadow-panel);\n border-radius: var(--sapling-radius-lg);\n font: 9pt var(--sapling-font);\n flex-direction: column;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-empty-message {\n display: block;\n }\n\n .sapling-utility-overlay.sapling-utility-empty .sapling-utility-data {\n display: none;\n }\n\n .sapling-utility-empty-message {\n display: none;\n padding: 10px;\n }\n\n .sapling-utility-overlay.visible {\n display: flex;\n }\n\n .sapling-utility-sentence-overlays {\n display: none;\n z-index: 999;\n }\n\n .sapling-utility-sentence-overlays.visible {\n display: inherit;\n }\n\n .sapling-utility-sentence-overlays.sapling-loading {\n opacity: 0.5;\n transition: all 0.25s;\n }\n\n .sapling-utility-header-button,\n .sapling-utility-overlay-spinner {\n position: absolute;\n top: 5px;\n padding: 4px;\n }\n\n .sapling-utility-header-button .sapling-icon,\n .sapling-utility-overlay-spinner .sapling-icon {\n display: block;\n color: var(--sapling-text-muted);\n }\n\n /* Native <button>: reset UA chrome so only the hover tile shows. */\n .sapling-utility-header-button {\n cursor: pointer;\n margin: 0;\n border: none;\n background: none;\n border-radius: var(--sapling-radius-sm);\n }\n\n .sapling-utility-header-button:hover {\n background-color: var(--sapling-border);\n }\n\n .sapling-utility-header-button:hover .sapling-icon {\n color: var(--sapling-text);\n }\n\n .sapling-utility-header-button:focus-visible {\n outline: 2px solid var(--sapling-blue);\n outline-offset: 1px;\n }\n\n .sapling-utility-overlay-cancel {\n right: 6px;\n }\n\n .sapling-utility-overlay-drag {\n right: 30px;\n }\n\n /* Status indicator, not a control: no hover tile, no pointer. It stays in\n the layout at opacity 0 when idle and fades in while loading. */\n .sapling-utility-overlay-spinner {\n transform: rotate(0deg);\n right: 32px;\n opacity: 0;\n pointer-events: none;\n }\n\n .sapling-utility-overlay-spinner.sapling-loading {\n transform: rotate(0deg);\n animation: rotation 0.8s linear infinite;\n opacity: 1;\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n .utility-overlay-header {\n background-color: var(--sapling-blue-tint);\n color: var(--sapling-blue);\n font-size: 14px;\n padding: 8px;\n border-bottom: 1px solid var(--sapling-border);\n /* Match the overlay's top corners; the overlay itself doesn't clip. */\n border-radius: var(--sapling-radius-lg) var(--sapling-radius-lg) 0 0;\n display: flex;\n align-items: center;\n cursor: grab;\n }\n\n .sapling-utility-data {\n padding: 8px;\n padding-top: 4px;\n }\n\n .sapling-utility-data-row {\n padding: 4px;\n padding-left: 0;\n display: flex;\n width: 100%;\n justify-content: space-between;\n }\n\n .sapling-utility-data-row span {\n margin-right: 4px;\n }\n\n .sapling-utility-beta {\n background-color: rgba(92, 107, 192, 0.5);\n color: #fff;\n padding: 2px;\n border-radius: 2px;\n text-transform: uppercase;\n font-size: 9px;\n margin-left: 8px;\n }\n"),qc=function(){return t=function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.containerId=n,this.shadowHost=e,this.badge=r,this.queryAndUpdate=_.debounce(function(){return i._queryAndUpdate()},100),this.inDOM=document.documentElement.contains(this.shadowHost),this.overlayDragger=null,this.queryEl=null,this.hudEl=null,this.assetUrls={"thumbs-up-regular":hm("assets/thumbs-up-regular.svg"),"thumbs-down-regular":hm("assets/thumbs-down-regular.svg")};var o=this.utilityName().toLowerCase().replace(/\s+/g,"-");if(Pc("sapling-".concat(o,"-overlays-container")).length){var a=Pc("sapling-".concat(o,"-overlays-container")).first();this.utilityContainerShadowRoot=Pc(a[0].shadowRoot)}else{var s=document.createElement("sapling-".concat(o,"-overlays-container"));Pc("html").append(Pc(s)),s.attachShadow({mode:"open"}),this.utilityContainerShadowRoot=Pc(s.shadowRoot),Pc(this.utilityContainerShadowRoot).append("\n <style>".concat(Hc).concat(this.utilityCSS(),"</style>\n "))}this._setupStyleMutationObserver(),this._setupContainerRemovedObserver()},(e=[{key:"utilityName",value:function(){throw new Error("Method not implemented.")}},{key:"utilityTitle",value:function(){return this.utilityName()}},{key:"renderUtilityData",value:function(){throw new Error("Method not implemented")}},{key:"utilityCSS",value:function(){return""}},{key:"isBeta",value:function(){return!0}},{key:"isUtilityEnabled",value:function(){throw new Error("Method not implemented")}},{key:"getUtilityData",value:function(t,e,n,r,i){throw new Error("Method not implemented")}},{key:"updateHud",value:function(t){var e=this,n=t.hudEmoji,r=t.hudWarning,i=t.hudTitle;if(null!=n||null!=r?(null==this.hudEl&&(this.hudEl=document.createElement("div"),Pc(this.hudEl).addClass("sapling-tone-hud"),Pc(this.hudEl).attr("style","opacity: 0")),i?Pc(this.hudEl).attr("title",i):Pc(this.hudEl).attr("title",""),Pc(this.hudEl).html(""),Pc(this.hudEl).append(n),Pc(this.hudEl).append(r)):this.hudEl=null,Pc(this.badge.headsUpContainer).html(this.hudEl),this.hudEl){Pc(this.hudEl).on("click",function(){e.toggleVisibility()});var o=this.hudEl.getBoundingClientRect(),a=o.height,s=o.width,u=this.badge.badge[0].getBoundingClientRect().width;Pc(this.badge.headsUpContainer).css({left:"".concat(-12-Math.max(u,8)-s,"px"),top:"".concat(-.9*a,"px")}),Pc(this.hudEl).attr("style","opacity: 1")}}},{key:"_setupStyleMutationObserver",value:function(){var t=this;new MutationObserver(function(e){t.renderUtilityData()}).observe(this.shadowHost,{attributes:!0,attributeOldValue:!0,attributeFilter:["style"],childList:!0,subtree:!0})}},{key:"_setupContainerRemovedObserver",value:function(){var t=this;Pc(this.shadowHost).parent(),setInterval(function(){t.inDOM&&!document.documentElement.contains(t.shadowHost)&&t.toggleVisibility()},50)}},{key:"createUIElements",value:function(){var t=this;this.utilityOverlay||(this.utilityOverlay=document.createElement("div"),Pc(this.utilityOverlay).addClass("sapling-utility-overlay"),Pc(this.utilityOverlay).addClass("sapling-utility-empty"),Pc(this.utilityOverlay).attr("id","utility-overlay-".concat(this.containerId)),this.cancelButton=document.createElement("button"),Pc(this.cancelButton).html(pi("close")),Pc(this.cancelButton).addClass("sapling-utility-overlay-cancel"),Pc(this.cancelButton).addClass("sapling-utility-header-button"),Pc(this.cancelButton).attr({type:"button","aria-label":"Close"}).on("click",function(){return t.toggleVisibility()}),this.loadingIndicator=document.createElement("div"),Pc(this.loadingIndicator).html(pi("spinner")),Pc(this.loadingIndicator).addClass("sapling-utility-overlay-spinner"),this.overlayHeader=document.createElement("div"),Pc(this.overlayHeader).addClass("utility-overlay-header"),Pc(this.overlayHeader).html("\n ".concat(this.utilityTitle(),"\n ").concat(this.isBeta()?'<span class="sapling-utility-beta">beta</span>':"","\n ")),this.overlayDragger=new bc(Pc(this.utilityOverlay),Pc(this.overlayHeader),null),Pc(this.utilityOverlay).append(this.overlayHeader),Pc(this.utilityOverlay).append(this.loadingIndicator),Pc(this.utilityOverlay).append(this.cancelButton),Pc(this.utilityOverlay).append('<div class="sapling-utility-data"></div>'),Pc(this.utilityOverlay).append('<div class="sapling-utility-empty-message">Waiting for text...</div>'),Pc(this.utilityContainerShadowRoot).append(this.utilityOverlay),this.sentenceOverlays=document.createElement("div"),Pc(this.sentenceOverlays).addClass("sapling-utility-sentence-overlays"),Pc(this.sentenceOverlays).attr("id","utility-sentence-overlay-".concat(this.containerId)),Pc(this.shadowHost.shadowRoot).append("<style>".concat(Hc).concat(this.utilityCSS(),"</style>")),Pc(this.shadowHost.shadowRoot).append(this.sentenceOverlays))}},{key:"updateOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect(),e=t.bottom,n=t.right,r=e-2*this.constructor.HEIGHT-this.constructor.PADDING+window.scrollY,i=n-this.constructor.WIDTH-this.constructor.PADDING+window.scrollX,o=Math.max(J(this.shadowHost.parentNode),9999);Pc(this.utilityOverlay).css({zIndex:o});var a=getComputedStyle(this.shadowHost).fontSize;Pc(this.sentenceOverlays).css({zIndex:o,fontSize:a}),Pc(this.utilityOverlay).css({top:r,left:i,width:this.constructor.WIDTH,minHeight:this.constructor.HEIGHT}),this.updateSentenceOverlayPosition()}},{key:"updateSentenceOverlayPosition",value:function(){var t=this.shadowHost.getBoundingClientRect();Pc(this.sentenceOverlays).css({position:"absolute",top:0,left:0,width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),pointerEvents:"none"})}},{key:"prepareSentenceOverlayRender",value:function(){this.updateSentenceOverlayPosition(),this.sentenceOverlayScrollBase=this.queryEl?{left:this.queryEl.scrollLeft,top:this.queryEl.scrollTop}:null,Pc(this.sentenceOverlays).css({transform:""})}},{key:"syncSentenceOverlaysToScroll",value:function(){var t=this.sentenceOverlayScrollBase;if(t&&this.queryEl&&this.sentenceOverlays){var e=t.left-this.queryEl.scrollLeft,n=t.top-this.queryEl.scrollTop;Pc(this.sentenceOverlays).css({transform:e||n?"translate(".concat(e,"px, ").concat(n,"px)"):""})}}},{key:"toggleVisibility",value:function(){if(this.updateOverlayPosition(),Pc(this.utilityOverlay).toggleClass("visible"),Pc(this.sentenceOverlays).toggleClass("visible"),this.inDOM=Pc(this.utilityOverlay).is(".visible"),Pc(this.utilityOverlay).is(".visible")){var t=this.utilityName().toLowerCase().replace(/\s+/g,"_");Pt("".concat(t,"_overlay_visible"))}}},{key:"initForCheckOnce",value:function(){this.showOverlay(),this.hideOnTextChange()}},{key:"showOverlay",value:function(){this.updateOverlayPosition(),Pc(this.utilityOverlay).addClass("visible"),Pc(this.sentenceOverlays).addClass("visible"),this.inDOM=!0}},{key:"hideOnTextChange",value:function(){var t=this;this.textChangeCheckInterval=setInterval(function(){t._getQueryText()!==t.lastQueryText&&(Pc(t.sentenceOverlays).html(""),clearInterval(t.textChangeCheckInterval))},500)}},{key:"getTextNodes",value:function(t,e){var n=this;t.nodeType!==Node.TEXT_NODE?t.childNodes.forEach(function(t){return n.getTextNodes(t,e)}):e.push({node:t,text:t.data})}},{key:"_getQueryText",value:function(){if(this.queryEl=Pc(this.shadowHost).prevAll("[sapling-id],[sapling-textarea-id],[contenteditable]").first()[0],void 0===this.queryEl||!this.queryEl)return null;var t=this.queryEl.innerHTML;return this.queryEl.innerText.trim()?t:(this.resetUIElements(),null)}},{key:"_queryAndUpdate",value:function(){var t=this,e=this._getQueryText();null!=e&&(this.lastQueryText!=e?this.isUtilityEnabled()&&(this.lastQueryText=e,Pc(this.loadingIndicator).addClass("sapling-loading"),Pc(this.sentenceOverlays).addClass("sapling-loading"),this.getUtilityData(e,"en",this.containerId,function(e){Pc(t.utilityOverlay).removeClass("sapling-utility-empty"),t.renderUtilityData(),Pc(t.loadingIndicator).removeClass("sapling-loading"),Pc(t.sentenceOverlays).removeClass("sapling-loading")},function(e){Pc(t.loadingIndicator).removeClass("sapling-loading"),Pc(t.sentenceOverlays).removeClass("sapling-loading")})):this.renderUtilityData())}},{key:"removeUIElements",value:function(){Pc(this.utilityOverlay).remove()}},{key:"resetUIElements",value:function(){Pc(this.sentenceOverlays).html(""),Pc(this.utilityOverlay).addClass("sapling-utility-empty"),this.hudEl=null,Pc(this.badge.headsUpContainer).html(this.hudEl)}},{key:"_getRanges",value:function(t,e){for(var n=0,r=0,i=0,o=[];r<t.length&&n<e.length;){for(var a=t[r],s=e[n].text.indexOf(a[0],i);s<0;){if(i=0,++n===e.length)return[];s=e[n].text.indexOf(a[0],i)}var u=n;i=s;for(var c=Math.max(0,a.length-(e[n].text.length-i)),l=i+a.length;c;){if(++n===e.length)return[];l=c,c=Math.max(0,c-e[n].text.length)}var d=n;o.push({startingTextIndex:u,startingOffset:s,endingTextIndex:d,endingOffset:l,sentenceIndex:r}),l<e[n].text.length-1?i=l:(i=0,n++),r++}return o}}])&&Mc(t.prototype,e),n&&Mc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function Uc(t){switch(t){case"admiring":case"amused":case"approving":case"confident":case"eager":case"excited":case"grateful":case"joyful":case"loving":case"optimistic":case"relieved":return"joy";case"angry":case"annoyed":case"repulsed":case"disappointed":case"disapproving":return"anger";case"aware":case"neutral":case"sympathetic":return"neutral";case"confused":case"curious":case"surprised":return"surprise";case"fearful":return"fear";case"embarassed":case"mournful":case"remorseful":case"sad":case"worried":return"sadness"}return"neutral"}function zc(t){switch(Uc(t)){case"joy":case"neutral":case"surprise":case"fear":case"sadness":return ir;case"anger":return yr}}Bc(qc,"WIDTH",300),Bc(qc,"HEIGHT",50),Bc(qc,"PADDING",15);var Wc=n(216);function Gc(t){return Gc="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},Gc(t)}function $c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Yc(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yc(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Yc(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Vc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Kc(r.key),r)}}function Kc(t){var e=function(t,e){if("object"!=Gc(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Gc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Gc(e)?e:e+""}function Xc(t,e,n){return e=Zc(e),function(t,e){if(e&&("object"==Gc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jc()?Reflect.construct(e,n||[],Zc(t).constructor):e.apply(t,n))}function Jc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Jc=function(){return!!t})()}function Qc(){return Qc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Zc(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},Qc.apply(null,arguments)}function Zc(t){return Zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zc(t)}function tl(t,e){return tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tl(t,e)}var el="\n .sapling-utility-data-row .tone-feedback {\n display: flex;\n justify-content: space-between;\n width: 60px;\n height: 20px;\n }\n\n .sapling-utility-data-row.hide-feedback-buttons .tone-feedback {\n display: none;\n }\n\n .sapling-utility-data-row .tone-feedback.feedback-recorded {\n font-size: 8px;\n text-transform: uppercase;\n text-align: center;\n color: #999;\n line-height: 10px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n\n .sapling-utility-data-row .tone-name {\n text-transform: capitalize;\n }\n\n .tone-sentence-feedback.feedback-recorded {\n display: none !important;\n }\n\n .tone-sentence-feedback {\n right: -4.75em;\n top: 0px;\n display: none;\n width: 74px;\n height: 38px;\n justify-content: space-between;\n background: white;\n padding: 5px;\n border: 2px solid ".concat(ir,';\n border-radius: 6px;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n margin-left: 4px;\n padding-top: 3px;\n }\n\n .tone-sentence-feedback:before {\n content: "";\n position: absolute;\n top: 4px;\n left: 0.9em;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-right: 6px solid ').concat(ir,";\n }\n\n .tone-sentence-feedback.hide-feedback-buttons {\n justify-content: center;\n }\n\n .tone-sentence-feedback-title {\n text-transform: uppercase;\n font-size: 8px;\n width: 74px;\n text-align: center;\n }\n\n .tone-sentence-feedback-button-container {\n display: flex;\n width: 100%;\n justify-content: space-around;\n }\n\n .hide-feedback-buttons .tone-sentence-feedback-button-container {\n display: none;\n }\n\n .tone-feedback-button {\n display: flex;\n align-items: center;\n }\n\n .tone-feedback-button img {\n width: 15px;\n opacity: 0.25;\n cursor: pointer;\n padding: 1px;\n }\n\n .tone-feedback-button img:hover, .tone-feedback-button img.selected {\n opacity: 0.5;\n }\n\n .tone-feedback-button img:active {\n opacity: 1;\n }\n"),nl=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=Xc(this,e,[t,n,r])).topTone=null,i.toneData=null,i.feedbackDisplayClass="SDK"!==l.MODE||Sapling.toneFeedbackEnabled?"":"hide-feedback-buttons",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tl(t,e)}(e,t),n=e,r=[{key:"utilityName",value:function(){return"Tone"}},{key:"utilityCSS",value:function(){return"".concat(el)}},{key:"isBeta",value:function(){return!1}},{key:"isUtilityEnabled",value:function(){return gn()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;!function(t,e,n,r,i){St("request/GET_TONE",{html:m()(t,25e3),sessionId:n,context:It()},r,i)}(t,0,n,function(t){o.toneData=t.tone,r(t)},function(t){i(t)})}},{key:"_updateToneHud",value:function(t,e){var n,r=null,i=null;t.length>0&&(this.topTone=t[0],"neutral"!==this.topTone[1].toLowerCase()&&(r='<span style="padding-top: 0.1rem;">'.concat(this.topTone[2],"</span>")));var o,a=$c(e);try{for(a.s();!(o=a.n()).done;)"anger"===Uc(o.value[0][1])&&(n="Angry sentence detected",i='\n <div style="margin-left: 3px; transform: rotate(10deg); padding-top: 0.15rem;">\n <svg fill="red" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 512">\x3c!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. --\x3e<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V320c0 17.7 14.3 32 32 32s32-14.3 32-32V64zM32 480a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"/></svg>\n </div>\n ')}catch(t){a.e(t)}finally{a.f()}this.updateHud({hudEmoji:r,hudWarning:i,hudTitle:n})}},{key:"createUIElements",value:function(){var t,n,r,i,o,a=this;(t=e,n="createUIElements",r=this,o=Qc(Zc(1&(i=3)?t.prototype:t),n,r),2&i&&"function"==typeof o?function(t){return o.apply(r,t)}:o)([]),Wc(this.utilityOverlay).on("click",".tone-feedback-button img",function(t){var e=Wc(t.target),n=Wc(e).is(".selected");Wc(e).parents(".tone-feedback").find("img").removeClass("selected"),n||Wc(e).addClass("selected");var r=JSON.parse(Wc(e).parents(".sapling-tone-data-row").attr("data-tone")),i=Wc(e).is(".thumbs-up")?1:-1;Nt(a.lastQueryText,r,"overall",i,a.containerId,function(t){Wc(e).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")},function(t){Wc(e).parents(".tone-feedback").addClass("feedback-recorded").html("Feedback recorded")})})}},{key:"renderUtilityData",value:function(){var t=this,e=this.toneData,n=this.queryEl;if(e&&n){var r=e.overall,i=e.sents,o=e.results;if(r){var a=r.filter(function(t){return t[0]>.05}).sort(function(t,e){return e[0]-t[0]});this._updateToneHud(a,o);var s,u="",c=$c(a);try{for(c.s();!(s=c.n()).done;){var l=s.value,d=5*Math.round(100*l[0]/5);u+='\n <div class="sapling-utility-data-row '.concat(this.feedbackDisplayClass,"\" data-tone='").concat(JSON.stringify(l),'\'>\n <div>\n <span class="tone-emoji">').concat(l[2],'</span>\n <span class="tone-name">').concat(l[1],' -</span>\n <span class="tone-percentage">').concat(d,'%</span>\n </div>\n <div class="tone-feedback">\n <span class="tone-feedback-button"><img class="thumbs-up" src="').concat(this.assetUrls["thumbs-up-regular"],'" /></span>\n <span class="tone-feedback-button"><img class="thumbs-down" src="').concat(this.assetUrls["thumbs-down-regular"],'" /></span>\n </div>\n </div>\n ')}}catch(t){c.e(t)}finally{c.f()}Wc(this.utilityOverlay).find(".sapling-utility-data").html(u),this.prepareSentenceOverlayRender();var f=this.shadowHost.getBoundingClientRect(),p=document.createElement("sapling-sentence-tones"),g=[];this.getTextNodes(n,g);for(var v=this._getRanges(i,g),m=function(){var e=v[y],n=e.startingTextIndex,r=e.startingOffset,a=e.endingTextIndex,s=e.endingOffset,u=e.sentenceIndex,c=i[u],l="."===c.slice(-1)?5:0,d=h().includes("zendesk")?8:0,m=document.createRange();m.setStart(g[n].node,r),m.setEnd(g[a].node,s);var b=m.getClientRects(),D=b.item(b.length-1);if(null==D)return 1;var w=document.createElement("div");Wc(w).css({position:"absolute",pointerEvents:"auto",left:"".concat(D.x-f.x+D.width-l,"px"),top:"".concat(D.y-f.y-10+d,"px"),width:"20px",height:"20px",cursor:"pointer",opacity:.5,display:"flex"}),Wc(w).attr("data-sentence",c),Wc(w).attr("data-tone",JSON.stringify(o[y][0])),w.innerHTML="\n ".concat(o[y][0][2],'\n <div class="tone-sentence-feedback ').concat(t.feedbackDisplayClass,'">\n <div class="tone-sentence-feedback-title">').concat(o[y][0][1],'</div>\n <div class="tone-sentence-feedback-button-container">\n <div class="tone-feedback-button"><img class="thumbs-up" src="').concat(t.assetUrls["thumbs-up-regular"],'" /></div>\n <div class="tone-feedback-button"><img class="thumbs-down" src="').concat(t.assetUrls["thumbs-down-regular"],'" /></div>\n </div>\n </div>\n '),w.rects=[];var x,A={},E=$c(b);try{for(E.s();!(x=E.n()).done;){var S=x.value;if(!A.hasOwnProperty(JSON.stringify(S))){A[JSON.stringify(S)]=1;var _=zc(o[y][0][1].toLowerCase()),C=document.createElement("div");Wc(C).css({position:"absolute",left:"".concat(S.x-f.x-1,"px"),top:"".concat(S.y-f.y-1,"px"),width:"".concat(S.width+2,"px"),height:"".concat(S.height+2,"px"),backgroundColor:_,border:"1px solid black",borderRadius:"6px",cursor:"pointer",opacity:.1}),Wc(p).append(C),w.rects.push(C)}}}catch(t){E.e(t)}finally{E.f()}Wc(p).append(w),w.addEventListener("mouseenter",function(){Wc(w).css({opacity:1}),Wc(w).find(".tone-sentence-feedback").css({display:"flex"}),w.rects.forEach(function(t){return t.style.opacity=.25})}),w.addEventListener("mouseleave",function(){Wc(w).css({opacity:.75}),Wc(w).find(".tone-sentence-feedback").css({display:"none"}),w.rects.forEach(function(t){return t.style.opacity=.1})}),Wc(w).on("click",".tone-feedback-button img",function(e){var n=Wc(e.target),r=Wc(n).is(".selected");Wc(n).parents(".tone-sentence-feedback").find("img").removeClass("selected"),r||Wc(n).addClass("selected");var i=JSON.parse(Wc(w).attr("data-tone")),o=Wc(n).is(".thumbs-up")?1:-1;Nt(c,i,"sentence",o,t.containerId,function(t){Wc(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")},function(t){Wc(n).parents(".tone-sentence-feedback").addClass("feedback-recorded")})})},y=0;y<v.length;y++)m();Wc(this.sentenceOverlays).html("<style>".concat(el,"</style>")),Wc(this.sentenceOverlays).append(p)}}}},{key:"getTopTone",value:function(){return this.topTone}}],r&&Vc(n.prototype,r),i&&Vc(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(qc),rl=n(216);function il(t){return il="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},il(t)}function ol(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return al(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?al(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function al(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function sl(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ul(r.key),r)}}function ul(t){var e=function(t,e){if("object"!=il(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=il(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==il(e)?e:e+""}function cl(t,e,n){return e=fl(e),function(t,e){if(e&&("object"==il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ll()?Reflect.construct(e,n||[],fl(t).constructor):e.apply(t,n))}function ll(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ll=function(){return!!t})()}function dl(){return dl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=fl(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},dl.apply(null,arguments)}function fl(t){return fl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fl(t)}function pl(t,e){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pl(t,e)}var hl="\n .sapling-ai-detect-score-bar-container {\n margin: 4px 0 2px;\n height: 6px;\n background-color: #e0e0e0;\n border-radius: var(--sapling-radius-sm);\n overflow: hidden;\n width: 100%;\n }\n\n .sapling-ai-detect-score-bar {\n height: 100%;\n border-radius: var(--sapling-radius-sm);\n transition: width 0.4s ease;\n }\n\n .sapling-ai-detect-sentence-badge {\n position: absolute;\n font-size: 9px;\n font-family: var(--sapling-font);\n padding: 1px 4px;\n border-radius: var(--sapling-radius-sm);\n background: white;\n border: 1px solid currentColor;\n pointer-events: auto;\n cursor: default;\n white-space: nowrap;\n opacity: 0.75;\n line-height: 1.4;\n box-shadow: var(--sapling-shadow-chip);\n }\n\n .sapling-ai-detect-sentence-badge:hover {\n opacity: 1;\n }\n",gl=function(t){function e(t,n,r){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=cl(this,e,[t,n,r])).aiDetectionData=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pl(t,e)}(e,t),n=e,r=[{key:"utilityName",value:function(){return"AI Detect"}},{key:"utilityTitle",value:function(){return"AI Detection"}},{key:"utilityCSS",value:function(){return"".concat(hl)}},{key:"isBeta",value:function(){return!1}},{key:"isUtilityEnabled",value:function(){return un()}},{key:"getUtilityData",value:function(t,e,n,r,i){var o=this;jt(t,e,n,{source:"sdk"},function(t){o.aiDetectionData=t.aidetect,r(t)},function(t){i(t)})}},{key:"createUIElements",value:function(){var t,n,r,i,o;(t=e,n="createUIElements",r=this,o=dl(fl(1&(i=3)?t.prototype:t),n,r),2&i&&"function"==typeof o?function(t){return o.apply(r,t)}:o)([])}},{key:"renderUtilityData",value:function(){var t=this.aiDetectionData,e=this.queryEl;if(t&&e){var n=this.aiDetectionData,r=n.score,i=n.sentence_scores;if(null==r||r<0)return rl(this.utilityOverlay).find(".sapling-utility-data").html('\n <div class="sapling-utility-data-row">\n Could not score this text.\n </div>\n '),void rl(this.sentenceOverlays).html("");var o=Math.min(1,Math.max(0,r)),a=(100*o).toFixed(1),s=Q(100*o),u='\n <div class="sapling-utility-data-row">\n AI probability: <strong style="color: '.concat(s,'">').concat(a,'%</strong>\n </div>\n <div class="sapling-ai-detect-score-bar-container">\n <div class="sapling-ai-detect-score-bar" style="width: ').concat(a,"%; background-color: ").concat(s,';"></div>\n </div>\n ');if(rl(this.utilityOverlay).find(".sapling-utility-data").html(u),Array.isArray(i)&&0!==i.length){this.prepareSentenceOverlayRender();var c=this.shadowHost.getBoundingClientRect(),l=document.createElement("sapling-sentence-ai-detections"),d=[];this.getTextNodes(e,d);for(var f=i.map(function(t){return t.sentence}),p=this._getRanges(f,d),h=function(){var t=p[g],e=t.startingTextIndex,n=t.startingOffset,r=t.endingTextIndex,o=t.endingOffset,a=t.sentenceIndex,s=i[a];if(!s||"number"!=typeof s.score||s.score<0)return 1;var u=Math.min(1,s.score),f=Math.round(100*u),h=Q(f),v=document.createRange();v.setStart(d[e].node,n),v.setEnd(d[r].node,o);var m,y=v.getClientRects(),b=[],D=new Set,w=ol(y);try{for(w.s();!(m=w.n()).done;){var x=m.value,A="".concat(x.x,",").concat(x.y,",").concat(x.width,",").concat(x.height);if(!D.has(A)){D.add(A);var E=h.replace("rgb(","rgba(").replace(")",",".concat(u,")")),S=document.createElement("div");rl(S).css({position:"absolute",left:"".concat(x.x-c.x-1,"px"),top:"".concat(x.y-c.y-1,"px"),width:"".concat(x.width+2,"px"),height:"".concat(x.height+2,"px"),backgroundColor:E,border:"1px solid ".concat(lr),borderRadius:"5px",cursor:"pointer",opacity:.1}),rl(l).append(S),b.push(S)}}}catch(t){w.e(t)}finally{w.f()}var _=y.length?y[y.length-1]:null;if(_){var C=document.createElement("div");rl(C).addClass("sapling-ai-detect-sentence-badge"),rl(C).css({left:"".concat(_.x-c.x+_.width+3,"px"),top:"".concat(_.y-c.y,"px"),color:h}),C.textContent="".concat(f,"%"),C.title="".concat(f,"% AI probability"),C.addEventListener("mouseenter",function(){b.forEach(function(t){t.style.opacity=.3})}),C.addEventListener("mouseleave",function(){b.forEach(function(t){t.style.opacity=.1})}),rl(l).append(C)}},g=0;g<p.length;g++)h();rl(this.sentenceOverlays).html("<style>".concat(hl,"</style>")),rl(this.sentenceOverlays).append(l)}else rl(this.sentenceOverlays).html("")}}}],r&&sl(n.prototype,r),i&&sl(n,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,i}(qc);function vl(t,e){var n=t.editRange,r=e.editRange;return Ms(n,r)?e:Ms(r,n)||Bs(n,r)?t:Bs(r,n)?e:t}function ml(t){for(var e=t[0],n=1;n<t.length;n++)e=vl(e,t[n]);return e}function yl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Dl(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Dl(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Dl(t,e){if(t){if("string"==typeof t)return wl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wl(t,e):void 0}}function wl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var xl=!0,Al=null,El=[],Sl=null,_l=!1;function Cl(){Al&&(Al.removeEventListener("keydown",Il),Al.removeEventListener("paste",jl),Al=null),El=[],Sl=null,_l=!1,document.removeEventListener("selectionchange",Ol)}function kl(t,e,n){if(Cl(),Fe){for(var r=[],i=0,o=Object.values(n);i<o.length;i++){var a=o[i];e.edit.originalText===a.edit.originalText&&e.edit.editId!==a.edit.editId&&r.push(a.editRange)}r.length&&function(t,e,n){if(xl=!0,_l=!1,El=[],Ve(Al=t)){Sl=[e.startOffset,e.endOffset];var r,i=bl(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;El.push([o.startOffset,o.endOffset])}}catch(t){i.e(t)}finally{i.f()}}else{if(null===(Sl=q(Al,e)))return void(Al=null);var a,s=bl(n);try{for(s.s();!(a=s.n()).done;){var u=a.value,c=q(Al,u);null!==c&&El.push(c)}}catch(t){s.e(t)}finally{s.f()}}El.sort(function(t,e){return e[0]-t[0]}),Al.addEventListener("keydown",Il),Al.addEventListener("paste",jl),document.addEventListener("selectionchange",Ol)}(t,e.editRange,r)}}function Ol(t){if(Ve(Al)){var e=Sl[0],n=Sl[1];n++;var r=Al,i=r.selectionStart,o=r.selectionEnd;if(e<=i&&i<=n||e<=o&&o<=n)return}else{var a=window.getSelection();if(a){var s=a.getRangeAt(0),u=Sl[0],c=Sl[1];c++;var l=q(Al,s);if(u<=l[0]&&l[0]<=c||u<=l[1]&&l[1]<=c)return}}Cl()}function Tl(t,e){for(var n=t.length,r=Sl[1]-Sl[0],i=0;i<El.length;i++)Sl[0]<=El[i][0]&&(xl?(El[i][0]-=r,El[i][1]-=r,e||(El[i][0]+=n,El[i][1]+=n)):e?(El[i][0]--,El[i][1]--):(El[i][0]+=n,El[i][1]+=n));for(var o=0;o<El.length;o++){var a=yl(El[o],2),s=a[0],u=a[1],c=void 0;if(!Ve(Al)){c=document.createRange();var l=L(Al,0,s,Al),d=L(Al,0,u,Al);c.setStart(l.domElement,l.domOffset),c.setEnd(d.domElement,d.domOffset)}if(xl){var f="",p=-r;e||(p+=(f=t).length),Ve(Al)?zd(Al,s,u,f):Xd(c,f,Al),El[o][1]+=p,Sl[0]>s&&(Sl[0]+=p,Sl[1]+=p);for(var h=0;h<o;h++)El[h][0]+=p,El[h][1]+=p}else{if(e){if(Ve(Al)&&u>s)zd(Al,u-1,u,""),El[o][1]--;else if(c.toString().length){var g=L(Al,0,u-1,Al);c.setStart(g.domElement,g.domOffset),Xd(c,"",Al),El[o][1]--}for(var v=0;v<o;v++)El[v][0]--,El[v][1]--}else{Ve(Al)?zd(Al,u,u,t):(c.collapse(),Xd(c,t,Al)),El[o][1]+=n;for(var m=0;m<o;m++)El[m][0]+=n,El[m][1]+=n}Sl[0]>El[o][0]&&(e?(Sl[0]--,Sl[1]--):(Sl[0]+=n,Sl[1]+=n))}}if(xl&&(xl=!1,Sl[1]=Sl[0]),e?Sl[1]--:Sl[1]+=n,Ve(Al))Al.selectionStart=Sl[1],Al.selectionEnd=Sl[1];else{var y=document.createRange(),b=L(Al,0,Sl[0],Al),D=L(Al,0,Sl[1],Al);y.setStart(b.domElement,b.domOffset),y.setEnd(D.domElement,D.domOffset),Kd(y)}setTimeout(function(){return document.addEventListener("selectionchange",Ol)},0)}function Il(t){var e=t.key;if(1===e.length||"Backspace"===e){document.removeEventListener("selectionchange",Ol);var n="Backspace"===e;setTimeout(function(){_l||Tl(e,n)},10)}}function jl(t){_l=!0,document.removeEventListener("selectionchange",Ol);var e=(t.clipboardData||window.clipboardData).getData("text");setTimeout(function(){Tl(e,!1),_l=!1},10)}var Fl=n(216);function Nl(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Pl(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Pl(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Pl(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Pl(d,"constructor",c),Pl(c,"constructor",u),u.displayName="GeneratorFunction",Pl(c,i,"GeneratorFunction"),Pl(d),Pl(d,i,"Generator"),Pl(d,r,function(){return this}),Pl(d,"toString",function(){return"[object Generator]"}),(Nl=function(){return{w:o,m:f}})()}function Pl(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Pl=function(t,e,n,r){function o(e,n){Pl(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Pl(t,e,n,r)}function Rl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Ll(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ml(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Bl(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ll(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ll(t,e){if(t){if("string"==typeof t)return Hl(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hl(t,e):void 0}}function Hl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var ql={},Ul=null,zl={};function Wl(t){var e=Y(t);if(e){var n=ql[e];if(n)return Object.keys(n.edits).length}return 0}function Gl(t){var e=ql[t];if(e){var n=e.shadowHost,r=e.badge,i=e.annotationsOverlay,o=e.toneOverlay,a=e.aiDetectOverlay;n&&n.remove(),r&&r.removeUIElements(),i&&i.removeUIElements(),o&&o.removeUIElements(),a&&a.removeUIElements()}}function $l(t){var e=ql[t];if(e&&e.badge){var n=Object.keys(e.edits).length||0;e.badge.updateBadgeCount(n)}}function Yl(t){var e=ql[t];e&&e.badge&&e.badge.showThrottledState()}function Vl(t){var e=ql[t];e&&e.annotationsOverlay&&e.annotationsOverlay.updateAnnotationSummary()}function Kl(t){var e=ql[t];e&&e.toneOverlay&&e.toneOverlay.queryAndUpdate()}function Xl(t,e,n){if(n&&!zl[t]){var r=new MutationObserver(function(t){!function(t,e){var n,r=Bl(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(Fl(i.target).hasClass("notion-text-block"))return void Jl(t)}}catch(t){r.e(t)}finally{r.f()}}(e,t)});r.observe(n,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0}),zl[t]=r,wt(t,e,!1,"mutationObservers",r)}}function Jl(t){if(!("SDK"!==l.MODE&&t.hasAttribute("sapling-ignore")||Fl(t).parents(".codex-editor").length)){var e=Y(t);if(e){var n=ql[e]||{edits:{}},r=n.shadowHost,i=n.badge;if(r&&!at(r)&&(r.remove(),r=null),!r){var o=t;if(Fl(t).is("td")&&t.parentNode)o=t.parentNode.parentNode;else for(var a=o.nextSibling;a&&a.nodeType===Node.ELEMENT_NODE&&a.getAttribute("is-sapling-overlay");){var s=a;a=a.nextSibling,s.remove()}(r=document.createElement("div")).setAttribute("is-sapling-overlay",!0),Fl(r).css({"pointer-events":"none"}),Fl(o).after(r),r.attachShadow({mode:"open"});var u=document.createElement("div");if(Fl(u).addClass("tag-container"),Fl(u).css({position:"absolute",left:0,top:0}),Fl(r.shadowRoot).prepend(hc),r.shadowRoot.appendChild(u),i||(i=new Ji).createUIElements(t,r,e,n),n.badge=i,!n.annotationsOverlay&&We()&&(n.annotationsOverlay=new Nc(e,r),n.annotationsOverlay.createUIElements()),!n.toneOverlay&&gn()&&(n.toneOverlay=new nl(r,e,i),n.toneOverlay.createUIElements()),n.shadowHost=r,n.overlayDomElement=u,n.containerDomElement=t,n.textAreaId=K(t),function(t,e){var n=new MutationObserver(function(e,n){!function(t,e){var n=ql[t];if(!n)return void e.disconnect();n.shadowHost.isConnected||(e.disconnect(),bd(t))}(t,n)}),r={childList:!0,subtree:!1};n.observe(e.shadowHost.parentNode,r),e.shadowHostObserver=e}(e,n),"notion.so"===h())Xl(e,t,z(t).nonstaticParent)}var c,d=z(t).frameDimensions,f=J(t),p=getComputedStyle(t),g="visible"===p.overflowX&&"visible"===p.overflowY?"visible":"hidden",v=Math.max(f+1,100);Fl(r).css({overflow:g,"padding-bottom":"2px","z-index":v,position:d.position,left:d.left,top:d.top,height:d.height,width:d.width}),n.annotationsOverlay&&n.annotationsOverlay.queryAndUpdate(),n.toneOverlay&&n.toneOverlay.queryAndUpdate(),n.aiDetectOverlay&&n.aiDetectOverlay.queryAndUpdate(),rr(t,r),ql[e]=n,c=n,vt[e]=c}}}function Ql(t,e){return t}function Zl(t,e){var n=t.premium;if(t.category in pc){var r="background-image";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-image2"),pc[t.category][r]}if(n){if(e){var i=Mr(Dr,.15);return"linear-gradient(to right, ".concat(i,", ").concat(i,")")}return"linear-gradient(to right, ".concat(Dr,", ").concat(Dr,")")}if(e){var o=Mr(yr,.15);return"linear-gradient(to right, ".concat(o,", ").concat(o,")")}return"linear-gradient(to right, ".concat(yr,", ").concat(yr,")")}function td(t,e){var n=t.premium;if(e){if(t.category in pc){var r="background-color";return"hard_to_read"===t.category&&"hard"===t.difficulty&&(r="background-color2"),pc[t.category][r]}return n?Dr:yr}return""}function ed(t,e){if(!t.edit.fillin){t.isHover=e;var n={opacity:.85,transition:"","background-color":td(t.edit,e),"background-image":Zl(t.edit,e),"-webkit-transition":"","-ms-transition":""};e&&(n={"background-color":td(t.edit,e),"background-image":Zl(t.edit,e)},t.edit.category||(n.opacity=.15,n.transition="background-color 200ms linear",n["-webkit-transition"]="background-color 200ms linear",n["-ms-transition"]="background-color 200ms linear")),t.domElements.forEach(function(t){Fl(t).css(n)})}}function nd(t,e){var n=ql[t];if(n){var r=n.edits[e];if(r){var i=r.editRange;if(!r.edit.category||n.annotationsOverlay){var o=function(t,e){for(var n=e.shadowHost,r=[],i=t.getClientRects(),o=0;o<i.length;o+=1){var a=Ql(i[o]);r.push(E(a,n))}return r}(i,n),a=o.length-r.domElements.length;if(a>0)for(var s=function(){var i=document.createElement("span");i.classList.add("sapling-edit"),i.setAttribute("tabindex","0"),i.setAttribute("aria-label","Sapling Edit for: ".concat(r.edit.originalText,". Replacement: ").concat(r.edit.replacementText,".")),i.setAttribute("aria-keyshortcuts","Enter"),i.setAttribute("role","button"),i.setAttribute("sapling-edit-id",e),i.setAttribute("sapling-container-id",t),i.onfocus=function(){return function(t,e,n){Fl(t).on("keyup",function(t){if("Enter"===t.key){var r=ql[e],i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(!i)return;var s=i[n];t.preventDefault(),t.stopPropagation(),hd(n,e,s,a,o,!0)}})}(i,t,e)},i.onblur=function(){return function(t){Fl(t).off("keyup")}(i)},n.overlayDomElement.appendChild(i),r.domElements.push(i)},u=0;u<a;u++)s();else if(a<0)for(var c=0;c>a;c--){r.domElements.pop().remove()}for(var l=0;l<o.length;l+=1){var d=o[l],f=r.domElements[l];Fl(f).css({left:d.left,top:d.top,height:d.height,width:d.width}),r.edit.fillin?Fl(f).css({border:"1px solid ".concat(ir),"border-radius":"0.4em"}):r.edit.annotation?r.edit.annotationStyle&&Fl(f).css(r.edit.annotationStyle):Fl(f).css({"background-image":Zl(r.edit,!1)})}r.edit.category&&n.annotationsOverlay&&n.annotationsOverlay.updateAnnotationForOverlay(e,r),r.isHover&&ed(r,!0)}}}}function rd(t,e){var n=ql[t];if(n){var r=n.edits,i=n.annotationsOverlay;r[e]&&(r[e].domElements.forEach(function(t){return t.remove()}),r[e].isHover&&lc(),delete r[e],i&&i.clearAnnotationForOverlay(e))}}function id(t,e){for(var n=Y(t),r=0;r<e.length;r+=1)rd(n,e[r])}function od(t,e,n){for(var r=0,i=0;i<n.length;i+=1){var o=n[i],a=o.textContent.length;if(o.contains(e))return r+t;r+=a}return null}function ad(t,e,n,r,i){var o=t.startContainer,a=t.startOffset,s=t.endContainer,u=t.endOffset;if(!at(e)||!at(r))return null;if(null!==n){var c=L(e,0,n,r,!1,!1);c&&(o=c.domElement,a=c.domOffset)}if(null!==i){var l=L(e,0,i,r,!1,!0);l&&(s=l.domElement,u=l.domOffset)}var d=document.createRange();return!at(o)||!at(s)||o.length<=a||s.length<=u||a<0||u<0?null:(d.setStart(o,a),d.setEnd(s,u),d)}function sd(t,e){if(t in ql){var n=e.removedNodes;if(0!==n.length){var r=ql[t].edits;Object.keys(r).forEach(function(i){var o=r[i],a=o.edit,s=o.editRange,u=od(s.startOffset,s.startContainer,n),c=od(s.endOffset,s.endContainer,n);if(null!==u||null!==c){var l=e.previousSibling||e.target,d=ad(s,l,u,e.target,c);if(d&&fc(d,a,!1))r[i].editRange=d,nd(t,i);else{var f=e.target.textContent.length-function(t){for(var e=0,n=t.previousSibling;n;)e+=n.textContent.length,n=n.previousSibling;for(var r=t.nextSibling;r;)e+=r.textContent.length,r=r.nextSibling;for(var i=0;i<t.removedNodes.length;i+=1)e+=t.removedNodes[i].textContent.length;return e}(e),p=ad(s,l,u+f,e.target,c+f);p&&fc(p,a,!1)&&(r[i].editRange=p,nd(t,i))}}})}}}function ud(t,e){if(t in ql){var n=ql[t].edits;Object.keys(n).forEach(function(r){var i=n[r],o=i.edit,a=i.editRange;if(a.startContainer===e.target){if(Us(a)){var s=a.cloneRange();if(fc(s,o,!1))return void(n[r].editRange=s)}var u=e.target.length-e.oldValue.length,c=a.startOffset+u,l=a.endOffset;if(a.endContainer===e.target&&(l+=u),c>=0&&c<=a.startContainer.length&&l>=0&&l<=a.endContainer.length){var d=document.createRange();d.setStart(a.startContainer,c),d.setEnd(a.endContainer,l),fc(d,o,!1)&&(n[r].editRange=d,nd(t,r))}Us(n[r].editRange)||rd(t,r)}})}}function cd(t,e,n,r,i){return ld.apply(this,arguments)}function ld(){var t;return t=Nl().m(function t(e,n,r,i,o){var a,s,u,c,l,d,f,p,h;return Nl().w(function(t){for(;;)switch(t.n){case 0:if((a=document.createRange()).setStart(n,r),a.setEnd(i,o),s=Y(e),ql[s]){t.n=1;break}return t.a(2);case 1:u=ql[s].edits,c={},l=Object.entries(u),d=0,f=0;case 2:if(!(f<l.length)){t.n=4;break}if(p=l[f][0],at((h=l[f][1].editRange).startContainer)&&at(h.endContainer)&&Hs(h,a)&&(c[p]=u[p]),++d%100!=0){t.n=3;break}return t.n=3,new Promise(function(t){return setTimeout(t,50)});case 3:f++,t.n=2;break;case 4:return t.a(2,c)}},t)}),ld=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Ml(o,r,i,a,s,"next",t)}function s(t){Ml(o,r,i,a,s,"throw",t)}a(void 0)})},ld.apply(this,arguments)}function dd(t,e){var n=ql[t];if(!n||!n.badge||!n.badge.badge)return!1;var r=n.badge.badge[0].getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right;return a<=e.clientX&&e.clientX<=s&&i<=e.clientY&&e.clientY<=o}function fd(t,e,n){var r=null,i=ut(n);if(i){var o=Y(i);if(o)r=o;else for(var a=Fl(i).parents(),s=0;s<a.length;s++){var u=Y(a[s]);if(u){r=u;break}}}if(r&&!ql[r]&&(r=null),!r||r===e)for(var c=t.getClientRects(),l=(ql[e],0);l<c.length;l+=1){var d=Ql(c[l]);if(d.top<=n.clientY&&d.bottom>=n.clientY&&d.left<=n.clientX&&d.right>=n.clientX)return!0}return!1}function pd(){if(Ul){if(Ul.containerId in ql){var t=ql[Ul.containerId].edits;if(Ul.editId in t)ed(t[Ul.editId],!1)}Ul=null}}function hd(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=n.edit,s=n.domElements;if(n.edit.category){if(!r)return!1;if(!r.annotationsAlwaysVisible&&!r.editsVisible)return!1}else if(n.edit.fillin)return!1;return Ul&&t===Ul.editId||(pd(),ed(n,!0),Ul={editId:t,containerId:e},cc(e,a,s,i,o)),!0}function gd(t){if(!Gu)return!1;for(var e=Gu.getClientRects(),n=0;n<e.length;n+=1){var r=e[n];if(r.top<=t.clientY&&r.top+r.height>=t.clientY&&r.left<=t.clientX&&r.left+r.width>=t.clientX)return!0}return!1}function vd(t){var e=Rl(pf(),2),n=e[0],r=(e[1],Y(t)),i=ql[r];if(i){var o=i.edits;if(Ve(t))n&&n.hideControls(),r in ql&&Object.keys(o).forEach(function(e){var n=o[e],r=n.editRange,i=!1,a=Za(t,!0);r.startOffset+2<=a&&a+2<=r.endOffset&&(i=!0),i&&n.edit.fillin&&(t.setSelectionRange(r.startOffset,r.endOffset),kl(t,n,o))});else{n&&n.hideControls();var a=t.getRootNode().getSelection(),s=a.rangeCount&&a.getRangeAt(0);if(!s)return;Object.keys(o).forEach(function(e){var n=o[e],r=n.editRange,i=!1,a=!1;if(1!==r.compareBoundaryPoints(Range.START_TO_START,s)&&(i=!0),-1!==r.compareBoundaryPoints(Range.END_TO_END,s)&&(a=!0),i&&a&&n.edit.fillin){var u=window.getSelection();u.removeAllRanges(),u.addRange(r),kl(t,n,o)}})}}}function md(t){var e=!1,n=Y(t),r=ql[n];if(r){var i=r.edits,o=r.overlayDomElement,a=r.annotationsOverlay;if(i){var s=[];if(Ve(t))for(var u=0,c=Object.values(i);u<c.length;u++){var l=c[u],d=l.editRange,f=!1,p=Za(t,!0);d.startOffset<=p&&p<=d.endOffset&&(f=!0),f&&s.push(l)}else{var h;try{h=t.getRootNode().getSelection()}catch(t){return}var g=h.rangeCount&&h.getRangeAt(0);if(!g)return;for(var v=0,m=Object.values(i);v<m.length;v++){var y=m[v],b=y.editRange,D=!1,w=!1;1!==b.compareBoundaryPoints(Range.START_TO_START,g)&&(D=!0),-1!==b.compareBoundaryPoints(Range.END_TO_END,g)&&(w=!0),D&&w&&s.push(y)}}if(s.length){e=!0;var x=ml(s),A=hd(x.edit.editId,n,x,a,o);e=e||A}e||lc()}}}function yd(t){var e=ql[t];if(e){var n=e.edits,r=e.toneOverlay,i=e.aiDetectOverlay;Object.keys(n).forEach(function(e){nd(t,e)}),r&&r.syncSentenceOverlaysToScroll(),i&&i.syncSentenceOverlaysToScroll()}}function bd(t){t in ql&&(ql[t].overlayDomElement.remove(),ql[t].summaryAnnotationsContainer&&ql[t].summaryAnnotationsContainer.removeUIElements(),delete ql[t])}function Dd(t){return t in ql?ql[t].containerDomElement:null}function wd(t){return ql[t]}var xd=n(216);function Ad(t){return Ad="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},Ad(t)}var Ed=["targetRanges"];function Sd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _d(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Ad(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ad(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ad(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cd(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return kd(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(kd(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,kd(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,kd(d,"constructor",c),kd(c,"constructor",u),u.displayName="GeneratorFunction",kd(c,i,"GeneratorFunction"),kd(d),kd(d,i,"Generator"),kd(d,r,function(){return this}),kd(d,"toString",function(){return"[object Generator]"}),(Cd=function(){return{w:o,m:f}})()}function kd(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}kd=function(t,e,n,r){function o(e,n){kd(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},kd(t,e,n,r)}function Od(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Td(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Od(o,r,i,a,s,"next",t)}function s(t){Od(o,r,i,a,s,"throw",t)}a(void 0)})}}function Id(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Fd(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function jd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Fd(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fd(t,e){if(t){if("string"==typeof t)return Nd(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nd(t,e):void 0}}function Nd(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var Pd={};function Rd(t){var e=K(t);Pd[e]=Pd[e]||{};var n=Pd[e].overlayDomElement;if(n&&!at(n)&&(n.remove(),n=null),!n){for(var r=t.nextSibling;r&&r.nodeType===Node.ELEMENT_NODE&&K(r);){var i=r;r=r.nextSibling,i.remove()}(n=document.createElement("div")).setAttribute("contenteditable",!0),"SDK"===l.MODE&&n.setAttribute("sapling-ignore",!0),X(n,e),xd(t).after(n),Pd[e].overlayDomElement=n,Pd[e].textArea=t}var o=z(t).frameDimensions,a=o.width,s=o.height;if("content-box"===xd(t).css("box-sizing")){var u=parseInt(xd(t).css("padding-left"))||0,c=parseInt(xd(t).css("padding-right"))||0,d=parseInt(xd(t).css("padding-top"))||0,f=parseInt(xd(t).css("padding-bottom"))||0;a=a-u-c-(parseInt(xd(t).css("border-left-width"))||0)-(parseInt(xd(t).css("border-right-width"))||0),s=s-d-f-(parseInt(xd(t).css("border-top-width"))||0)-(parseInt(xd(t).css("border-bottom-width"))||0)}var p=document.defaultView.getComputedStyle(t);return xd(n).css({"z-index":p.getPropertyValue("z-index"),spellcheck:!1,"font-style":xd(t).css("font-style"),"font-weight":xd(t).css("font-weight"),"font-size":xd(t).css("font-size"),"font-family":xd(t).css("font-family"),"text-align":xd(t).css("text-align"),"line-height":xd(t).css("line-height"),"letter-spacing":xd(t).css("letter-spacing"),"word-spacing":xd(t).css("word-spacing"),color:"transparent",opacity:0,background:xd(t).css("background"),"overflow-x":xd(t).css("overflowX"),"overflow-y":xd(t).css("overflowY"),"background-color":"transparent","white-space":xd(t).css("whiteSpace"),"pointer-events":"none","border-top-width":xd(t).css("border-top-width"),"border-top-style":xd(t).css("border-top-style"),"border-top-color":"transparent","border-left-width":xd(t).css("border-left-width"),"border-left-style":xd(t).css("border-left-style"),"border-left-color":"transparent","box-sizing":xd(t).css("boxSizing"),padding:xd(t).css("padding"),"padding-top":xd(t).css("padding-top"),"padding-left":xd(t).css("padding-left"),overflow:xd(t).css("overflow"),display:xd(t).css("display"),position:o.position,left:o.left,top:o.top,height:s,width:a}),"input"===t.nodeName.toLowerCase()&&xd(n).css({display:"flex","align-items":"center","white-space":"nowrap",overflow:"hidden","text-overflow":"clip"}),"linkedin.com"===h()&&xd(t).css({"line-height":p.getPropertyValue("line-height")}),n}function Md(t){return t in Pd?Pd[t].textArea:null}function Bd(t,e){if(t in Pd){var n=Pd[t].overlayDomElement,r=n.firstChild,i=n.textContent,o="".concat(e,"\n");if(i!==o)if(Math.abs(o.length-i.length)>250)n.textContent=o;else if(r&&r.nodeType===Node.TEXT_NODE)for(var a=(0,ii.diffChars)(i,o),s=0,u=0;u<a.length;u+=1){var c=a[u],l=c.value.length,d=n.textContent;if(c.added)r.insertData(s,c.value),s+=l;else{if(c.value!==d.substr(s,l)){n.textContent=o;break}c.removed?r.deleteData(s,l):s+=l}}else n.textContent=o}}function Ld(t){if(t in Pd){var e=Pd[t],n=e.textArea,r=e.overlayDomElement;r.scrollTop=n.scrollTop,r.scrollLeft=n.scrollLeft,yd(Y(r))}}function Hd(t){if(t in Pd){var e=Pd[t],n=e.textArea,r=e.overlayDomElement,i=z(n).frameDimensions;xd(r).css({left:i.left,top:i.top,height:i.height,width:i.width}),yd(Y(r))}}function qd(t){var e=K(t);e&&function(t){t in Pd&&(Pd[t].overlayDomElement.remove(),delete Pd[t])}(e)}function Ud(t){var e=window.getSelection();e.removeAllRanges(),e.addRange(t),window.getSelection().setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}function zd(t,e,n,r){t.focus();var i=t.value;t.selectionStart=e,t.selectionEnd=n;var o,a=i.slice(0,e)+r+i.slice(n),s=h(),u=s.endsWith("vinted.net")||s.endsWith("vinted.com");try{s.endsWith("overleaf.com")||u||document.execCommand("insertText",!1,r)}catch(t){}if(!(o=t,o&&o.parentElement&&o.parentElement.parentElement&&o.parentElement.parentElement.classList.contains("CodeMirror")||t.value===a))if(u){var c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"),l=Object.getOwnPropertyDescriptor(t,"value"),d=c&&c.set||l&&l.set;d?d.call(t,a):t.value=a}else t.value=a;t.selectionStart=e,t.selectionEnd=e,t.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1})),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))}function Wd(t){return t.replace(/\s+/g," ").trim()}function Gd(t,e){if(!e)return 0;for(var n=0,r=t.indexOf(e);-1!==r;)n+=1,r=t.indexOf(e,r+e.length);return n}function $d(t,e,n,r){var i=Wd(n||""),o=i?Math.max(0,Gd(Wd(e),i)-Gd(Wd(r||""),i)):0;return new Promise(function(n){var r=0,a=function(){if(t&&t.isConnected){if(i){if(Gd(Wd(t.innerText),i)>o)return void n(!0)}else if(t.innerText!==e)return void n(!0);(r+=1)>=6?n(!1):setTimeout(a,25)}else n(!1)};setTimeout(a,25)})}function Yd(t,e,n,r,i){if(G(r))return Vd(t,e),Promise.resolve();Ud(t);var o=h();o.includes("gladly.")&&setTimeout(function(){Ud(t)},10);var a,s=W(r),u=n;if(s&&n){var c=function(t){t&&Array.from(t.childNodes).forEach(function(e){if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()){var n=document.createElement("span");n.setAttribute("style",l),n.textContent=e.textContent,t.replaceChild(n,e)}else if(e.nodeType===Node.ELEMENT_NODE){if("span"===e.tagName.toLowerCase()&&e.getAttribute("style"))return;c(e)}})},l=Object.entries(i).map(function(t){var e=jd(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(r,";")}).join(" "),d=document.createElement("div");d.innerHTML=n,(a=d)&&Array.from(a.querySelectorAll("p")).forEach(function(t){var e=t.innerHTML,n=document.createElement("span");n.innerHTML=e+"<br><br>",t.parentNode.replaceChild(n,t)}),c(d),u=d.innerHTML;try{r.focus(),t.deleteContents();var f=document.createDocumentFragment(),p=document.createElement("div");for(p.innerHTML=u;p.firstChild;)f.appendChild(p.firstChild);t.insertNode(f);var g=t.endContainer,v=function(t){for(var e={},n=t;n&&n!==r;){if(n.nodeType===Node.ELEMENT_NODE&&"span"===n.tagName.toLowerCase()&&n.getAttribute("style")){var i,o=Id(n.getAttribute("style").split(";").filter(Boolean));try{for(o.s();!(i=o.n()).done;){var a=jd(i.value.split(":").map(function(t){return t.trim()}),2),s=a[0],u=a[1];s&&u&&!e[s]&&(e[s]=u)}}catch(t){o.e(t)}finally{o.f()}}n=n.parentNode}return e}(g),m=Object.entries(v).map(function(t){var e=jd(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(r)}).join("; ");if(m){var y=function(t){for(var e=t;e&&e!==r;){var n=e.nextSibling;if(n)if(n.nodeType!==Node.ELEMENT_NODE||"br"!==n.tagName.toLowerCase())if(n.nodeType===Node.TEXT_NODE&&n.textContent.trim()){var i=document.createElement("span");i.setAttribute("style",m),i.textContent=n.textContent,n.parentNode.replaceChild(i,n),e=i}else if(n.nodeType!==Node.ELEMENT_NODE||n.getAttribute("style")||"inline"!==window.getComputedStyle(n).display)e=n;else{var o=document.createElement("span");o.setAttribute("style",m),n.parentNode.replaceChild(o,n),o.appendChild(n),e=o}else e=n;else e=e.parentNode}};if(g.nodeType===Node.TEXT_NODE&&g.textContent.trim()){var b=document.createElement("span");if(b.setAttribute("style",m),b.textContent=g.textContent,g.parentNode)g.parentNode.replaceChild(b,g),y(b)}else if(g.nodeType===Node.ELEMENT_NODE&&g.getAttribute("style")!=m){var D=[],w=function(t){if(t.nodeType===Node.TEXT_NODE&&t.textContent.trim())D.push(t);else if(t.nodeType===Node.ELEMENT_NODE){if("span"===t.tagName.toLowerCase()&&t.getAttribute("style")==m)return;Array.from(t.childNodes).forEach(w)}};w(g),D.forEach(function(t){var e=document.createElement("span");e.setAttribute("style",m),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}),y(g)}else y(g)}t.collapse(!1);var x=window.getSelection();return x.removeAllRanges(),x.addRange(t),r.dispatchEvent(new Event("input",{bubbles:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),document.dispatchEvent(new KeyboardEvent("keyup",{bubbles:!0})),Promise.resolve()}catch(t){}}var A=new DataTransfer;A.setData("text/plain",e),n&&A.setData("text/html","<meta charset='utf-8'>".concat(s?u:n));var E=new InputEvent("beforeinput",{inputType:"insertFromPaste",dataTransfer:A,bubbles:!0,cancelable:!0,isComposing:!1}),S=new Promise(function(n){setTimeout(Td(Cd().m(function i(){var o,a,s,u,c;return Cd().w(function(i){for(;;)switch(i.n){case 0:if(r&&r.isConnected){i.n=1;break}return n(),i.a(2);case 1:o=r.innerText,a="";try{a=t.toString()}catch(t){}try{Ud(t)}catch(t){}if(t.startContainer.dispatchEvent(E),s=!1,!E.defaultPrevented){i.n=3;break}return i.n=2,$d(r,o,e,a);case 2:s=i.v;case 3:if(u=lt(document),c=u===r||r.contains(u),!s&&r.isConnected&&c){try{Ud(t)}catch(t){}document.body.dataset.saplingSnippetInsert=!0,document.execCommand("paste"),delete document.body.dataset.saplingSnippetInsert}n();case 4:return i.a(2)}},i)})),100)});if(document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),o.includes("force.com")&&!s)for(var _=0,C=Object.entries(i);_<C.length;_++){var k=jd(C[_],2),O=k[0],T=k[1];r.style[O]=T}return S}function Vd(t,e){var n={inputType:"insertReplacementText",data:e,bubbles:!0,cancelable:!1};Ud(t),setTimeout(function(){t.startContainer.dispatchEvent(new InputEvent("beforeinput",n))},0)}function Kd(t){var e=window.getSelection();if("function"==typeof e.setBaseAndExtent)e.setBaseAndExtent(t.endContainer,t.endOffset,t.endContainer,t.endOffset);else{var n=document.createRange();n.setStart(t.endContainer,t.endOffset),e.addRange(n)}}function Xd(t,e,n){if(G(n))Vd(t,e);else{var r=h();if(r.endsWith("facebook.com")||r.endsWith("messenger.com")||r.endsWith("whatsapp.com")||r.endsWith("workplace.com")||r.endsWith("instagram.com")||(i=n.getAttribute("class"))&&i.includes("DraftEditor")||function(t){var e=t.getAttribute("class");return e&&e.includes("ql-editor")}(n)||function(t){return!!t.getAttribute("data-lexical-editor")}(n))!function(t,e){Ud(t);var n={inputType:"insertText",data:e,bubbles:!0,cancelable:!1};Ud(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),setTimeout(function(){var r=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=Math.min(i,r.nodeType===Node.TEXT_NODE?r.length:r.childNodes.length),u=Math.min(a,o.nodeType===Node.TEXT_NODE?o.length:o.childNodes.length);try{r===o?r.replaceData(s,u-s,e):(t.deleteContents(),r.insertData(s,e))}catch(t){}t.startContainer.dispatchEvent(new InputEvent("input",n)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0}))},50)}(t,e);else{var i,o,a=t.startContainer,s=t.startOffset,u=t.endContainer,c=t.endOffset,l=Math.min(s,a.nodeType===Node.TEXT_NODE?a.length:a.childNodes.length),d=Math.min(c,u.nodeType===Node.TEXT_NODE?u.length:u.childNodes.length);try{o=new StaticRange({startContainer:a,startOffset:l,endContainer:u,endOffset:d})}catch(t){}Ud(t);var f=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sd(Object(n),!0).forEach(function(e){_d(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sd(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({inputType:"insertText",data:e,bubbles:!0,cancelable:!1},o?{targetRanges:[o]}:{});try{t.startContainer.dispatchEvent(new InputEvent("beforeinput",f))}catch(t){}Kd(t),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),a===u?"function"==typeof a.replaceData?a.replaceData(l,d-l,e):(t.deleteContents(),""!==e&&t.insertNode(document.createTextNode(e))):(t.deleteContents(),"function"==typeof a.insertData?a.insertData(l,e):""!==e&&t.insertNode(document.createTextNode(e)));f.targetRanges;var p=function(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(f,Ed);t.startContainer.dispatchEvent(new InputEvent("input",p)),document.body.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0})),(function(t){return S(t).is('[class*="PSPDFKit"]')}(n)||W(n))&&(n.blur(),n.focus())}}}var Jd=n(216);function Qd(t){return Qd="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},Qd(t)}function Zd(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return tf(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tf(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function tf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ef(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,of(r.key),r)}}function rf(t,e,n){return e&&nf(t.prototype,e),n&&nf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function of(t){var e=function(t,e){if("object"!=Qd(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Qd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Qd(e)?e:e+""}var af=void 0===af?null:af,sf=void 0===sf?null:sf;function uf(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&!document.activeElement.checkVisibility())return!1;if(t&&!Ws())return!1;var e=getSelection();return e.rangeCount&&!e.isCollapsed&&e.getRangeAt(0)}function cf(t){return!(!t||!t.toString().trim()||t.toString().length>2e3)}function lf(){return"<style>/* From badge controls */\n.sapling-rephrase-button:hover .tooltiptext, .sapling-rephrase-type:hover .tooltiptext {\n display: block;\n}\n/* The tone menu opens below its button; its tooltip would just cover the\n toolbar while the menu is in use. */\n.sapling-rephrase-type-active.sapling-rephrase-type-tone:hover .tooltiptext {\n display: none;\n}\n.tooltiptext {\n z-index: 2147483647;\n display: none;\n\n width: max-content;\n max-width: 200px;\n\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n\n margin-bottom: 6px;\n padding: 4px 8px;\n\n font: 500 12px/1.4 ".concat(Br,";\n background-color: ").concat(xr,";\n color: ").concat(gr,';\n text-align: center;\n border-radius: 6px;\n user-select: none;\n pointer-events: none;\n\n}\n\n.caret-right::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 85%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: ').concat(xr,' transparent transparent transparent;\n}\n\n.caret-mid::after {\n content: " ";\n position: absolute;\n top: 100%;\n left: 50%;\n margin-left: -4px;\n border-width: 4px;\n border-style: solid;\n border-color: ').concat(xr," transparent transparent transparent;\n}\n\n.shortcut-key {\n display: inline-block;\n margin-left: 2px;\n background-color: ").concat(dr,";\n color: ").concat(gr,";\n font-family: monospace;\n padding: 0 4px;\n border-radius: 3px;\n}\n</style>")}var df=function(){function t(e){ef(this,t),this.shadowHost=e,this.rephraseButton=null,this.rephraseShortcut=null,this.rephraseSpinner=null,this.rephraseWand=null}return rf(t,[{key:"createUIElements",value:function(){var e=this;an()&&(this.rephraseButton||(Jd(this.shadowHost.shadowRoot).find(".sapling-rephrase-button").remove(),St("request/GET_REPHRASE_SHORTCUT",{},function(n){e.rephraseShortcut=n.shortcut,e.rephraseButton=Jd('\n <div class="sapling-rephrase-button">\n '.concat('<style type="text/css">\n .sapling-rephrase-button {\n z-index: 2147483646 !important;\n position: absolute;\n display: flex;\n width: '.concat(32,"px;\n height: ").concat(32,"px;\n margin: 0;\n padding: 0;\n justify-content: center;\n align-items: center;\n border-radius: ").concat(16,"px;\n background-color: ").concat(ir,";\n /* Matches --sapling-shadow-panel in design-tokens.js. */\n box-shadow: 0 8px 24px rgb(31 35 40 / 0.16), 0 1px 3px rgb(31 35 40 / 0.12);\n cursor: pointer;\n }\n .sapling-rephrase-button {\n color: ").concat(gr,";\n transition: background-color 120ms ease;\n }\n .sapling-rephrase-button:hover {\n background-color: ").concat(or,";\n }\n .sapling-icon {\n display: block;\n }\n /* Block-level so the spin transform applies (it is ignored on inline\n boxes); jQuery show()/hide() restores this display value. */\n .sapling-rephrase-wand,\n .sapling-rephrase-spinner {\n display: flex;\n }\n .sapling-rephrase-spinner {\n animation-name: spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n @keyframes spin {\n from {\n transform:rotate(0deg);\n }\n to {\n transform:rotate(360deg);\n }\n }\n</style>"),"\n ").concat(lf(),'\n <div class="tooltiptext caret-mid">\n Rephrase').concat(e.rephraseShortcut?'&nbsp;<span class="shortcut-key">'+e.rephraseShortcut+"</span>":"",'\n </div>\n <span class="sapling-rephrase-wand">').concat(pi("wand"),'</span>\n <span class="sapling-rephrase-spinner">').concat(pi("spinner"),"</span>\n </div>\n ")),e.rephraseWand=e.rephraseButton.find(".sapling-rephrase-wand").first(),e.rephraseSpinner=e.rephraseButton.find(".sapling-rephrase-spinner").first(),e.rephraseSpinner.hide();var r=e.shadowHost.shadowRoot;Jd(r).append(e.rephraseButton),e.rephraseButton.get(0).addEventListener("mousedown",function(t){1===t.which&&(af.toggleControls(),t.preventDefault(),t.stopPropagation())}),t.positionButton()},function(t){})))}},{key:"show",value:function(){var e=this;setTimeout(function(){cf(uf())&&(t.positionButton(),e.rephraseButton.fadeIn(50))},200)}},{key:"hide",value:function(){this.rephraseButton&&this.rephraseButton.hide()}}],[{key:"positionButton",value:function(){var t=uf();if(cf(t)){var e=function(){var t=document.activeElement;if(!zs(t))return null;for(;t.parentElement;){var e=t.parentElement;if(!zs(e))break;t=e}return t}();if(e){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();n.top>r.top-32?Jd("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y+window.scrollY,position:"absolute"}):Jd("sapling-rephrase-button").css({left:r.x+r.width+5+window.scrollX,top:r.y-5-32+window.scrollY,position:"absolute"})}}}}])}(),ff=function(){function t(e){ef(this,t),this.shadowHost=e,this.activeRange=null,this.rephraseContainer=null,this.rephraseCandidatesContainer=null,this.rephraseStatusMessage=null,this.rephraseType="paraphrase",this.toneMapping="straightforward",this.requestSeq=0}return rf(t,[{key:"setRephraseType",value:function(t){var e=Jd(t).attr("data-rephrase-type");this.rephraseType=e,Jd(t).parent().find(".sapling-rephrase-type-active").removeClass("sapling-rephrase-type-active"),Jd(t).addClass("sapling-rephrase-type-active"),this.updateModeLabel(),this.queryAndUpdate()}},{key:"updateModeLabel",value:function(){if(this.rephraseContainer){var t=this.rephraseContainer.find(".sapling-rephrase-type-active").first().attr("data-label")||"";if("switch_tone"===this.rephraseType){var e=this.rephraseContainer.find(".sapling-tone-mapping-active").first().text();e&&(t="Tone: ".concat(e))}this.rephraseContainer.find(".sapling-rephrase-mode-label").text(t)}}},{key:"setToneMapping",value:function(t){var e=Jd(t).attr("data-tone-mapping");this.toneMapping=e,Jd(t).parent().find(".sapling-tone-mapping-active").removeClass("sapling-tone-mapping-active"),Jd(t).addClass("sapling-tone-mapping-active"),this.updateModeLabel(),this.queryAndUpdate()}},{key:"createUIElements",value:function(){if(an()&&!this.rephraseContainer){Jd(this.shadowHost.shadowRoot).find(".sapling-rephrase-container").remove(),this.rephraseContainer=Jd('\n <div class="sapling-rephrase-container" style="display: none;">\n '.concat('<style type="text/css">\n.sapling-rephrase-container {\n z-index: 2147483646;\n display: block;\n max-width: 500px;\n min-width: 300px;\n margin: 0;\n padding: 0;\n border: 1px solid '.concat(vr,";\n border-radius: 10px;\n background-color: ").concat(pr,";\n box-shadow: ").concat(Lr,";\n /* rem follows the page root even inside shadow DOM (Canva uses 10px). */\n font: normal 400 14px/1.45 ").concat(Br,";\n color: ").concat(lr,";\n letter-spacing: normal;\n word-spacing: normal;\n text-align: left;\n text-transform: none;\n white-space: normal;\n}\n.sapling-rephrase-candidates {\n max-height: 320px;\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: 4px 0;\n scrollbar-width: thin;\n scrollbar-color: ").concat(mr," transparent;\n}\n/* Rows mirror the snippet finder's: borderless, text-colored, with the\n tinted fill + accent bar on the row under the pointer. */\n.sapling-rephrase-candidate {\n display: block;\n padding: 8px 16px;\n color: ").concat(lr,";\n pointer-events: auto;\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover {\n background-color: ").concat(ur,";\n box-shadow: inset 3px 0 0 ").concat(ir,";\n}\n.sapling-rephrase-loading,\n.sapling-rephrase-empty {\n display: block;\n padding: 8px 16px;\n color: ").concat(fr,";\n font-style: italic;\n text-align: center;\n}\n/* Same footer as the snippet finder: muted strip, logo + status on the left,\n hint on the right. The container can't clip (the tone menu overflows it),\n so the strip rounds its own corners to the container's inner radius. */\n.sapling-rephrase-status-bar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n height: 32px;\n padding: 0 16px;\n border-top: 1px solid ").concat(vr,";\n border-radius: 0 0 9px 9px;\n background-color: ").concat(hr,";\n color: ").concat(dr,";\n font-size: 11px;\n user-select: none;\n}\n.sapling-rephrase-status-left {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n}\n.sapling-rephrase-hint {\n flex: none;\n white-space: nowrap;\n}\n.sapling-rephrase-types {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 6px 8px;\n border-bottom: 1px solid ").concat(vr,";\n pointer-events: auto;\n}\n/* Icon buttons: muted at rest, text color on hover, Sapling blue on a tinted\n pill when active. No border, so selecting one doesn't shift the row. */\n.sapling-rephrase-type {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: 28px;\n min-width: 28px;\n padding: 0 6px;\n border-radius: 6px;\n color: ").concat(dr,";\n cursor: pointer;\n transition: background-color 120ms ease, color 120ms ease;\n}\n.sapling-rephrase-type:hover {\n background-color: ").concat(hr,";\n color: ").concat(lr,";\n}\n.sapling-rephrase-type-active,\n.sapling-rephrase-type-active:hover {\n background-color: ").concat(ur,";\n color: ").concat(ir,";\n}\n.sapling-icon {\n display: block;\n flex: none;\n}\n.dropdown-toggle {\n display: flex;\n align-items: center;\n gap: 1px;\n}\n.dropdown-toggle .sapling-icon + .sapling-icon {\n opacity: 0.7;\n}\n/* Names the active mode, since the icons alone don't say what you'll get. */\n.sapling-rephrase-mode-label {\n margin-left: auto;\n padding-left: 12px;\n color: ").concat(dr,";\n font-size: 12px;\n font-weight: 500;\n white-space: nowrap;\n}\n.candidate-copy-icon {\n display: inline-flex;\n visibility: hidden;\n float: right;\n margin: 2px 0 0 8px;\n padding: 3px;\n border-radius: 4px;\n color: ").concat(fr,";\n cursor: pointer;\n}\n.sapling-rephrase-candidate:hover .candidate-copy-icon {\n visibility: visible;\n}\n.candidate-copy-icon:hover {\n background-color: ").concat(pr,";\n color: ").concat(ir,';\n}\n.sapling-rephrase-logo {\n flex: none;\n width: 14px;\n height: 14px;\n background-size: cover;\n background-image: url("').concat(hm("assets/sapling-176x176.svg"),'");\n background-repeat: no-repeat;\n}\n.sapling-rephrase-status-message {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.dropdown-menu {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n margin: 0;\n padding: 3px;\n background-color: ').concat(pr,";\n border: 1px solid ").concat(vr,";\n border-radius: 3px;\n font-size: 10pt;\n font-family: ").concat(Br,";\n /* Matches --sapling-shadow-panel in design-tokens.js. */\n box-shadow: 0 8px 24px rgb(31 35 40 / 0.16), 0 1px 3px rgb(31 35 40 / 0.12);\n}\n.dropdown-menu li {\n display: block;\n padding: 5px;\n color: ").concat(lr,";\n white-space: nowrap;\n margin: 0;\n border-radius: 2px;\n}\n.dropdown-menu li:hover {\n background-color: ").concat(hr,";\n}\n.sapling-rephrase-type-active .dropdown-menu {\n list-style-type: none;\n}\n.sapling-rephrase-type-active:hover .dropdown-menu {\n display: block;\n}\n.sapling-tone-mapping-active {\n background-color: ").concat(hr,";\n}\n</style>"),"\n ").concat(lf(),'\n <div class="sapling-rephrase-types">\n <div class="sapling-rephrase-type sapling-rephrase-type-paraphrase" data-rephrase-type="paraphrase"\n data-label="Paraphrase" role="button" aria-label="Paraphrase">\n ').concat(pi("paraphrase"),'\n <div class="tooltiptext caret-mid">Paraphrase</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-formal" data-rephrase-type="informal_to_formal"\n data-label="Formal" role="button" aria-label="Make formal">\n ').concat(pi("formal"),'\n <div class="tooltiptext caret-mid">Make formal</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-split" data-rephrase-type="sentence_split"\n data-label="Split" role="button" aria-label="Split into sentences">\n ').concat(pi("scissors"),'\n <div class="tooltiptext caret-mid">Split sentences</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-shorten" data-rephrase-type="shorten"\n data-label="Shorten" role="button" aria-label="Shorten">\n ').concat(pi("shorten"),'\n <div class="tooltiptext caret-mid">Shorten</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-expand" data-rephrase-type="expand"\n data-label="Expand" role="button" aria-label="Expand">\n ').concat(pi("expand"),'\n <div class="tooltiptext caret-mid">Expand</div>\n </div>\n <div class="sapling-rephrase-type sapling-rephrase-type-tone" data-rephrase-type="switch_tone"\n data-label="Tone" role="button" aria-label="Switch tone" aria-haspopup="true">\n <div class="dropdown-toggle">\n ').concat(pi("smile")).concat(pi("chevron",12),'\n <div class="tooltiptext caret-mid">Switch tone</div>\n <div class="dropdown-menu-wrapper">\n <ul class="dropdown-menu">\n <li class="sapling-tone-mapping" data-tone-mapping="straightforward">Straightforward</li>\n <li class="sapling-tone-mapping" data-tone-mapping="professional">Professional</li>\n <li class="sapling-tone-mapping" data-tone-mapping="casual">Casual</li>\n <li class="sapling-tone-mapping" data-tone-mapping="confident">Confident</li>\n <li class="sapling-tone-mapping" data-tone-mapping="friendly">Friendly</li>\n <li class="sapling-tone-mapping" data-tone-mapping="empathetic">Empathetic</li>\n <li class="sapling-tone-mapping" data-tone-mapping="diplomatic">Diplomatic</li>\n <li class="sapling-tone-mapping" data-tone-mapping="persuasive">Persuasive</li>\n </ul>\n </div>\n </div>\n </div>\n <div class="sapling-rephrase-mode-label"></div>\n </div>\n <div class="sapling-rephrase-candidates">\n </div>\n <div class="sapling-rephrase-status-bar">\n <div class="sapling-rephrase-status-left">\n <div class="sapling-rephrase-logo"></div>\n <div class="sapling-rephrase-status-message"></div>\n </div>\n <div class="sapling-rephrase-hint">Click to replace</div>\n </div>\n </div>\n '));var t=this.shadowHost.shadowRoot;Jd(t).append(this.rephraseContainer),this.rephraseCandidatesContainer=this.rephraseContainer.find(".sapling-rephrase-candidates").first(),this.rephraseStatusMessage=this.rephraseContainer.find(".sapling-rephrase-status-message").first(),this.rephraseSpinner=this.rephraseContainer.find(".sapling-rephrase-spinner").first(),af=this,this.rephraseContainer.find(".sapling-rephrase-type").each(function(t,e){Jd(e).attr("data-rephrase-type")===af.rephraseType?Jd(e).addClass("sapling-rephrase-type-active"):Jd(e).removeClass("sapling-rephrase-type-active");Jd(e).on("mousedown",{el:e},function(t){t.preventDefault(),t.stopPropagation(),af.setRephraseType(t.data.el)})}),this.rephraseContainer.find(".sapling-tone-mapping").each(function(t,e){Jd(e).attr("data-tone-mapping")===af.toneMapping?Jd(e).addClass("sapling-tone-mapping-active"):Jd(e).removeClass("sapling-tone-mapping-active");Jd(e).on("mousedown",{el:e},function(t){t.preventDefault(),t.stopPropagation(),af.setToneMapping(t.data.el)})}),this.updateModeLabel(),this.showControls()}}},{key:"positionControls",value:function(){if(this.activeRange){var t=Jd(this.shadowHost),e=this.activeRange.getBoundingClientRect(),n=this.rephraseContainer.height(),r=this.rephraseContainer.width()||300,i=window.scrollX+8,o=window.scrollX+window.innerWidth-r-8,a=e.x+window.scrollX;o>=i&&(a=Math.min(Math.max(a,i),o)),e.y<window.innerHeight-n||e.y<n/2?t.css({left:a,top:e.y+e.height+window.scrollY,position:"absolute"}):t.css({left:a,top:e.y-n+window.scrollY-2,position:"absolute"})}}},{key:"showControls",value:function(){this.activeRange=uf(),cf(this.activeRange)&&(this.queryAndUpdate(),this.rephraseContainer.show(),this.positionControls())}},{key:"hideControls",value:function(){this.activeRange=null,this.rephraseContainer&&this.rephraseContainer.hide()}},{key:"toggleControls",value:function(){this.rephraseContainer&&(this.rephraseContainer.is(":visible")?this.hideControls():this.showControls())}},{key:"loadingOn",value:function(){var t,e;this.setStatus("Loading suggestions..."),this.rephraseCandidatesContainer.html('<div class="sapling-rephrase-loading">Loading suggestions&hellip;</div>'),null!==(t=sf)&&void 0!==t&&null!==(t=t.rephraseWand)&&void 0!==t&&t.length&&sf.rephraseWand.hide(),null!==(e=sf)&&void 0!==e&&null!==(e=e.rephraseSpinner)&&void 0!==e&&e.length&&sf.rephraseSpinner.show()}},{key:"loadingOff",value:function(){var t,e;this.setStatus("Ready."),null!==(t=sf)&&void 0!==t&&null!==(t=t.rephraseSpinner)&&void 0!==t&&t.length&&sf.rephraseSpinner.hide(),null!==(e=sf)&&void 0!==e&&null!==(e=e.rephraseWand)&&void 0!==e&&e.length&&sf.rephraseWand.show()}},{key:"queryAndUpdate",value:function(){var t=this;if(this.activeRange){this.loadingOn();var e,n,r,i,o,a,s=this.activeRange.toString(),u=this.requestSeq+=1;e=s,n=this.rephraseType,r={tone_mapping:this.toneMapping},i="TODO-SESSION-ID",o=function(e){if(u===t.requestSeq){var n=e&&e.rephrases&&e.rephrases.results;if(!Array.isArray(n))return t.loadingOff(),t.rephraseCandidatesContainer.html(""),void t.setStatus("Something went wrong. Please try again.");t.updateCandidates(n),t.loadingOff()}},a=function(e){u===t.requestSeq&&(t.loadingOff(),t.rephraseCandidatesContainer.html(""),e&&s.length>2e3?t.setStatus("Error: selected text too long"):t.setStatus("Something went wrong. Please try again."))},St("request/GET_REPHRASE",{html:m()(e,8192),mapping:n,metadata:r,sessionId:i,context:It()},o,a)}}},{key:"updateCandidates",value:function(e){var n=this;if(this.rephraseCandidatesContainer.html(""),!e.length)return this.rephraseCandidatesContainer.html('<div class="sapling-rephrase-empty">No suggestions found.</div>'),void this.positionControls();var r,i=Zd(e);try{var o=function(){var e=r.value,i=Jd('<div class="sapling-rephrase-candidate"></div>').attr("data-candidate-hash",e.hash),o=Jd("<span></span>").text(e.replacement),a=Jd('<span class="candidate-copy-icon" role="button" title="Copy" aria-label="Copy">'.concat(pi("copy",14),"</span>"));i.append(o).append(a),a.mousedown(function(e){t.copyCandidate(i,e)}),n.rephraseCandidatesContainer.append(i)};for(i.s();!(r=i.n()).done;)o()}catch(t){i.e(t)}finally{i.f()}this.rephraseCandidatesContainer.find(".sapling-rephrase-candidate").each(function(t,e){var n=e.innerText;e.addEventListener("mousedown",function(t){af.acceptCandidate(n,document.activeElement,Jd(e).attr("data-candidate-hash")),t.preventDefault(),t.stopPropagation()})}),this.positionControls()}},{key:"acceptCandidate",value:function(t,e,n){if(this.activeRange){var r=this.activeRange,i=K(e),o=Y(e)||i;i?zd(e,r.startOffset,r.endOffset,t):Xd(r,t,e),function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];St("request/POST_REPHRASE",{rephraseHash:t,context:Ot(Ot({},It(n)),r),action:i?"hover":e?"accept":"reject",sessionId:n})}(n,!0,o,{}),this.hideControls()}}},{key:"setStatus",value:function(t){this.rephraseStatusMessage.text(t)}}],[{key:"copyCandidate",value:function(t,e){e.preventDefault(),e.stopPropagation(),function(t){function e(e){e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t),e.preventDefault()}document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}(t[0].querySelector("span").innerText),af.setStatus("Text copied.")}}])}();function pf(){return[af,sf]}function hf(){af&&af.hideControls(),sf&&sf.hide()}function gf(t,e){return sf||(sf=new df(e)).createUIElements(),af||(af=new ff(t)).createUIElements(),[af,sf]}var vf=/^(\/(?:document|presentation)\/(?:u\/\d+\/)?d\/[A-Za-z0-9_-]{25,})(?:\/|$)/;function mf(t){return/\/presentation\//.test(t||"")?"Google Slides presentation":/\/document\//.test(t||"")?"Google Doc":""}function yf(t){var e;try{e=new URL(t)}catch(t){return null}var n=function(t,e){if("docs.google.com"!==t)return null;var n=vf.exec(e||"");return n?"https://docs.google.com".concat(n[1],"/export?format=txt"):null}(e.hostname,e.pathname);if(!n)return null;var r="";try{r=e.searchParams.get("resourcekey")||""}catch(t){r=""}return/^[A-Za-z0-9_-]+$/.test(r)?"".concat(n,"&resourcekey=").concat(r):n}function bf(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2e4,i="function"==typeof AbortController?new AbortController:null,o=mf(t)||"document",a=!1,s=function(t){a||(a=!0,n(t))},u=setTimeout(function(){s("Reading the ".concat(o," timed out. Please try again.")),i&&i.abort()},r);fetch(t,{credentials:"include",signal:i?i.signal:void 0}).then(function(t){var e=(t.headers.get("content-type")||"").toLowerCase();if(!t.ok||-1===e.indexOf("text/plain"))throw new Error("not-exportable");var n=function(t){var e=t||"",n="",r=/filename\*=(?:UTF-8|utf-8)''([^;]+)/.exec(e);if(r)try{n=decodeURIComponent(r[1])}catch(t){n=""}if(!n){var i=/filename="((?:[^"\\]|\\.)*)"/.exec(e);i&&(n=i[1].replace(/\\(.)/g,"$1"))}return n.replace(/\.txt$/i,"").trim()}(t.headers.get("content-disposition"));return t.text().then(function(t){return{body:t,title:n}})}).then(function(t){var n=t.body,r=t.title;if(clearTimeout(u),!a){var i=(n||"").replace(/^\uFEFF/,"").replace(/\r\n?/g,"\n");i=(i=i.replace(/[ \t]+\n/g,"\n").replace(/\n{3,}/g,"\n\n").trim()).slice(0,2097152),a=!0,e(i,r)}}).catch(function(){clearTimeout(u),s("Couldn't read this ".concat(o,". Make sure you can open it in this browser profile, then try again."))})}function Df(t){return Df="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},Df(t)}function wf(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return xf(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(xf(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,xf(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,xf(d,"constructor",c),xf(c,"constructor",u),u.displayName="GeneratorFunction",xf(c,i,"GeneratorFunction"),xf(d),xf(d,i,"Generator"),xf(d,r,function(){return this}),xf(d,"toString",function(){return"[object Generator]"}),(wf=function(){return{w:o,m:f}})()}function xf(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}xf=function(t,e,n,r){function o(e,n){xf(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},xf(t,e,n,r)}function Af(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ef(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Sf(r.key),r)}}function Sf(t){var e=function(t,e){if("object"!=Df(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Df(e)?e:e+""}var _f="sapling-ai-detect-gdoc-chip",Cf="\n :host { all: initial; }\n .chip {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 32px;\n box-sizing: border-box;\n margin: 0 8px 0 0;\n padding: 0 12px;\n border: 1px solid ".concat(cr,";\n border-radius: 16px;\n background: ").concat(pr,";\n color: ").concat(ar,";\n font: 500 13px/1 ").concat(Br,";\n white-space: nowrap;\n cursor: pointer;\n transition: background 0.15s;\n }\n .chip:hover { background: ").concat(ur,"; }\n .chip:focus-visible { outline: 2px solid ").concat(Ar,"; outline-offset: 1px; }\n .chip svg { flex: none; }\n .chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: none; }\n .chip.tone-human .dot, .chip.tone-mixed .dot, .chip.tone-ai .dot { display: inline-block; }\n .chip.tone-human .dot { background: #2da44e; }\n .chip.tone-mixed .dot { background: #d4a72c; }\n .chip.tone-ai .dot { background: ").concat(yr,"; }\n .chip.tone-human, .chip.tone-mixed, .chip.tone-ai { color: ").concat(lr,"; }\n .chip.tone-warning { color: ").concat(br,"; }\n .chip.tone-busy { cursor: progress; }\n .chip.tone-busy svg { animation: sapling-chip-spin 1s linear infinite; }\n @keyframes sapling-chip-spin { to { transform: rotate(360deg); } }\n :host(.floating) {\n position: fixed;\n left: 16px;\n bottom: 16px;\n z-index: 2147483000;\n }\n :host(.floating) .chip { margin: 0; box-shadow: ").concat(Hr,"; }\n"),kf=null;function Of(){return mf(window.location.href)||"Google Doc"}function Tf(t){return/Slides/.test(t)?Ys:$s}function If(t){return/Slides/.test(t)?"gslides":"gdoc"}var jf=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.host=e,this.state={kind:"idle"},this.settledState=this.state,this.runGeneration=0,this.ticks=0,this.intervalId=null,this.backstopId=null,this.panelRun=null;var r=e.shadowRoot,i=document.createElement("style");i.textContent=Cf,this.button=document.createElement("button"),this.button.type="button",this.button.className="chip",this.button.addEventListener("mousedown",function(t){return t.stopPropagation()}),this.button.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),n.check()}),r.append(i,this.button),this.render()},e=[{key:"setState",value:function(t){var e=this;if(this.state=t,clearTimeout(this.backstopId),"checking"===t.kind){var n=this.runGeneration;this.backstopId=setTimeout(function(){n===e.runGeneration&&"checking"===e.state.kind&&(e.runGeneration+=1,e.setState({kind:"error"}))},3e5)}else this.settledState=t;this.render()}},{key:"render",value:function(){var t=function(t,e){var n=e||"document",r=t&&t.kind;if("checking"===r)return{label:"Checking\u2026",tone:"busy",title:"Sapling is checking this ".concat(n," for AI-generated writing.")};if("result"===r){var i="Click to re-check and see sentence-level results.";if(t.lowConfidence)return{label:"AI: Inconclusive",tone:"neutral",title:"This ".concat(n," can't be scored reliably (too short, or mostly lists). ").concat(i)};var o="number"!=typeof t.score||Number.isNaN(t.score)?0:Math.max(0,Math.min(100,Math.round(t.score))),a=oa(t.verdict);return{label:a?"".concat(o,"% AI \xb7 ").concat(a):"".concat(o,"% AI"),tone:Ks({score:o,verdict:t.verdict}),title:"Sapling AI score for this ".concat(n," when you last checked it. ").concat(i)}}return"short"===r?{label:"Too short to check",tone:"neutral",title:"This ".concat(n," has fewer than 50 words, the minimum for a reliable AI detection score.")}:"unreadable"===r?{label:"Couldn't read file",tone:"warning",title:"".concat(t.message||"Couldn't read this ".concat(n,".")," Click to try again.")}:"error"===r?{label:"AI check failed",tone:"warning",title:"Sapling couldn't score this text. Click to try again."}:{label:"Check for AI",tone:"neutral",title:"Check this ".concat(n," for AI-generated writing with Sapling.")}}(this.state,Of()),e=t.label,n=t.tone,r=t.title;this.button.className="chip tone-".concat(n),this.button.title=r,this.button.setAttribute("aria-label","Sapling AI detector: ".concat(e)),this.button.textContent="";var i=document.createElement("span");i.style.display="inline-flex",i.innerHTML=pi("busy"===n?"spinner":"wand",14);var o=document.createElement("span");o.className="dot";var a=document.createElement("span");a.textContent=e,this.button.append(i,o,a)}},{key:"isAlive",value:function(){return pm()&&this.host.ownerDocument===document}},{key:"place",value:function(){var t=document.querySelector("#docs-titlebar-share-client-button");t&&t.parentNode?this.host.nextSibling===t&&this.host.parentNode===t.parentNode||(this.host.classList.remove("floating"),t.parentNode.insertBefore(this.host,t)):!(this.ticks>=8)||this.host.isConnected&&this.host.classList.contains("floating")||(this.host.classList.add("floating"),(document.body||document.documentElement).appendChild(this.host))}},{key:"isSuperseded",value:function(){var t=this;return Array.from(document.querySelectorAll(_f)).some(function(e){return e!==t.host})}},{key:"start",value:function(){var t=this;this.exportUrl=yf(window.location.href),this.place(),this.intervalId=setInterval(function(){t.ticks+=1;var e=yf(window.location.href);if(!t.isAlive()||!e||t.isSuperseded())return!e&&t.isAlive()&&t.closePanelRun(),void t.destroy();e!==t.exportUrl&&(t.exportUrl=e,t.runGeneration+=1,t.setState({kind:"idle"}),t.closePanelRun()),t.place()},1500)}},{key:"closePanelRun",value:function(){var t=this.panelRun;this.panelRun=null,t&&t.panel.isConnected()&&t.panel.currentRunGeneration()===t.generation&&t.panel.hide()}},{key:"destroy",value:function(){clearInterval(this.intervalId),clearTimeout(this.backstopId),this.runGeneration+=1,this.host.remove(),kf===this&&(kf=null)}},{key:"check",value:(r=wf().m(function t(){var e,n,r,i,o,a,s,u,c,l=this;return wf().w(function(t){for(;;)switch(t.n){case 0:if("checking"!==this.state.kind&&this.isAlive()){t.n=1;break}return t.a(2);case 1:if(e=yf(window.location.href)){t.n=2;break}return t.a(2);case 2:if(mu(),n=ju(),r=n.aiDetectSelectButton){t.n=3;break}return this.setState({kind:"error"}),t.a(2);case 3:return i=r.currentRunGeneration(),o=Of(),this.runGeneration+=1,a=this.runGeneration,s=function(){return!(a!==l.runGeneration||(yf(window.location.href)!==e||!l.isAlive()||!r.isConnected()||r.currentRunGeneration()!==i)&&(l.runGeneration+=1,l.setState(l.settledState),1))},Pt("ai_detect_".concat(If(o),"_chip_clicked"),{previous:this.settledState.kind}),this.setState({kind:"checking"}),t.n=4,new Promise(function(t){bf(e,function(e){return t({text:e})},function(e){return t({message:e})},8e3)});case 4:if(u=t.v,s()){t.n=5;break}return t.a(2);case 5:if("string"==typeof u.text){t.n=6;break}return this.setState({kind:"unreadable",message:u.message}),t.a(2);case 6:return t.n=7,new Promise(function(t){ln(window.location.hostname,t)});case 7:if(c=t.v,s()){t.n=8;break}return t.a(2);case 8:r.showContent(u.text,Tf(o),{siteEnabled:c},function(t){a===l.runGeneration&&l.setState(Xs(t,l.settledState))}),this.panelRun={panel:r,generation:r.currentRunGeneration()};case 9:return t.a(2)}},t,this)}),i=function(){var t=this,e=arguments;return new Promise(function(n,i){var o=r.apply(t,e);function a(t){Af(o,n,i,a,s,"next",t)}function s(t){Af(o,n,i,a,s,"throw",t)}a(void 0)})},function(){return i.apply(this,arguments)})}],e&&Ef(t.prototype,e),n&&Ef(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,r,i}();const Ff=Object.prototype.toString;function Nf(t,e){return Ff.call(t)===`[object ${e}]`}function Pf(t){return Nf(t,"Object")}function Rf(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function Mf(t){return t&&t.Math==Math?t:void 0}const Bf="object"==typeof globalThis&&Mf(globalThis)||"object"==typeof window&&Mf(window)||"object"==typeof self&&Mf(self)||"object"==typeof n.g&&Mf(n.g)||function(){return this}()||{};function Lf(t,e,n){const r=n||Bf,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}function Hf(){const t=Bf,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&n())>>t/4).toString(16))}function qf(){return Date.now()/1e3}const Uf=function(){const{performance:t}=Bf;if(!t||!t.now)return qf;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/1e3}();let zf;(()=>{const{performance:t}=Bf;if(!t||!t.now)return void(zf="none");const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=i<e,a=t.timing&&t.timing.navigationStart,s="number"==typeof a?Math.abs(a+n-r):e;o||s<e?i<=s?(zf="timeOrigin",t.timeOrigin):zf="navigationStart":zf="dateNow"})();const Wf="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Gf=["debug","info","warn","error","log","assert","trace"],$f={};function Yf(t){if(!("console"in Bf))return t();const e=Bf.console,n={},r=Object.keys($f);r.forEach(t=>{const r=$f[t];n[t]=e[t],e[t]=r});try{return t()}finally{r.forEach(t=>{e[t]=n[t]})}}const Vf=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Wf?Gf.forEach(n=>{e[n]=(...e)=>{t&&Yf(()=>{Bf.console[n](`Sentry Logger [${n}]:`,...e)})}}):Gf.forEach(t=>{e[t]=()=>{}}),e}(),Kf="production",Xf="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;var Jf;!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Jf||(Jf={}));class Qf{constructor(t){Qf.prototype.__init.call(this),Qf.prototype.__init2.call(this),Qf.prototype.__init3.call(this),Qf.prototype.__init4.call(this),this._state=Jf.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new Qf((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Qf((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init(){this._resolve=t=>{this._setResult(Jf.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Jf.REJECTED,t)}}__init3(){this._setResult=(t,e)=>{this._state===Jf.PENDING&&(Rf(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===Jf.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===Jf.RESOLVED&&t[1](this._value),this._state===Jf.REJECTED&&t[2](this._value),t[0]=!0)})}}}function Zf(){return Lf("globalEventProcessors",()=>[])}function tp(t,e,n,r=0){return new Qf((i,o)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const s=a({...e},n);Xf&&a.id&&null===s&&Vf.log(`Event processor "${a.id}" dropped event`),Rf(s)?s.then(e=>tp(t,e,n,r+1).then(i)).then(null,o):tp(t,s,n,r+1).then(i).then(null,o)}})}function ep(t){return np(t,new Map)}function np(t,e){if(function(t){if(!Pf(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=np(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(np(t,e))}),r}return t}function rp(t){const e=Uf(),n={sid:Hf(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return ep({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&ip(n,t),n}function ip(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Uf(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:Hf()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function op(t){return t.transaction}function ap(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:i,parent_span_id:o,status:a,tags:s,origin:u}=sp(t);return ep({data:r,op:i,parent_span_id:o,span_id:e,status:a,tags:s,trace_id:n,origin:u})}function sp(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function up(t){const{traceFlags:e}=t.spanContext();return Boolean(1&e)}function cp(t){const e=Ep();if(!e)return{};const n=function(t,e,n){const r=e.getOptions(),{publicKey:i}=e.getDsn()||{},{segment:o}=n&&n.getUser()||{},a=ep({environment:r.environment||Kf,release:r.release,user_segment:o,public_key:i,trace_id:t});return e.emit&&e.emit("createDsc",a),a}(sp(t).trace_id||"",e,Sp()),r=op(t);if(!r)return n;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:o,source:a}=r.metadata;null!=o&&(n.sample_rate=`${o}`);const s=sp(r);return a&&"url"!==a&&(n.transaction=s.description),n.sampled=String(up(r)),e.emit&&e.emit("createDsc",n),n}function lp(t,e){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=e;!function(t,e){const{extra:n,tags:r,user:i,contexts:o,level:a,transactionName:s}=e,u=ep(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const c=ep(r);c&&Object.keys(c).length&&(t.tags={...c,...t.tags});const l=ep(i);l&&Object.keys(l).length&&(t.user={...l,...t.user});const d=ep(o);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts});a&&(t.level=a);s&&(t.transaction=s)}(t,e),r&&function(t,e){t.contexts={trace:ap(e),...t.contexts};const n=op(e);if(n){t.sdkProcessingMetadata={dynamicSamplingContext:cp(e),...t.sdkProcessingMetadata};const r=sp(n).description;r&&(t.tags={transaction:r,...t.tags})}}(t,r),function(t,e){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,i),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,o)}class dp{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=fp()}static clone(t){return t?t.clone():new dp}clone(){const t=new dp;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ip(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this._span;return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const e="function"==typeof t?t(this):t;if(e instanceof dp){const t=e.getScopeData();this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&Object.keys(t.user).length&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint.length&&(this._fingerprint=t.fingerprint),e.getRequestSession()&&(this._requestSession=e.getRequestSession()),t.propagationContext&&(this._propagationContext=t.propagationContext)}else if(Pf(e)){const e=t;this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)}return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=fp(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:qf(),...t},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:e,_contexts:n,_tags:r,_extra:i,_user:o,_level:a,_fingerprint:s,_eventProcessors:u,_propagationContext:c,_sdkProcessingMetadata:l,_transactionName:d,_span:f}=this;return{breadcrumbs:t,attachments:e,contexts:n,tags:r,extra:i,user:o,level:a,fingerprint:s||[],eventProcessors:u,propagationContext:c,sdkProcessingMetadata:l,transactionName:d,span:f}}applyToEvent(t,e={},n=[]){lp(t,this.getScopeData());return tp([...n,...Zf(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=e&&e.event_id?e.event_id:Hf();if(!this._client)return Vf.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:Hf();if(!this._client)return Vf.warn("No client configured on scope - will not capture message!"),r;const i=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:Hf();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(Vf.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function fp(){return{traceId:Hf(),spanId:Hf().substring(16)}}const pp=parseFloat("7.120.4"),hp=100;class gp{constructor(t,e,n,r=pp){let i,o;this._version=r,e?i=e:(i=new dp,i.setClient(t)),n?o=n:(o=new dp,o.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version<t}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){const e=this.pushScope();let n;try{n=t(e)}catch(t){throw this.popScope(),t}return Rf(n)?n.then(t=>(this.popScope(),t),t=>{throw this.popScope(),t}):(this.popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:Hf(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Hf(),i=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:Hf();return t.type||(this._lastEventId=n),this.getScope().captureEvent(t,{...e,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=hp}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const a={timestamp:qf(),...t},s=i?Yf(()=>i(a,e)):a;null!==s&&(r.emit&&r.emit("beforeAddBreadcrumb",s,e),n.addBreadcrumb(s,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e),this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e),this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e),this.getIsolationScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=mp(this);try{t(this)}finally{mp(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return Xf&&Vf.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);if(Xf&&!n){this.getClient()?Vf.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):Vf.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),ip(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=Kf}=n&&n.getOptions()||{},{userAgent:o}=Bf.navigator||{},a=rp({release:r,environment:i,user:e.getUser(),...o&&{userAgent:o},...t}),s=e.getSession&&e.getSession();return s&&"ok"===s.status&&ip(s,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_callExtensionMethod(t,...e){const n=vp().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Xf&&Vf.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function vp(){return Bf.__SENTRY__=Bf.__SENTRY__||{extensions:{},hub:void 0},Bf}function mp(t){const e=vp(),n=wp(e);return xp(e,t),n}function yp(){const t=vp();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return bp(t)}function bp(t=vp()){return Dp(t)&&!wp(t).isOlderThan(pp)||xp(t,new gp),wp(t)}function Dp(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function wp(t){return Lf("hub",()=>new gp,t)}function xp(t,e){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0}function Ap(t,e){const n="string"==typeof e?e:void 0,r="string"!=typeof e?{captureContext:e}:void 0;return yp().captureMessage(t,n,r)}function Ep(){return yp().getClient()}function Sp(){return yp().getScope()}function _p(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=document.getElementById(e);if(i)r&&i.setAttribute("data-sapling-owner",r);else{var o=document.createElement("style");o.id=e,r&&o.setAttribute("data-sapling-owner",r),o.textContent=function(t){return"\n .".concat(t," {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-left: 8px;\n padding: 0 8px;\n height: 18px;\n border-radius: 9px;\n border: 1px solid ").concat(vr,";\n background: ").concat(hr,";\n color: ").concat(dr,";\n font-family: ").concat(Br,";\n font-size: 11px;\n font-weight: 600;\n line-height: 16px;\n vertical-align: middle;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n box-sizing: border-box;\n }\n .").concat(t,":hover { border-color: ").concat(mr,"; }\n .").concat(t,":focus-visible { outline: 2px solid ").concat(Ar,"; outline-offset: 1px; }\n .").concat(t,"::before {\n content: '';\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background: currentColor;\n opacity: 0.8;\n }\n .").concat(t,'[data-state="loading"] { font-weight: 500; }\n .').concat(t,'[data-state="loading"]::before { opacity: 0.35; }\n .').concat(t,'[data-state="human"] {\n background: ').concat(Ir,";\n border-color: ").concat(Ir,";\n color: ").concat(jr,";\n }\n .").concat(t,'[data-state="mixed"],\n .').concat(t,'[data-state="ai_assisted"] {\n background: ').concat(_r,";\n border-color: ").concat(Cr,";\n color: ").concat(kr,";\n }\n .").concat(t,'[data-state="ai"] {\n background: ').concat(Or,";\n border-color: ").concat(Or,";\n color: ").concat(br,";\n }\n .").concat(t,'[data-state="too_short"],\n .').concat(t,'[data-state="quota"],\n .').concat(t,'[data-state="error"] { font-weight: 500; }\n')}(t)+n,(document.head||document.documentElement).append(o)}}function Cp(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=document.getElementById(t);!n||e&&n.getAttribute("data-sapling-owner")!==e||n.remove()}function kp(t,e){document.querySelectorAll(".".concat(t)).forEach(function(t){e(t)&&t.remove()})}function Op(t,e){var n=e.state,r=e.label,i=e.title;t.setAttribute("data-state",n),t.textContent=r,t.setAttribute("title",i),t.setAttribute("aria-label","Sapling AI check: ".concat(r,". ").concat(i))}function Tp(t){t.stopPropagation()}function Ip(t){var e=t.cls,n=t.owner,r=t.key,i=t.initial,o=t.onOpen,a=document.createElement("span");return a.className=e,a.setAttribute("data-sapling-owner",n),a.setAttribute("data-sapling-key",r),a.setAttribute("role","button"),a.setAttribute("tabindex","0"),Op(a,i),["mousedown","mouseup","dblclick","pointerdown","pointerup"].forEach(function(t){return a.addEventListener(t,Tp)}),a.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),o(a)}),a.addEventListener("keydown",function(t){"Enter"!==t.key&&" "!==t.key&&"Spacebar"!==t.key||(t.preventDefault(),t.stopPropagation(),o(a))}),a}var jp=[{surface:"gmail",hostnames:["mail.google.com"],message:"div.adn[data-message-id], div.adn[data-legacy-message-id]",messageIdAttributes:["data-message-id","data-legacy-message-id"],body:"div.a3s",sender:"h3.iw span[email], span.gD[email]",senderEmailAttribute:"email",chipAnchor:"h3.iw",exclude:[".gmail_quote",".gmail_extra",".im","blockquote",'[id$="divRplyFwdMsg"]','[id$="divRplyFwdMsg"] ~ *',"#appendonsend","#appendonsend ~ *",".OutlookMessageHeader",".moz-cite-prefix",'[type="cite"]',".gmail_signature",'[data-smartmail="gmail_signature"]',".moz-signature",".ajR",".ajU",".adL",".yj6qo","style","script","noscript","template","head","title"],stopAt:['a[name="_MailOriginal"]','[id$="divRplyFwdMsg"]'],threadUrlPattern:/^#[^/]+\/[A-Za-z0-9_-]{16,}/}];var Fp=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DIV","DL","DT","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TFOOT","THEAD","TR","UL"]);function Np(t,e){for(var n=0;n<e.length;n+=1)try{if(t.matches(e[n]))return!0}catch(t){}return!1}function Pp(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:6e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t||void 0===t.childNodes)return"";for(var i=[],o=0,a=!1,s=function(t){i.push(t),o+=t.length},u=function(t){if(!(a||o>=n))if(3!==t.nodeType){if(1===t.nodeType)if(Np(t,r))a=!0;else if(!Np(t,e)&&!function(t){if(t.hidden||"true"===t.getAttribute("aria-hidden"))return!0;var e=t.ownerDocument&&t.ownerDocument.defaultView;if(!e||"function"!=typeof e.getComputedStyle)return!1;try{var n=e.getComputedStyle(t);return"none"===n.display||"hidden"===n.visibility}catch(t){return!1}}(t)){var i=t.tagName;if("BR"!==i){if("IMG"!==i&&"svg"!==i.toLowerCase()&&"IFRAME"!==i&&"VIDEO"!==i){var c=Fp.has(i);c?s("\n"):"TD"!==i&&"TH"!==i||s(" ");for(var l=t.firstChild;l;l=l.nextSibling)u(l);c&&s("\n")}}else s("\n")}}else s(t.nodeValue.replace(/\s+/g," "))},c=t.firstChild;c;c=c.nextSibling)u(c);return i.join("").split("\n").map(function(t){return t.replace(/[ \t\u00a0]+/g," ").trim()}).join("\n").replace(/\n{3,}/g,"\n\n").trim().slice(0,n)}function Rp(t){return Rp="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},Rp(t)}function Mp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Bp(r.key),r)}}function Bp(t){var e=function(t,e){if("object"!=Rp(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Rp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Rp(e)?e:e+""}var Lp="sapling-inline-ai-chip-aidetect",Hp="sapling-inline-ai-chip-style-aidetect",qp="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),Up="data-sapling-inline-badges-owner-aidetect",zp=1500,Wp=8e3,Gp=new Set(["error","quota"]),$p=[6e3,9e3],Yp=null;function Vp(t,e){try{Pt(t,e)}catch(t){}}function Kp(){return(wn()||"").trim().toLowerCase()}function Xp(){return pm()&&!!document.documentElement&&document.documentElement.getAttribute(Up)===qp}function Jp(t){var e=!1,n=null,r=function(r){if(!e){e=!0,clearTimeout(n);try{var i=Ho(r,t);s={},c={v:1,entries:i},(u=Bp(u=ko))in s?Object.defineProperty(s,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):s[u]=c,o=s,"SDK"!==l.MODE&&chrome.storage.local.set(o,function(){chrome.runtime.lastError,a&&a()})}catch(t){}var o,a,s,u,c}};n=setTimeout(function(){return r([])},zp);try{ym([ko],function(t){var e=t&&t[ko];r(e&&Array.isArray(e.entries)?e.entries:[])})}catch(t){r([])}}var Qp=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.site=e,this.exclusions={senders:[],domains:[]},this.savedOptIn=void 0,this.policyRejected=!1,this.siteEnabled=!0,this.signedIn=!0,this.accountEmail=Kp(),this.running=!1,this.observer=null,this.scanTimer=null,this.persistTimer=null,this.recheckTimer=null,this.recheckAt=null,this.shownKeys=new Set,this.queuedSenders=new Map,this.reportedMisses=new Set,this.missingMessagesSince=null,this.missingBodiesSince=null,this.scanner=Uo({surface:e.surface,send:function(t,e,r){var i=n.accountEmail;Ft(t.items,t.surface,e,function(t){var e=t&&t.err||t||{};r(e),Kt(e)&&i===n.accountEmail&&(n.policyRejected=!0,n.applyGates())})},onCacheChange:function(){return n.schedulePersist()}}),this.onMutation=function(){return n.scheduleScan()}},e=[{key:"setExclusions",value:function(t){var e=this;this.exclusions=function(t){var e=[],n=[];return"string"!=typeof t||t.split(/[\n,;]+/).forEach(function(t){if(!(e.length+n.length>=200)){var r=t.trim().toLowerCase();if(r){var i=r.match(/<([^<>\s]+)>/);i&&(r=Ao(i,2)[1]),r.startsWith("*.")&&(r=r.slice(2)),r.startsWith("@")&&(r=r.slice(1)),(r=r.replace(/\.+$/,""))&&!/\s/.test(r)&&(r.includes("@")?e.includes(r)||e.push(r):r.includes(".")&&!n.includes(r)&&n.push(r))}}}),{senders:e,domains:n}}(t||""),this.queuedSenders.forEach(function(t,n){jo(t,e.exclusions)&&(e.scanner.cancel(n),e.scanner.isAwaiting(n)||e.queuedSenders.delete(n))})}},{key:"setOptedIn",value:function(t){this.savedOptIn=t,this.applyGates()}},{key:"isOptedIn",value:function(){return pn(this.savedOptIn)}},{key:"isPolicyAllowed",value:function(){return!this.policyRejected&&!fn(this.site.surface)}},{key:"setSiteEnabled",value:function(t){this.siteEnabled=t,this.applyGates()}},{key:"setSignedIn",value:function(t){this.signedIn=t,this.policyRejected=!1,t&&this.syncAccount(),this.applyGates()}},{key:"syncAccount",value:function(){var t=Kp();if(t&&t!==this.accountEmail){this.accountEmail=t,this.policyRejected=!1;var e=this.running;e&&this.stop(),this.scanner.resetAccountState(),this.queuedSenders.clear(),e&&this.applyGates()}}},{key:"applyGates",value:function(){this.isOptedIn()&&this.siteEnabled&&this.signedIn&&this.isPolicyAllowed()?this.start():this.running&&this.stop()}},{key:"start",value:function(){var t=this;if(!this.running){this.running=!0,_p(Lp,Hp,"",qp);var e=!1,n=function(){if(!e&&t.running){e=!0;try{t.observer=new MutationObserver(t.onMutation),t.observer.observe(document.body||document.documentElement,{childList:!0,subtree:!0})}catch(e){t.observer=null}t.scan()}},r=setTimeout(n,zp);try{ym([ko],function(e){clearTimeout(r);var i=e&&e[ko];i&&Array.isArray(i.entries)&&t.scanner.importCache(i.entries),n()})}catch(t){clearTimeout(r),n()}}}},{key:"stop",value:function(){var t=this;this.running=!1,this.observer&&(this.observer.disconnect(),this.observer=null),null!==this.scanTimer&&(clearTimeout(this.scanTimer),this.scanTimer=null),null!==this.recheckTimer&&(clearTimeout(this.recheckTimer),this.recheckTimer=null,this.recheckAt=null),this.scanner.cancelPending(),this.queuedSenders.forEach(function(e,n){t.scanner.isAwaiting(n)||t.queuedSenders.delete(n)}),kp(Lp,function(t){return t.getAttribute("data-sapling-owner")===qp}),Cp(Hp,qp)}},{key:"scheduleRecheck",value:function(t){var e=this;!this.running||null!==this.recheckAt&&this.recheckAt<=t||(null!==this.recheckTimer&&clearTimeout(this.recheckTimer),this.recheckAt=t,this.recheckTimer=setTimeout(function(){e.recheckTimer=null,e.recheckAt=null,e.scheduleScan()},Math.max(0,t-Date.now())+250))}},{key:"scheduleScan",value:function(){var t=this;this.running&&null===this.scanTimer&&(this.scanTimer=setTimeout(function(){t.scanTimer=null,t.scan()},500))}},{key:"schedulePersist",value:function(){var t=this;null===this.persistTimer&&(this.persistTimer=setTimeout(function(){t.persistTimer=null;var e=t.scanner.exportCache(),n=!1,r=null,i=function(t){n||(n=!0,clearTimeout(r),t||Jp(e))};r=setTimeout(function(){return i(!1)},zp);try{Dm({action:"event/AI_DETECT_INLINE_PERSIST_CACHE",entries:e},function(t){return i(!(!t||!t.success))},function(){return i(!1)})}catch(t){i(!1)}},2e3))}},{key:"reportSelectorMiss",value:function(t){if(!this.reportedMisses.has(t)){this.reportedMisses.add(t);var e="aidetect inline badges: ".concat(this.site.surface,' selector "').concat(t,'" matched nothing');try{Ap(e,"warning")}catch(t){}}}},{key:"checkForMissingMessages",value:function(t){var e=this,n=this.site.threadUrlPattern;if(!(n&&n.test(window.location.hash||"")&&document.querySelector('[role="main"]'))||t>0)this.missingMessagesSince=null;else{var r=Date.now();null===this.missingMessagesSince?(this.missingMessagesSince=r,setTimeout(function(){return e.scheduleScan()},8100)):r-this.missingMessagesSince>=Wp&&this.reportSelectorMiss("message")}}},{key:"checkForMissingBodies",value:function(t,e){var n=this;if(!t||e>0)this.missingBodiesSince=null;else{var r=Date.now();null===this.missingBodiesSince?(this.missingBodiesSince=r,setTimeout(function(){return n.scheduleScan()},8100)):r-this.missingBodiesSince>=Wp&&this.reportSelectorMiss("body")}}},{key:"scan",value:function(){var t=this;if(this.running)if(Xp())if(Be())this.setSignedIn(!1);else if(Kp()&&Kp()!==this.accountEmail)this.syncAccount();else{var e;kp(Lp,function(t){return t.getAttribute("data-sapling-owner")!==qp}),_p(Lp,Hp,"",qp);try{e=document.querySelectorAll(this.site.message)}catch(t){e=[]}if(this.checkForMissingMessages(e.length),e.length){var n=function(){var t=new Set,e=Kp();e&&t.add(e);var n=(document.title||"").match(/[^\s<>()"']+@[^\s<>()"']+\.[a-z]{2,}/i);return n&&t.add(n[0].toLowerCase()),t}(),r=0;e.forEach(function(e){t.processMessage(e,n)&&(r+=1)}),this.checkForMissingBodies(e.length,r)}else this.missingBodiesSince=null}else this.stop()}},{key:"processMessage",value:function(t,e){var n=this.site,r=t.querySelector(n.body);if(!r)return!1;var i=t.querySelector(n.chipAnchor),o=t.querySelector(n.sender);if(!i||!o)return this.reportSelectorMiss(i?"sender":"chipAnchor"),!0;var a=i.querySelector(".".concat(Lp)),s=(o.getAttribute(n.senderEmailAttribute)||"").trim().toLowerCase();if(s&&e.has(s)||jo(s,this.exclusions))return a&&(this.scanner.cancel(a.getAttribute("data-sapling-key")),a.remove()),!0;var u=function(t,e){if(!t||!e)return"";for(var n=0;n<e.messageIdAttributes.length;n+=1){var r=t.getAttribute(e.messageIdAttributes[n]);if(r&&r.trim())return"".concat(e.surface,":").concat(r.trim())}return""}(t,n),c=a&&"1"===a.getAttribute("data-sapling-local-short"),l=a&&Gp.has(a.getAttribute("data-state"))&&!a.hasAttribute("data-sapling-retrying"),d=l?Number(a.getAttribute("data-sapling-retry-at")||0):0,f=l&&Date.now()>=d;l&&!f&&this.scheduleRecheck(d);var p=a&&a.getAttribute("data-sapling-key");if(a&&u&&p===u&&!c&&!f)return!0;var h=Pp(r,n.exclude,void 0,n.stopAt);if(c&&h.length<50)return!0;var g=u||"".concat(n.surface,":h:").concat(Bo("".concat(s,"\n").concat(h)));if(a){if(p===g&&f)return a.setAttribute("data-sapling-retrying","1"),this.requestChip(a,g,h,s),!0;if(p===g&&!c)return!0;c&&this.shownKeys.delete(a.getAttribute("data-sapling-key")),a.remove()}var v=this.createChip(g);return h.length<50&&v.setAttribute("data-sapling-local-short","1"),i.append(v),this.requestChip(v,g,h,s),!0}},{key:"requestChip",value:function(t,e,n,r){var i=this,o=!0;this.scanner.request(e,n,function(n){i.queuedSenders.delete(e),i.renderChip(t,e,n,o)}),o=!1,this.scanner.isAwaiting(e)&&this.queuedSenders.set(e,r)}},{key:"createChip",value:function(t){var e=this;return Ip({cls:Lp,owner:qp,key:t,initial:Mo(null),onOpen:function(t){return e.openChip(t)}})}},{key:"renderChip",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.isConnected&&t.getAttribute("data-sapling-key")===e){t.removeAttribute("data-sapling-retrying");var i=this.scanner.getBlock(),o=Mo(n,{resetAt:i&&i.resetAt});if(Op(t,o),Gp.has(o.state)){var a=i?i.until:Date.now()+To;t.setAttribute("data-sapling-retry-at",String(a)),this.scheduleRecheck(a)}else t.removeAttribute("data-sapling-retry-at");this.shownKeys.has(e)||(this.shownKeys.add(e),Vp("ai_detect_inline_badge_shown",{surface:this.site.surface,state:o.state,cached:r}))}}},{key:"openChip",value:function(t){if(this.running&&Xp()){var e=t.closest(this.site.message),n=e&&e.querySelector(this.site.body),r=n?Pp(n,this.site.exclude,1/0,this.site.stopAt):"";Vp("ai_detect_inline_badge_opened",{surface:this.site.surface,state:t.getAttribute("data-state")||""}),mu();var i=ju().aiDetectSelectButton;i&&i.showContent(r,"".concat(this.site.surface," inline badge"))}}}],e&&Mp(t.prototype,e),n&&Mp(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function Zp(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.hostname;if(l.AI_DETECT_ANYWHERE_EXTENSION&&"SDK"!==l.MODE&&!Yp){0;var e,n,r,i,o,a=function(t){return t&&jp.find(function(e){return e.hostnames.includes(t)})||null}(t);if(a&&function(){try{return window.top===window}catch(t){return!1}}()&&document.documentElement)if(!Be()&&pm())Yp=new Qp(a),document.documentElement.setAttribute(Up,qp),Yp.siteEnabled=cn(),function(t){try{chrome.storage.onChanged.addListener(function(e,n){"sync"===n&&Yp&&(e[t]&&Yp.setSiteEnabled(!1!==e[t].newValue),e[Co]&&(Yp.setExclusions(e[Co].newValue),Yp.scan()),e[_o]&&Yp.setOptedIn(e[_o].newValue))})}catch(t){}}("aiDetectEnabled-".concat(t)),e=function(t){Yp.setExclusions(t[Co]),Yp.setOptedIn(t[_o])},n=!1,r=null,i=function(t){n||(n=!0,clearTimeout(r),e(t))},o=function(t){if(!(n||t>=$p.length)){r=setTimeout(function(){return o(t+1)},$p[t]);try{vm([_o,Co],function(t){i(t||{})})}catch(t){i({})}}},o(0)}}Promise.resolve();function th(t){return th="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},th(t)}function eh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nh(r.key),r)}}function nh(t){var e=function(t,e){if("object"!=th(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=th(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==th(e)?e:e+""}var rh="sapling-feed-ai-chip-aidetect",ih="sapling-feed-ai-chip-style-aidetect",oh="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),ah="data-sapling-feed-badges-owner-aidetect",sh=[6e3,9e3],uh=new Set(["error","quota"]),ch="\n .".concat(zo," {\n display: block;\n margin: 6px 0 2px;\n line-height: 18px;\n }\n .").concat(zo," .").concat(rh," { margin-left: 0; }\n"),lh=null;function dh(t,e){try{Pt(t,e)}catch(t){}}function fh(){return(wn()||"").trim().toLowerCase()}function ph(){return pm()&&!!document.documentElement&&document.documentElement.getAttribute(ah)===oh}var hh=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.site=e,this.savedEnabled=void 0,this.policyRejected=!1,this.siteDisabled=!1,this.hostEnabled=!0,this.signedIn=!0,this.accountEmail=fh(),this.muted=function(){try{return"1"===window.sessionStorage.getItem(Xo)}catch(t){return!1}}(),this.running=!1,this.cacheLoaded=!1,this.mutationObserver=null,this.intersectionObserver=null,this.discoverTimer=null,this.persistTimer=null,this.mixTimer=null,this.mixIncrements={},this.recheckTimer=null,this.recheckAt=null,this.pageListening=!1,this.observed=new WeakSet,this.dwellTimers=new Map,this.visiblePosts=new Set,this.awaitingText=new Set,this.shownKeys=new Set,this.mixedKeys=new Set,this.reportedMisses=new Set,this.postsSeen=0,this.postsWithText=0,this.scanner=Uo({surface:"feed",send:function(t,e,r){var i=n.accountEmail;Ft(t.items,t.surface,e,function(t){var e=t&&t.err||t||{};r(e),Kt(e)&&i===n.accountEmail&&(n.policyRejected=!0,n.refresh())})},onCacheChange:function(){return n.schedulePersist()}})},(e=[{key:"shouldRun",value:function(){return this.isScannerEnabled()&&!this.muted}},{key:"isScannerEnabled",value:function(){return this.isOptedIn()&&!this.siteDisabled&&this.hostEnabled&&this.signedIn&&this.isPolicyAllowed()}},{key:"isOptedIn",value:function(){return pn(this.savedEnabled)}},{key:"isPolicyAllowed",value:function(){return!this.policyRejected&&!fn("feed")}},{key:"setHostEnabled",value:function(t){this.hostEnabled=t,this.refresh()}},{key:"setSignedIn",value:function(t){this.signedIn=t,this.policyRejected=!1,t&&this.syncAccount(),this.refresh()}},{key:"syncAccount",value:function(){var t=fh();t&&t!==this.accountEmail&&(this.accountEmail=t,this.policyRejected=!1,this.running&&this.stop(),this.scanner.resetAccountState())}},{key:"applySettings",value:function(t){var e,n,r=t.disabledSites;"enabled"in t&&(this.savedEnabled=t.enabled),void 0!==r&&(this.siteDisabled=(e=this.site.id,n=r,Array.isArray(n)&&n.includes(e))),this.refresh()}},{key:"setMuted",value:function(t){this.muted=t,function(t){try{t?window.sessionStorage.setItem(Xo,"1"):window.sessionStorage.removeItem(Xo)}catch(t){}}(t),this.refresh()}},{key:"refresh",value:function(){this.shouldRun()?this.start():this.stop()}},{key:"start",value:function(){var t=this;if(!this.running&&ph()){this.running=!0,this.listenPage(),_p(rh,ih,ch,oh);var e=function(){if(t.running){try{t.intersectionObserver=new IntersectionObserver(function(e){return t.onIntersect(e)},{threshold:[0,.5]})}catch(e){t.intersectionObserver=null}try{t.mutationObserver=new MutationObserver(function(){return t.scheduleDiscover()}),t.mutationObserver.observe(document.body||document.documentElement,{childList:!0,subtree:!0,characterData:!0})}catch(e){t.mutationObserver=null}t.discover()}};if(this.cacheLoaded)e();else{var n=!1,r=function(){n||(n=!0,t.cacheLoaded=!0,e())},i=setTimeout(r,1500);try{ym([Ko],function(e){clearTimeout(i);var n=e&&e[Ko];n&&Array.isArray(n.entries)&&t.scanner.importCache(n.entries),r()})}catch(t){clearTimeout(i),r()}}}}},{key:"stop",value:function(){this.running=!1,this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null),this.observed=new WeakSet,this.dwellTimers.forEach(function(t){return clearTimeout(t)}),this.dwellTimers.clear(),this.visiblePosts.clear(),this.awaitingText.clear(),null!==this.recheckTimer&&(clearTimeout(this.recheckTimer),this.recheckTimer=null,this.recheckAt=null),this.scanner.cancelPending(),null!==this.discoverTimer&&(clearTimeout(this.discoverTimer),this.discoverTimer=null),document.querySelectorAll(".".concat(zo)).forEach(function(t){t.getAttribute("data-sapling-owner")===oh&&t.remove()}),Cp(ih,oh)}},{key:"scheduleDiscover",value:function(){var t=this;this.running&&null===this.discoverTimer&&(this.discoverTimer=setTimeout(function(){t.discoverTimer=null,t.discover()},750))}},{key:"schedulePersist",value:function(){var t=this;null===this.persistTimer&&(this.persistTimer=setTimeout(function(){return t.flushPersist()},2e3))}},{key:"flushPersist",value:function(){if(null!==this.persistTimer){clearTimeout(this.persistTimer),this.persistTimer=null;try{chrome.runtime.sendMessage({action:"event/AI_DETECT_FEED_CACHE_MERGE",entries:this.scanner.exportCache()},function(){chrome.runtime.lastError})}catch(t){}}}},{key:"listenPage",value:function(){var t=this;if(!this.pageListening){this.pageListening=!0;try{window.addEventListener("pagehide",function(){return t.flushPending()}),document.addEventListener("visibilitychange",function(){return t.onVisibilityChange()})}catch(t){}}}},{key:"flushPending",value:function(){this.flushPersist(),this.flushMix()}},{key:"onVisibilityChange",value:function(){var t=this;if(document.hidden)return this.flushPending(),this.dwellTimers.forEach(function(t){return clearTimeout(t)}),this.dwellTimers.clear(),void this.awaitingText.clear();this.running&&this.intersectionObserver&&Array.from(this.visiblePosts).forEach(function(e){t.intersectionObserver.unobserve(e),t.intersectionObserver.observe(e)})}},{key:"scheduleRecheck",value:function(t){var e=this;!this.running||null!==this.recheckAt&&this.recheckAt<=t||(null!==this.recheckTimer&&clearTimeout(this.recheckTimer),this.recheckAt=t,this.recheckTimer=setTimeout(function(){e.recheckTimer=null,e.recheckAt=null,e.running&&!document.hidden&&Array.from(e.visiblePosts).forEach(function(t){return e.processPost(t)})},Math.max(0,t-Date.now())+250))}},{key:"reportSelectorMiss",value:function(t){if(!this.reportedMisses.has(t)){this.reportedMisses.add(t);var e="aidetect feed badges: ".concat(this.site.id,' selector "').concat(t,'" matched nothing');try{Ap(e,"warning")}catch(t){}}}},{key:"discover",value:function(){var t=this;if(this.running)if(ph())if(Be())this.setSignedIn(!1);else{var e;kp(rh,function(t){return t.getAttribute("data-sapling-owner")!==oh}),_p(rh,ih,ch,oh);try{e=document.querySelectorAll(this.site.post)}catch(t){e=[]}e.forEach(function(e){t.observed.has(e)?e.getAttribute("data-sapling-feed-key")&&!t.hasOwnChip(e)&&t.processPost(e):(t.observed.add(e),t.intersectionObserver&&t.intersectionObserver.observe(e))}),document.hidden||Array.from(this.awaitingText).forEach(function(e){return t.processPost(e)})}else this.stop()}},{key:"hasOwnChip",value:function(t){var e=this;return Array.from(t.querySelectorAll(".".concat(rh))).some(function(n){return n.closest(e.site.post)===t})}},{key:"onIntersect",value:function(t){var e=this;t.forEach(function(t){var n=t.target,r=t.isIntersecting,i=t.intersectionRatio,o=r&&i>=.5,a=e.dwellTimers.get(n);if(!o)return e.visiblePosts.delete(n),e.awaitingText.delete(n),void(a&&(clearTimeout(a),e.dwellTimers.delete(n)));e.visiblePosts.add(n),a||document.hidden||e.dwellTimers.set(n,setTimeout(function(){e.dwellTimers.delete(n),document.hidden||e.processPost(n)},600))})}},{key:"processPost",value:function(t){var e=this;if(this.awaitingText.delete(t),this.running&&t.isConnected)if(ph()){var n=this.site,r=$o(t,n);if(t.hasAttribute("data-sapling-feed-seen")||(t.setAttribute("data-sapling-feed-seen","1"),this.postsSeen+=1,r?this.postsWithText+=1:this.postsSeen>=30&&0===this.postsWithText&&this.reportSelectorMiss("text")),r){var i=r.querySelector(".".concat(rh)),o=Pp(r,n.exclude);if(function(t){return(t||"").trim().split(/\s+/).filter(Boolean).length}(o)<=50)t.getAttribute("data-sapling-feed-key")||this.awaitingText.add(t);else{var a=function(t,e){if(!t||!e)return"";try{var n=e.getId(t);return n?"".concat(e.id,":").concat(n):""}catch(t){return""}}(t,n),s=a||"".concat(n.id,":h:").concat(Bo(o));if(i){if(i.getAttribute("data-sapling-key")===s&&i.getAttribute("data-sapling-owner")===oh){if(!uh.has(i.getAttribute("data-state"))||i.hasAttribute("data-sapling-retrying"))return;var u=Number(i.getAttribute("data-sapling-retry-at")||0);return Date.now()<u?void this.scheduleRecheck(u):(i.setAttribute("data-sapling-retrying","1"),void this.requestChip(i,s,o))}(i.closest(".".concat(zo))||i).remove()}t.setAttribute("data-sapling-feed-key",s);var c=document.createElement("div");c.className=zo,c.setAttribute("data-sapling-owner",oh);var l=Ip({cls:rh,owner:oh,key:s,initial:Mo(null),onOpen:function(t){return e.openChip(t)}});c.append(l),r.append(c),this.requestChip(l,s,o)}}else this.awaitingText.add(t)}else this.stop()}},{key:"requestChip",value:function(t,e,n){var r=this,i=!0;this.scanner.request(e,n,function(n){return r.renderChip(t,e,n,i)}),i=!1}},{key:"renderChip",value:function(t,e,n,r){if(t.isConnected&&t.getAttribute("data-sapling-key")===e){t.removeAttribute("data-sapling-retrying");var i=this.scanner.getBlock(),o=Mo(n,{resetAt:i&&i.resetAt});if(Op(t,o),uh.has(o.state)){var a=i?i.until:Date.now()+To;t.setAttribute("data-sapling-retry-at",String(a)),this.scheduleRecheck(a)}else t.removeAttribute("data-sapling-retry-at");r||!Jo.includes(o.state)||this.mixedKeys.has(e)||(this.mixedKeys.add(e),this.mixIncrements[o.state]=(this.mixIncrements[o.state]||0)+1,this.scheduleMixFlush()),this.shownKeys.has(e)||(this.shownKeys.add(e),dh("ai_detect_feed_badge_shown",{surface:"feed",site:this.site.id,state:o.state,cached:!!r}))}}},{key:"scheduleMixFlush",value:function(){var t=this;null===this.mixTimer&&(this.mixTimer=setTimeout(function(){return t.flushMix()},5e3))}},{key:"flushMix",value:function(){if(null!==this.mixTimer){clearTimeout(this.mixTimer),this.mixTimer=null;var t=this.mixIncrements;this.mixIncrements={};try{chrome.runtime.sendMessage({action:"event/AI_DETECT_FEED_MIX_ADD",increments:t},function(){chrome.runtime.lastError})}catch(t){}}}},{key:"openChip",value:function(t){if(this.running&&ph()){var e=t.closest(this.site.post),n=e&&$o(e,this.site),r=n?Pp(n,this.site.exclude,1/0):"";dh("ai_detect_feed_badge_opened",{surface:"feed",site:this.site.id,state:t.getAttribute("data-state")||""}),mu();var i=ju().aiDetectSelectButton;i&&i.showContent(r,"".concat(this.site.id," feed badge"))}}}])&&eh(t.prototype,e),n&&eh(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function gh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.hostname;if(l.AI_DETECT_ANYWHERE_EXTENSION&&"SDK"!==l.MODE&&!lh){0;var e,n,r,i,o,a=function(t){return t&&Go.find(function(e){return e.hostnames.includes(t)})||null}(t);if(a&&function(){try{return window.top===window}catch(t){return!1}}()&&document.documentElement)if(!Be()&&pm())lh=new hh(a),document.documentElement.setAttribute(ah,oh),lh.hostEnabled=cn(),function(t){try{chrome.storage.onChanged.addListener(function(e,n){if("sync"===n&&lh&&ph()){e[t]&&lh.setHostEnabled(!1!==e[t].newValue);var r={};e[Yo]&&(r.enabled=e[Yo].newValue),e[Vo]&&(r.disabledSites=e[Vo].newValue||[]),Object.keys(r).length&&lh.applySettings(r)}}),chrome.runtime.onMessage.addListener(function(t,e,n){return!!(t&&"event/AI_DETECT_FEED_TAB_MUTE"===t.action&&lh&&ph())&&("boolean"==typeof t.mute&&t.mute!==lh.muted&&(lh.setMuted(t.mute),dh("ai_detect_feed_tab_muted",{surface:"feed",site:lh.site.id,muted:t.mute})),n({muted:lh.muted,site:lh.site.id,label:lh.site.label,enabled:lh.isScannerEnabled()}),!1)})}catch(t){}}("aiDetectEnabled-".concat(t)),e=function(t){t&&lh.applySettings({enabled:t[Yo],disabledSites:t[Vo]||[]})},n=!1,r=null,i=function(t){n||(n=!0,clearTimeout(r),e(t))},o=function(t){if(!(n||t>=sh.length)){r=setTimeout(function(){return o(t+1)},sh[t]);try{vm([Yo,Vo],function(t){i(t||{})})}catch(t){i(null)}}},o(0)}}n(216);function vh(t){return vh="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},vh(t)}function mh(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return yh(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(yh(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,yh(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,yh(d,"constructor",c),yh(c,"constructor",u),u.displayName="GeneratorFunction",yh(c,i,"GeneratorFunction"),yh(d),yh(d,i,"Generator"),yh(d,r,function(){return this}),yh(d,"toString",function(){return"[object Generator]"}),(mh=function(){return{w:o,m:f}})()}function yh(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}yh=function(t,e,n,r){function o(e,n){yh(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},yh(t,e,n,r)}function bh(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Dh(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?bh(Object(n),!0).forEach(function(e){wh(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function wh(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=vh(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=vh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vh(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xh(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ah(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){xh(o,r,i,a,s,"next",t)}function s(t){xh(o,r,i,a,s,"throw",t)}a(void 0)})}}function Eh(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Sh(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sh(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var _h=Promise.resolve();function Ch(t){var e=_h.then(t,t);return _h=e.catch(function(){}).then(function(){return new Promise(function(t){setTimeout(t,250)})}),e}var kh=["font-family","font-size","font-style","font-weight","color","line-height","letter-spacing","word-spacing"],Oh=["fontFamily","fontSize","fontStyle","fontWeight","color","lineHeight","letterSpacing","wordSpacing"];function Th(t){var e,n={},r=Eh(t.childNodes);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.style){var o,a=i.style,s=Eh(Oh);try{for(s.s();!(o=s.n()).done;){var u=o.value;a[u]&&"default"!==a[u]&&(n[u]=a[u])}}catch(t){s.e(t)}finally{s.f()}}if(Object.keys(n).length>0)return n;var c=Th(i);if(Object.keys(c).length>0)return c}}catch(t){r.e(t)}finally{r.f()}return{}}function Ih(t,e){return jh.apply(this,arguments)}function jh(){return(jh=Ah(mh().m(function t(e,n){var r,i,o,a,s,u,c,l,d,f;return mh().w(function(t){for(;;)switch(t.n){case 0:if(r=new DOMParser,i=r.parseFromString(e,"text/html"),o=Th(i.body),a={},0===Object.keys(o).length){if(n&&(u=n.getRootNode().getSelection()))for(s=u.anchorNode||u.focusNode;s&&s.nodeType!==Node.ELEMENT_NODE&&s.parentElement;)s=s.parentElement;if(s=s||n){c=window.getComputedStyle(s),l=Eh(kh);try{for(l.s();!(d=l.n()).done;)(f=d.value)in c&&(a[f]=c[f])}catch(t){l.e(t)}finally{l.f()}"font-size"in c&&(c["font-size"].startsWith("0")||(a["font-size"]=c["font-size"]))}}return t.n=1,wm({action:"copy-snippet",html:e,fontStyle:a});case 1:return t.a(2,Dh(Dh({},o),a))}},t)}))).apply(this,arguments)}function Fh(){try{return!("undefined"==typeof window||!window.__SAPLING_DEBUG__)||!("undefined"==typeof localStorage||!localStorage.getItem("__SAPLING_DEBUG__"))}catch(t){return!1}}function Nh(t,e){Fh()}var Ph=n(216);function Rh(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return Mh(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(Mh(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Mh(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Mh(d,"constructor",c),Mh(c,"constructor",u),u.displayName="GeneratorFunction",Mh(c,i,"GeneratorFunction"),Mh(d),Mh(d,i,"Generator"),Mh(d,r,function(){return this}),Mh(d,"toString",function(){return"[object Generator]"}),(Rh=function(){return{w:o,m:f}})()}function Mh(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}Mh=function(t,e,n,r){function o(e,n){Mh(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},Mh(t,e,n,r)}function Bh(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Lh(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){Bh(o,r,i,a,s,"next",t)}function s(t){Bh(o,r,i,a,s,"throw",t)}a(void 0)})}}function Hh(t){return Hh="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},Hh(t)}function qh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Uh(r.key),r)}}function Uh(t){var e=function(t,e){if("object"!=Hh(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Hh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Hh(e)?e:e+""}var zh=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter","Tab","Delete","Escape","Home","End","PageUp","PageDown"]),Wh=new Set(["ArrowUp","ArrowDown","Enter","Escape"]),Gh=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.children={},this.end=!1}return e=t,(n=[{key:"insert",value:function(e){for(var n=this,r=0;r<e.length;r++)n.children[e[r]]||(n.children[e[r]]=new t),n=n.children[e[r]],r===e.length-1&&(n.end=!0)}},{key:"contains",value:function(t){for(var e=this,n=0;n<t.length;n++){if(!e.children[t[n]])return 0;e=e.children[t[n]]}return e.end?2:1}}])&&qh(e.prototype,n),r&&qh(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,r}(),$h="\\",Yh=!1,Vh=new Gh,Kh={},Xh=[];function Jh(){Nh(),St("request/GET_SHORTCUT_SNIPPETS",{},function(t){!function(t){if(t){for(var e=new Gh,n={},r=0;r<t.length;r++){var i=t[r],o=i.shortcut;if(o){var a=o.toLowerCase();e.insert(a),n[a]=i}}Vh=e,Kh=n,Nh(0,t.length)}else Nh()}(t)},function(t){Nh()});var t=$e();null!=t&&($h=t),Nh()}function Qh(){Xh=[],Yh&&(Yh=!1,Nh(),Dm({action:"snippet-control",data:{show:!1}}))}function Zh(){return(Zh=Lh(Rh().m(function t(e){var n,r,i,o,a,s,u,c,l,d;return Rh().w(function(t){for(;;)switch(t.n){case 0:if(n=Xh.join(""),Xh=[],r=Kh[n]){t.n=1;break}return Nh(),t.a(2);case 1:if(i=e&&e.getAttribute&&e.getAttribute("contenteditable"),a=!(o="true"===i||""===i||"plaintext-only"===i)&&!(!e||!e.isContentEditable),!o&&!a){t.n=3;break}if(s=e,a&&"function"==typeof e.closest&&(s=e.closest('[contenteditable="true"], [contenteditable=""], [contenteditable="plaintext-only"]')||e),Nh(0,r.id),u=Vn(s,null),c=Math.max(0,u.startOffset-n.length+1),u.setStart(u.startContainer,c),""===r.rich_text){t.n=2;break}return t.n=2,Ch(Lh(Rh().m(function t(){var e;return Rh().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.n=1,wm({action:"cache-clipboard"});case 1:return t.p=1,t.n=2,Ih(r.rich_text,s);case 2:return e=t.v,t.n=3,Yd(u,r.plain_text,r.rich_text,s,e);case 3:return t.p=3,Dm({action:"pop-cached-clipboard"}),t.f(3);case 4:return t.a(2)}},t,null,[[1,,3,4]])})));case 2:Lt(r.id,"shortcut",n,0),t.n=4;break;case 3:e&&nt(e,!0)?(Nh(0,(r.id,e.tagName)),l=Math.max(0,e.selectionStart-n.length+1),d=l+r.plain_text.length,h().endsWith("figma.com")&&window.dispatchEvent(new CustomEvent("sapling-figma-selection",{detail:{bufferLength:n.length-1}})),zd(e,l,e.selectionEnd,r.plain_text),e.setSelectionRange(d,d),Lt(r.id,"shortcut",n,0)):Nh(0,e&&e.tagName);case 4:return t.a(2)}},t)}))).apply(this,arguments)}function tg(t,e){return Yh&&Wh.has(e)?(Nh(),Dm({action:"snippet-control",data:{key:e}}),!1):function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("textarea"===e||"input"===e)return null!=t.selectionStart&&t.selectionStart!==t.selectionEnd}var n=window.getSelection();if(!n||0===n.rangeCount||n.isCollapsed)return!1;var r=n.getRangeAt(0).commonAncestorContainer;return t&&(t.contains(r)||t===r)}(t)?(Xh=[],eg(),!0):("Backspace"===e?(Xh.pop(),eg()):zh.has(e)&&(Xh=[]),!0)}function eg(){if(Yh){var t,e=Xh.join("");if(t=e.length,e.startsWith($h)){var n=e.substring($h.length);Nh(),Dm({action:"snippet-control",data:{query:n}})}else Nh(),Yh=!1,Dm({action:"snippet-control",data:{show:!1}})}}function ng(t,e){if(e.length>1)return!1;Xh.push(e.toLowerCase());var n=Vh.contains(Xh);if(2===n)return Nh(0,Xh.join("")),function(t){Zh.apply(this,arguments)}(t),!0;if(Xh.join("")===$h){var r=Jn(t),i=r.top,o=r.top+r.height+10,a=r.left,s=Ph(window).height();oi()?Dm({action:"get-iframe-bounding-rect",href:window.location.href,name:window.name,x:a,y:o,caretY:i,frameIds:[]}):function(t,e,n,r){var i={top:"",bottom:"",left:t};n-e<300?i.bottom=n-r+10:i.top=e,Dm({action:"snippet-control",data:{coordinates:i,mode:"inline",show:!0}}),Yh=!0,eg()}(a,o,s,i)}else eg();if(1===n);else if(0===n&&!Yh)for(;;){var u=Xh.indexOf(" ");if(!(u>=0))return!1;if(0===(Xh=Xh.slice(u+1,Xh.length)).length)return!1;if(0!==Vh.contains(Xh))return!1}}var rg=n(216);function ig(t,e,n){t.observe(rg("#chatLog")[0],e),t.observe(rg("#chatTextArea")[0],e),n&&n()}function og(){var t;0===rg("sapling-chat-controls").length?((t=document.createElement("sapling-chat-controls")).attachShadow({mode:"open"}),rg("#chatInput").after(t)):t=rg("sapling-chat-controls")[0];var e=t.shadowRoot;rg(".sapling-chat-container",e)[0]||(rg(e).prepend(rg('\n<style type="text/css">\n.sapling-chat-container{\n}\n.sapling-chat-suggestion{\n width: 305px;\n margin: 5px;\n border: 1px solid rgba(82, 95, 153, 0.8);\n color: rgba(82, 95, 153, 0.8);\n background-color: #fff;\n border-radius: 5px;\n padding-left: 10px;\n padding-right: 10px;\n padding-top: 5px;\n padding-bottom: 5px;\n user-select: none;\n font-family: '.concat(Br,";\n font-size: 12px;\n transition: all .15s ease;\n}\n.sapling-chat-suggestion:hover {\n transform: translateY(-1px);\n box-shadow: ").concat(Hr,";\n}\n.sapling-chat-suggestion:active {\n transform: translateY(0px);\n background-color: rgba(82, 95, 153, 0.5);\n}\n.sapling-chat-suggestion .sapling-suggestion-send img {\n z-index: 10;\n width: 20px;\n height: 20px;\n position: absolute;\n top: 0px; right: 0px;\n padding-top: 5px; padding-right: 5px;\n color: rgba(82, 95, 153, 0.8);\n visibility: hidden;\n}\n.sapling-chat-suggestion:hover .sapling-suggestion-send img {\n visibility: visible;\n}\n</style>"))),rg(e).append(rg("\n<div class='sapling-chat-container'>\n</div>\n")))}function ag(t){for(var e=rg("#chatLog div"),n=[],r=function(){var r=rg(e[i]);if(r.hasClass("agentMessage"));else if(r.hasClass("chasitorMessage")){var o=rg(".messageText",r).text();o||(o=r.text()),n.push(o),t&&(rg(r).off("click"),rg(r).css("cursor","pointer"),rg(r).on("click",function(){return t(o)}))}},i=0;i<e.length;i+=1)r();return n}function sg(t,e){zd(rg("#chatTextArea")[0],0,0,t);try{rg("#chatInputSend").click()}catch(t){}e(K(rg("#chatTextArea")),rg("#chatTextArea")[0].value)}function ug(t){zd(rg("#chatTextArea")[0],0,0,t)}function cg(){return!!location.hostname.endsWith("salesforce.com")&&("/liveagent/chatlog.apexp"===location.pathname&&!!rg("#chatLog")[0])}function lg(){return rg("#chatTextArea")[0]?{sessionId:K(rg("#chatTextArea"))}:""}var dg=n(216);function fg(t){return function(t){if(Array.isArray(t))return hg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||pg(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pg(t,e){if(t){if("string"==typeof t)return hg(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hg(t,e):void 0}}function hg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}window.log_last_mutated=void 0===window.log_last_mutated?new Date:window.log_last_mutated,window.sendEvent=Pt;var gg,vg=null,mg=null,yg=null,bg=null,Dg=null,wg=null,xg=null,Ag=null,Eg=!1,Sg=void 0===Sg?null:Sg,_g=void 0===_g?"":_g,Cg=void 0===Cg?"":Cg,kg=void 0===kg?null:kg,Og=void 0!==Og&&Og,Tg=void 0===Tg?null:Tg;window.lastResponseTimestamp="undefined"==typeof lastResponseTimestamp?null:lastResponseTimestamp;function Ig(t){for(var e=t.split(" "),n=new Set,r=0;r<=e.length&&(n.add(e.slice(r,r+3).join(" ")),!(r+3>=e.length));r++);return n}function jg(){var t=[];return new Date-log_last_mutated>6e4&&t.push({id:"helper-still-connected",doc:"Are we still connected?",confidence:null}),t}function Fg(t){log_last_mutated=new Date;var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=pg(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;if("childList"===r.type){return Hg(),void Mg()}if("attributes"===r.type&&"disabled"===r.attributeName)return void Yg()}}catch(t){n.e(t)}finally{n.f()}}function Ng(t){Tg&&(Tg.agent_message=t,function(t){var e=t.suggestion_id,n=t.index,r=(t.helper,t.suggest_text),i=t.agent_message,o=t.confidence,a=t.quick_send,s=Ig(r),u=Ig(i),c=new Set(fg(s).filter(function(t){return u.has(t)})),l=yg(),d={hostname:h(),pathname:g(),suggest_index:n,confidence:o,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,ng_size:3,ng_select:s.size,ng_sent:u.size,ng_overlap:c.size,quick_send:a,click_query:Og};Object.assign(d,l),f={context:d,suggestion_id:e,action:"send"},St("request/POST_SUGGESTION_EVENT",f),Tg=null,Og=!1;var f}(Tg))}function Pg(t){var e=t.suggestion_id,n=t.index,r=t.helper,i=t.confidence,o=t.quick_send,a=yg(),s={hostname:h(),pathname:g(),suggest_index:n,confidence:i,frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,quick_send:o,click_query:Og,helper:r};Object.assign(s,a),St("request/POST_SUGGESTION_SELECT",{suggestionId:e,context:s}),o?(Tg=null,Og=!1):Tg=t}function Rg(t){var e=t.split(":");return 3600*parseInt(e[0])+60*parseInt(e[1])+parseInt(e[2])}var Mg=En().debounce(function(){wg(Mt)},300);function Bg(){return{inpEl:null,inp:""}}function Lg(t){for(var e=null,n=null,r=null,i=null,o=dg("#chatLog div"),a=0;a<o.length;a+=1){var s=dg(o[a]);s.hasClass("agentMessage")?(r=e,e="agent",i=n,n=dg(".timestamp",s).text()):s.hasClass("chasitorMessage")&&(r=e,e="visitor",i=n,n=dg(".timestamp",s).text())}if(n!==lastResponseTimestamp&&(lastResponseTimestamp=n,"agent"===e&&"visitor"===r)){var u=Rg(n)-Rg(i),c=yg(),l={hostname:h(),pathname:g(),frame_hostname:window.location.hostname,frame_pathname:window.location.pathname,response_time:u,action:"agent_response"};Object.assign(l,c),Pt("chat_event",l,""),t(l)}}var Hg=En().debounce(function(){var t=yg(),e=vg(function(e){Og=!0,Xa(e,null,$g,t)},Bt),n=e[e.length-1];e&&n&&n!==_g&&(_g=n,Yg(),Eg=!1,Wg(),Og=!1,Xa(n,e,$g,t))},200);var qg=En().debounce(function(){var t=yg(),e=Ag(),n=(e.inpEl,e.inp);n&&n!==Cg&&(Cg=n,Eg=!1,Og=!1,Ja(n,$g,t))},200);function Ug(t,e,n){var r=t.doc,i=t.id;if(i!==kg){var o=xg().shadowRoot,a=dg("<div class='sapling-chat-suggestion'>".concat(r,"</div>"));if("confidence"in t&&null!==t.confidence){var s=t.confidence.toFixed(2),u="low";s>.25&&(u="med"),s>.75&&(u="high");var c=dg('<div class="sapling-suggestion-conf sapling-conf-'.concat(u,'">').concat(s,"</div>"));a.append(c)}n?dg(".sapling-helper-container",o).append(a):dg(".sapling-chat-container",o).append(a),a.on("mousedown",function(o){1===o.which&&(log_last_mutated=new Date,kg=i,Yg(),mg(r),Pg({suggestion_id:i,index:e,helper:n,suggest_text:r,agent_message:r,confidence:t.confidence,quick_send:!1}))})}else kg=null}function zg(t){for(var e=new Set,n=[],r=0;r<t.length;r++)e.has(t[r].doc)||(e.add(t[r].doc),n.push(t[r]));return n}function Wg(){if(!Eg){var t=xg();if(null===t&&Dg(),null!==(t=xg())){var e=bg();if(e.length){var n=t.shadowRoot;0===dg(".sapling-response-wrapper-close",n).length&&dg(".sapling-response-wrapper",n).prepend('<div class="sapling-response-wrapper-close">&times;</div>'),dg(".sapling-response-wrapper-close",n).click(Yg),dg(".sapling-helper-container",n).html(""),e=zg(e);for(var r=0;r<e.length;r++)Ug(e[r],r,!0)}}}}function Gg(){var t=dg("sapling-chat-controls");return t.length?t[0]:null}function $g(t){if(t.length){var e=xg().shadowRoot;0===dg(".sapling-response-wrapper-close",e).length&&dg(".sapling-response-wrapper",e).prepend('<div class="sapling-response-wrapper-close">&times;</div>'),dg(".sapling-response-wrapper-close",e).click(Yg),dg(".sapling-chat-container",e).html(""),t=zg(t);for(var n=0;n<Math.min(3,t.length);n+=1)Ug(t[n],n,!1);var r={num_responses:t.length,hidden:document.hidden},i=yg();Object.assign(r,i),Pt("show_suggest_responses",r,"")}}function Yg(){Eg=!0;var t=xg();if(null!==t){var e=t.shadowRoot;dg(".sapling-chat-suggestion",e).remove(),dg(".sapling-response-wrapper-close",e).remove()}}function Vg(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(Ue()&&((e=location.hostname)&&!e.includes("zendesk.com")&&!e.includes("ujet.co")&&!e.includes("force.com")&&(e.includes("connect.aws")||e.includes("awsapps")||e.includes("amazonaws.com")||(e.includes("intercom.com")||e.includes("sapling.ai")||e.includes("kustomer")||e.includes("gorgias"),0)))&&!(n<1)){"function"!=typeof shouldInitializeChatObserverOverride&&setTimeout(function(){Vg(t,n-1)},1e3);if(null!==Sg&&Sg.disconnect(),("function"==typeof shouldInitializeChatObserverOverride?shouldInitializeChatObserverOverride:cg)()){var r="function"==typeof getLastClientChatMessagesOverride?getLastClientChatMessagesOverride:ag,i="function"==typeof injectChatResponseOverride?injectChatResponseOverride:sg,o="function"==typeof editChatResponseOverride?editChatResponseOverride:ug,a="function"==typeof observeChatEventsOverride?observeChatEventsOverride:ig;Dg="function"==typeof injectChatUIOverride?injectChatUIOverride:og;var s="function"==typeof getContextOverride?getContextOverride:lg,u="function"==typeof getHelperResponsesOverride?getHelperResponsesOverride:jg,c="function"==typeof getResponseTimeHelperOverride?getResponseTimeHelperOverride:Lg,l="function"==typeof getResponseWrapperOverride?getResponseWrapperOverride:Gg,d="function"==typeof getInpOverride?getInpOverride:Bg;vg=r,mg=function(t){return o(t)},yg=s,bg=u,wg=c,xg=l,Ag=d,null==Sg&&(Sg=new MutationObserver(Fg)),Dg(),a(Sg,{attributes:!0,childList:!0,characterData:!0,subtree:!0},Hg,Ng),Hg(),clearInterval(gg),gg=setInterval(Wg,3e3);var f=Ag(),p=f.inpEl;f.inp;p&&dg(p).on("input",qg)}}}var Kg=n(216);function Xg(t){return Xg="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},Xg(t)}function Jg(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Qg(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qg(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Qg(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Zg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tv(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=Xg(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Xg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Xg(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ev,nv,rv={},iv={},ov={};function av(t,e){ev=t,nv=e,h().includes("figma.com")&&(Kg(function(){Kg('div[name="propertiesPanelContainer"]').css("z-index",1)}),window.addEventListener("sapling-figma-text-nodes-updated",function(t){sv(t.detail.figmaTextNodes)}),window.addEventListener("sapling-figma-viewport-updated",function(t){var e,n;e=t.detail.figmaViewport,n=t.detail.figmaTextNodes,iv=e,sv(n)}))}function sv(t){iv.viewportBounds&&iv.zoom&&t&&(Object.keys(rv).filter(function(e){0===t.filter(function(t){return t.figmaId===e}).length&&(rv[e].overlayDomElement.remove(),delete rv[e])}),t.forEach(function(t){return function(t){var e=t.figmaId;rv.hasOwnProperty(e)||(rv[e]=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zg(Object(n),!0).forEach(function(e){tv(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zg(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t));var n=function(t){var e=t.figmaId,n=t.characters,r=t.textBounds,i=t.style;if(!rv.hasOwnProperty(e))return;var o=rv[e].overlayDomElement;if(!o){(o=document.createElement("div")).setAttribute("contenteditable",!0),Kg(o).attr("id","sapling-figma-text-".concat(e)),Kg(o).attr("sapling-figma-text-id",e),Kg(o).data("sapling-figma-text-id",e),document.getElementsByTagName("body")[0].appendChild(o),rv[e].overlayDomElement=o,o.addEventListener("input",function(t){window.dispatchEvent(new CustomEvent("sapling-figma-edit-accepted",{detail:{figmaId:e,updatedText:uv(o.innerHTML)}}))})}var a=iv.canvasRect.top,s=iv.canvasRect.left,u=iv.viewportBounds.y,c=iv.viewportBounds.x,l=iv.zoom;Kg(o).data("figma-zoom",l);var d=r.y,f=r.x,p=r.width,h=r.height,g=s+(f-c)*l,v=a+(d-u)*l,m=p*l,y=h*l,b=i.textAlignHorizontal,D=i.textAlignVertical,w=i.paragraphSpacing,x=i.paragraphIndent,A=i.listSpacing,E=i.textSegments,S=w,_=A;o.innerHTML="";var C=document.createElement("span");function k(t,e){var n=new RegExp("[".concat(e.join(""),"]"),"g");return t.split(n)}Kg(C).css({zoom:l}),yd(Kg(o).attr("sapling-id"));var O,T,I,j=String.fromCodePoint(8232),F=k(n.trim(),["\n",j]),N=0,P=0,R=Jg(F);try{for(R.s();!(I=R.n()).done;){var M=I.value;T=0===M.length;var B=document.createElement("div"),L="NONE"!==(O=E[P]).listOptions.type,H={};L||(H["text-indent"]="".concat(x,"px")),0===N||(L?"NONE"!==E[P-1].listOptions.type?H["margin-top"]="".concat(S,"px"):H["margin-top"]="".concat(_,"px"):H["margin-top"]="".concat(S-1,"px"));var q=O.lineHeight,U="inherit";"PERCENT"===q.unit?U=Math.trunc(q.value)/100:"PIXELS"===q.unit?U="".concat(q.value-1,"px"):"AUTO"===q.unit&&(U=1),H["line-height"]=U,Kg(B).css(H),T&&Kg(B).attr("sapling-figma-empty-line",!0);for(var z=N+M.length;T||N<z&&O;){var W=document.createElement("span"),G=O,$=G.characters,Y=G.start,V=G.end,K=G.fontName,X=G.fontSize,J=G.fontWeight,Q=G.letterSpacing,Z=G.textCase,tt=K.family.split(" ").join("+")+":wght@".concat(J);ov.hasOwnProperty(tt)||(document.getElementsByTagName("head")[0].innerHTML+='<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family='.concat(tt,'" />'),ov[tt]=1);var et=X,nt="inherit";"UPPER"===Z||"LOWER"===Z?nt=Z.toLowerCase()+"case":"TITLE"===Z&&(nt="capitalize");var rt="inherit";"PERCENT"===Q.unit?rt="".concat(Math.trunc(100*Q.value)/1e4,"em"):"PIXELS"===Q.unit&&(rt="".concat(Q.value,"px")),Kg(W).css({"font-family":K.family,"font-style":K.style,"font-size":"".concat(et,"px"),"text-transform":nt,"letter-spacing":rt,"font-weight":J});var it=N-Y,ot=it+(Math.min(V,z)-N);W.textContent=$.slice(it,ot),T&&(W.textContent="\u200b"),B.appendChild(W),N=Math.min(z,V),z>=V?P++:N++,O=E[P],T=!1}C.appendChild(B)}}catch(t){R.e(t)}finally{R.f()}o.appendChild(C);var at="flex-start",st=b.toLowerCase();"CENTER"===b?at="center":"RIGHT"===b?at="flex-end":"JUSTIFIED"===b&&(st="justify");var ut="flex-start";"CENTER"===D?ut="center":"BOTTOM"===D&&(ut="flex-end");return Kg(o).css({spellcheck:!1,color:"red",opacity:0,"pointer-events":"none",position:"fixed",top:"".concat(v,"px"),left:"".concat(g,"px"),height:"".concat(y,"px"),width:"".concat(m,"px"),"text-align":st,display:"flex","justify-content":at,"align-items":ut}),ev(o),Jl(o),o}(t);nv({saplingId:Kg(n).attr("sapling-id"),editable:n})}(t)}))}function uv(t){var e,n="",r=Jg((new DOMParser).parseFromString(t,"text/html").firstChild.lastChild.firstChild.children);try{for(r.s();!(e=r.n()).done;){var i=e.value;i.attributes.hasOwnProperty("sapling-figma-empty-line")?n+="\n":n+=i.textContent+"\n"}}catch(t){r.e(t)}finally{r.f()}return n.trimEnd()}var cv=n(216);function lv(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return dv(c,"_invoke",function(n,r,i){var o,s,u,c=0,l=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function p(n,r){for(s=n,u=r,e=0;!d&&c&&!i&&e<l.length;e++){var i,o=l[e],p=f.p,h=o[2];n>3?(i=h===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(e=s<2?t:u)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,s=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,i,o),!0),c}var a={};function s(){}function u(){}function c(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(dv(e={},r,function(){return this}),e),d=c.prototype=s.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,dv(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,dv(d,"constructor",c),dv(c,"constructor",u),u.displayName="GeneratorFunction",dv(c,i,"GeneratorFunction"),dv(d),dv(d,i,"Generator"),dv(d,r,function(){return this}),dv(d,"toString",function(){return"[object Generator]"}),(lv=function(){return{w:o,m:f}})()}function dv(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}dv=function(t,e,n,r){function o(e,n){dv(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},dv(t,e,n,r)}function fv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return pv(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pv(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function hv(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}var gv={},vv={},mv={};function yv(t){return bv.apply(this,arguments)}function bv(){var t;return t=lv().m(function t(e){var n,r,i,o;return lv().w(function(t){for(;;)switch(t.n){case 0:if(n=e.saplingId,r=e.editable,i=e.useVisibleText,"SDK"!==l.MODE){t.n=2;break}if(Sapling.userToggleEnabled){t.n=1;break}return t.a(2);case 1:t.n=3;break;case 2:if(Ze(r)||"sapling-embedded-editable"===r.id){t.n=3;break}return t.a(2);case 3:if(o=Y(r)){t.n=4;break}return t.a(2);case 4:if(Kl(o),!mv[n]){t.n=5;break}return t.a(2);case 5:return mv[n]=!0,t.n=6,Is(r,i||!1);case 6:Ts(n),delete mv[n];case 7:return t.a(2)}},t)}),bv=function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){hv(o,r,i,a,s,"next",t)}function s(t){hv(o,r,i,a,s,"throw",t)}a(void 0)})},bv.apply(this,arguments)}function Dv(t){en(t.editable)&&(t.hasOwnProperty("saplingId")?Ka(t.editable,t.saplingId):Ka(t.editable,t.textAreaId))}var wv=function(t){return(null==t?void 0:t.saplingId)||(null==t?void 0:t.textAreaId)},xv=En().wrap(En().memoize(function(){return En().debounce(yv,250,{leading:!1,trailing:!0})},wv),function(t,e){return t(e)(e)}),Av=En().wrap(En().memoize(function(){return En().debounce(Dv,50,{leading:!1,trailing:!0})},wv),function(t,e){return t(e)(e)}),Ev=En().wrap(En().memoize(function(){return En().debounce(md,20,{leading:!1,trailing:!0})},En().property("id")),function(t,e){return t(e)(e)});function Sv(t){if("characterData"!==t.type)return!1;var e=t.target.data.replace(/\u00A0/g," "),n=t.oldValue.replace(/\u00A0/g," ");if(!e.startsWith(n))return!1;var r=e.substring(n.length);return!!ei().startsWith(r)}var _v=En().wrap(En().memoize(function(){return En().debounce(function(t){!function(t){if(ql[t]){var e=ql[t].edits;Object.keys(e).forEach(function(n){var r=e[n];fc(r.editRange,r.edit,!1)||rd(t,n)})}}(t),yd(t),sc()},50,{leading:!1,trailing:!0})}),function(t,e){return t(e)(e)});function Cv(t,e){cv(t).on("focus click keyup",function(n){"keyup"===n.type?"ArrowLeft"!==n.key&&"ArrowRight"!==n.key&&"ArrowUp"!==n.key&&"ArrowDown"!==n.key||xv({saplingId:e,editable:t}):(xv({saplingId:e,editable:t}),"focus"===n.type&&Jh())}),wt(e,t,!1,"jqueryObservers",t)}function kv(t){return"scroll.sapling_scroll_".concat(String(t).replace(/[^a-zA-Z0-9_]/g,"_"))}function Ov(t,e){for(var n=P(t),r=kv(e),i=0;i<n.length;i+=1){var o=n[i];cv(o).on(r,function(){yd(e),xv({saplingId:e,editable:t,useVisibleText:!0}),Ju()}),wt(e,t,!1,"jqueryObservers",{element:o,events:r})}}function Tv(t,e){var n=new MutationObserver(function(n){!function(t,e,n){for(var r=!1,i=0;i<n.length;i+=1){var o=n[i];if(xv({saplingId:e,editable:t}),"characterData"!==o.type||r){if("childList"===o.type)sd(e,o),K(t)||(Sv(o)?ni(t):(Kr(),Av({saplingId:e,editable:t})));else if("attributes"===o.type&&"contenteditable"===o.attributeName){var a=t.getAttribute("contenteditable");"DIV"!==t.tagName||K(t)||"true"===a||""===a||"plaintext-only"===a||Iv(t,!1)}}else ud(e,o),K(t)||(Sv(o)?ni(t):(Kr(),Av({saplingId:e,editable:t}))),r=!0}_v(e)}(t,e,n)});n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0,characterDataOldValue:!0}),wt(e,t,!1,"mutationObservers",n)}function Iv(t,e){var n=t.getAttribute("sapling-input-id");n&&(Gl(n),xt(n,e));var r=Y(t);if(Gl(r),e){var i=K(t);i&&(xt(i,e),qd(t)),delete vv[i]}else r&&(xt(r,e),bd(r),function(t){t in Cs&&delete Cs[t]}(r)),delete gv[r];(function(t){return Ul&&Ul.containerId===t})(r)&&Ju(),hf()}var jv=En().throttle(function(t){Object.keys(gv).forEach(function(t){var e,n=gv[t];void 0===n||n.classList.contains("wysihtml5-editor")||(at(n)?(Jl(e=n),yd(Y(e)),document.activeElement===n&&ei()&&ti(n,ei())):Iv(n,!1))}),Object.keys(vv).forEach(function(t){var e=vv[t];if(void 0!==e)if(at(e)){var n=Rd(e);Y(n)?Jl(n):(Bv(n),V(e,Y(n)))}else Iv(e,!0)})},30,{leading:!1,trailing:!0}),Fv=new $n(function(t){requestAnimationFrame(function(){jv(t)})});function Nv(t){var e=ut(t);if(void 0!==e){var n,r,i=K(e);if(i)Bd(i,e.value),"input"===t.type&&(n=t.data,r=ei(),n&&r.startsWith(n)?ni(e):(Kr(),Av({textAreaId:i,editable:e})))}}function Pv(t){var e=K(t),n={passive:!0,once:!1};t.addEventListener("input",Nv,n),wt(e,t,!0,"eventListeners",{element:t,event:"input",handler:Nv,options:n}),t.addEventListener("keyup",Nv,n),wt(e,t,!0,"eventListeners",{element:t,event:"keyup",handler:Nv,options:n})}function Rv(t,e){for(var n=P(t),r=kv(e),i=0;i<n.length;i+=1){var o=n[i];K(o)===e?cv(o).on(r,function(){Ld(e)}):cv(o).on(r,function(){Hd(e)}),wt(e,t,!0,"jqueryObservers",{element:o,events:r})}}var Mv=function(){setTimeout(Hu,100)};function Bv(t){if("SDK"===l.MODE||Ze(t)||en(t)||"sapling-embedded-editable"===t.id){var e=Y(t);if(!e||!(e in gv)){var n=V(t,e);gv[n]=t,Jl(t),Tv(t,n),Fv.observe(t),wt(n,t,!1,"resizeObservers",{container:t,observer:Fv}),Lv(n,t,!1),Cv(t,n),Hv(n,t,!1),Ov(t,n),Gv(t),yv({saplingId:n,editable:t,useVisibleText:!1})}}}function Lv(t,e,n){cv(e).off("keypress.sapling keydown.sapling"),cv(e).on("keypress.sapling",function(t){if(ng(e,t.key))return!1});var r=en(e);cv(e).on("keydown.sapling",function(t){if("Tab"===t.key){if(!!Uu(Gu).attr("sapling-edit-id")&&(Uu("#accept-button",Wu).focus(),!0))return!1}else{if(!tg(e,t.key))return!1;Ev(e)}r&&(G(e),ri(t,e)),an()&&Mv()}),wt(t,e,n,"jqueryObservers",e)}function Hv(t,e,n){cv(e).off("click.sapling"),cv(e).on("click.sapling",function(t){vd(e)}),wt(t,e,n,"eventListeners",{element:e,event:"click",handler:vd})}function qv(t){if(Ze(t)||en(t)){var e=cv(t).attr("onfocus");if(!e||!e.includes("(this).hide()")){var n=K(t);if(n&&n in vv)Bd(n,t.value);else{var r=X(t);vv[r]=t;var i=Rd(t);Pv(t),Fv.observe(t),wt(r,t,!0,"resizeObservers",{container:t,observer:Fv}),Rv(t,r),Lv(r,t,!0),Hv(r,t,!0),Bd(r,t.value),Ld(r),Bv(i),V(t,Y(i))}}}}var Uv=En().throttle(function(t){for(var e=null,n=0,r=Object.entries(ql);n<r.length;n++){var i=Rl(r[n],2),o=i[0],a=i[1],s=a.edits,u=a.overlayDomElement,c=a.annotationsOverlay;if(s){for(var l=[],d=0,f=Object.values(s);d<f.length;d++){var p=f[d],h=p.edit,g=p.editRange,v=p.isHover;if((!h.category||c&&c.editsVisible)&&!h.fillin){if(v&&gd(t)){l=[p];break}fd(g,o,t)&&l.push(p)}}if(l.length)e={editInfo:ml(l),containerId:o,overlayDomElement:u,annotationsOverlay:c};dd(o,t)&&a.badge.showBadgeDashboard()}}var m=!1;if(e){var y=e,b=y.editInfo,D=y.containerId,w=y.overlayDomElement,x=y.annotationsOverlay;m=hd(b.edit.editId,D,b,x,w)}m?uc():lc()},100,{leading:!1,trailing:!0});function zv(t,e){for(var n=0;n<t.length;n+=1){if(t[n].id===e)return!0}return!1}function Wv(t){var e=t.path;e&&(Qh(),(zv(e,"accept-button")||zv(e,"ignore-button")||zv(e,"explanations"))&&t.preventDefault())}function Gv(t){if(document!==t.ownerDocument&&"SDK"===l.MODE){Sapling.injectCSS(t.ownerDocument);var e={passive:!0};t.ownerDocument.addEventListener("mousemove",Uv,e),bt({element:document,event:"mousemove",handler:Uv,options:e}),t.ownerDocument.addEventListener("mousedown",Wv,{}),bt({element:document,event:"mousedown",handler:Wv,options:{}})}}function $v(t){Qh();var e=ut(t);"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")||"plaintext-only"===e.getAttribute("contenteditable")?Bv(e):Ve(e)&&qv(e),Object.keys(ht).forEach(function(t){at(ht[t].domElement)||xt(t,!1)}),Object.keys(gt).forEach(function(t){at(gt[t].domElement)||xt(t,!0)})}function Yv(){var t={passive:!0};document.addEventListener("selectionchange",Mv,t),bt({element:document,event:"selectionchange",handler:Mv,options:t}),document.addEventListener("selectionchange",qu,t),bt({element:document,event:"selectionchange",handler:qu,options:t})}function Vv(t){return!!(lt(t.ownerDocument||document)===t||""!==t.textContent&&cv(t).is(":visible"))}function Kv(t){for(var e=0;e<t.length;e+=1){var n=t[e];if("childList"===n.type){for(var r=0;r<n.addedNodes.length;r+=1){var i=n.addedNodes[r];"IFRAME"===i.tagName?ai(cv(i),function(){St("init/NEW_IFRAME_LOADED")}):cv("iframe",i).each(function(t,e){ai(cv(e),function(){St("init/NEW_IFRAME_LOADED")})})}for(var o=0;o<n.removedNodes.length;o+=1){var a=n.removedNodes[o];if(a.nodeType===Node.ELEMENT_NODE&&(rt(a)||Ve(a)))Iv(a,Ve(a))}}}}function Xv(){if(h().includes(l.WEBSITE_HOSTNAME)){var t=document.getElementById("logout-button");t&&t.addEventListener("click",function(){St("request/LOGOUT_USER",{},function(){Re(!0)},function(){Re(!0)})});var e=document.getElementById("login-button");e&&e.addEventListener("click",function(){var t,e;St("request/CLEAR_USER",t,e)})}}function Jv(){if(l.AI_DETECT_ANYWHERE_EXTENSION)return Tu(),function(){if(window.top===window&&!kf&&yf(window.location.href)&&!Be()&&cn()&&hn()&&!fn("docs")&&pm()){document.querySelectorAll(_f).forEach(function(t){return t.remove()});var t=document.createElement(_f);try{t.attachShadow({mode:"open"})}catch(t){return}(kf=new jf(t)).start(),Pt("ai_detect_".concat(If(Of()),"_chip_shown"))}}(),Zp(),gh(),void Yv();var t;if(function(){"SDK"!==l.MODE&&(h(),cv("iframe").each(function(t,e){try{ai(cv(e),function(){return St("init/NEW_IFRAME_LOADED")})}catch(t){}}));var t=document.body;if(t){if("SDK"!==l.MODE){var e=new MutationObserver(Kv);e.observe(t,{attributes:!1,childList:!0,subtree:!0}),Dt(e)}Fv.observe(t),Dt(Fv)}}(),t={passive:!0,capture:!0},document.addEventListener("mousemove",Uv,t),bt({element:document,event:"mousemove",handler:Uv,options:t}),document.addEventListener("mousedown",Wv,{}),bt({element:document,event:"mousedown",handler:Wv,options:{}}),"SDK"!==l.MODE){Xv(),function(){var t={passive:!0,capture:!0};document.addEventListener("focusin",$v,t),bt({element:document,event:"focusin",handler:$v,options:t}),document.addEventListener("focusout",Kr,t),bt({element:document,event:"focusout",handler:Kr,options:t}),document.addEventListener("focusout",hf,t),bt({element:document,event:"focusout",handler:hf,options:t})}(),Yv(),function(){var t="textarea";yn()&&(t='textarea,input[type="text"]'),cv(t).each(function(t,e){Vv(e)&&qv(e)}),cv("[contenteditable=true], [contenteditable=plaintext-only]").each(function(t,e){Vv(e)&&Bv(e)});var e=ot(function(t){return nt(t,yn())});cv(e).each(function(t,e){Vv(e)&&qv(e)});var n=ot(rt);cv(n).each(function(t,e){Vv(e)&&Bv(e)})}(),av(Bv,yv),Jh();try{Vg(Bd)}catch(t){}}}function Qv(t){var e=Y(t);e&&e in gv||(e=V(t),gv[e]=t,Fv.observe(t),wt(e,t,!1,"resizeObservers",{container:t,observer:Fv}),Cv(t,e),Hv(e,t,!1),Ov(t,e),Gv(t)),Jl(t),yv({saplingId:e,editable:t,useVisibleText:!1})}function Zv(t){var e,n=K(t);n&&n in vv||(n=X(t),vv[n]=t,Rd(t),Pv(t),Fv.observe(t),wt(n,t,!0,"resizeObservers",{container:t,observer:Fv}),Rv(t,n),Lv(n,t,!0),Hv(n,t,!0),Ld(n)),Bd(n,t.value),Qv(e=Rd(t)),V(t,Y(e))}var tm=n(216);function em(t){return em="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},em(t)}function nm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function rm(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nm(Object(n),!0).forEach(function(e){im(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nm(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function im(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=em(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=em(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==em(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var om=null;function am(){return{version:bm(),source:"SDK",hostname:h(),pathname:g(),frame_hostname:window.location.hostname}}function sm(t){var e=t.sentence.substring(t.start,t.end),n={offset:t.start+t.sentence_start,text:e},r={offset:t.end+t.sentence_start,text:e},i=t;return i.replacement_text=t.replacement,i.original_text=e,i.start=n,i.end=r,i.replacement_text=t.replacement,"Advanced Edit"===t.general_error_type&&(i.category=t.error_type),i}function um(t){var e=t.type,n=t.url,r=t.contentType,i=t.dataType,o=t.data,a=t.xhrFields,s=t.success,u=t.error,c=Date.now();tm.ajax({type:e,url:n,contentType:r||"application/json",dataType:i||"json",data:o,xhrFields:a||{},success:s||function(){},error:u||function(){},complete:function(t){return function(t){var e=t.startTime,n=t.status,r=t.url;if(!Sapling.telemetryEndpoint)return;var i={status:n,latency:Date.now()-e,url:r};try{tm.ajax({type:"post",url:Sapling.telemetryEndpoint,contentType:"application/json",dataType:"json",data:JSON.stringify(i)})}catch(t){}}({startTime:c,status:t.status,url:n,data:o})}})}function cm(t){if(Sapling.key){var e=am();e.hostname=h(),e.pathname=g();var n={name:t,key:Sapling.key,event_properties:e},r="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/events");try{um({type:"post",url:r,contentType:"application/json",dataType:"json",data:JSON.stringify(n)})}catch(t){}}}function lm(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:h())===l.WEBSITE_HOSTNAME||Sapling.freemium&&Boolean(Sapling.freemiumUseCookies)}function dm(t,e,n,r){var i=lm(h()),o="".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.editPathname),a={key:Sapling.key,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,text:t,noformat:!0,lang:Sapling.lang,variety:Sapling.variety,advanced_edits:Sapling.advancedEdits,operations:Sapling.operations,freemium:Sapling.freemium,context:e};Sapling.appearance.compact||(a.sdk_extended=!0),Sapling.addToDictionary&&(a.sdk_dictionary=!0),Sapling.freemium&&Sapling.userPropertiesLoaded&&!xn()&&delete a.advanced_edits,null!==Sapling.userData&&(a.userData=Sapling.userData),null!==Sapling.neuralSpellcheck&&(a.neural_spellcheck=Sapling.neuralSpellcheck),null!==Sapling.minLength&&(a.min_length=Sapling.minLength),null!==Sapling.medical&&(a.medical=Sapling.medical),um({type:"post",url:o,contentType:"application/json",dataType:"json",data:JSON.stringify(a),xhrFields:{withCredentials:i},success:function(t){var e;e=t.edits&&t.edits[0]&&t.edits[0].error_type?function(t){for(var e=[],n=0;n<t.length;n++){var r=sm(t[n]);e.push(r)}return e}(t.edits):t,n({data:{edits:e},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}var fm={"assets/sapling-176x176.svg":"https://sapling.ai/static/img/logos/sapling-176x176.svg","fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/fa-spinner-solid.svg":"https://sapling.ai/static/img/fa/fa-spinner-solid.svg","assets/fa-chart-column-solid.svg":"https://sapling.ai/static/img/fa/fa-chart-column-solid.svg","assets/xmark-solid.svg":"https://sapling.ai/static/img/xmark-solid.svg","assets/spinner-solid.svg":"https://sapling.ai/static/img/spinner-solid.svg","assets/thumbs-up-regular.svg":"https://sapling.ai/static/img/thumbs-up-regular.svg","assets/thumbs-down-regular.svg":"https://sapling.ai/static/img/thumbs-down-regular.svg","assets/power.svg":"https://sapling.ai/static/img/power.svg"};function pm(){try{return!(!chrome.runtime||!chrome.runtime.id)}catch(t){return!1}}function hm(t){return"SDK"!==l.MODE?chrome.runtime.getURL(t):t in fm?fm[t]:t}function gm(){var t,e;"SDK"===l.MODE&&(Sapling.userToggle&&(t=fm["assets/power.svg"],(e=document.createElement("link")).rel="preload",e.as="image",e.href=t,document.head.appendChild(e)))}function vm(t,e){"SDK"!==l.MODE&&chrome.storage.sync.get(t,e)}function mm(t,e,n){"SDK"!==l.MODE&&chrome.storage.sync.set(t,function(){chrome.runtime.lastError?n&&n():e&&e()})}function ym(t,e){"SDK"!==l.MODE&&chrome.storage.local.get(t,e)}function bm(){return"SDK"!==l.MODE?chrome.runtime.getManifest().version:""}function Dm(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("SDK"===l.MODE){var r=t.data,i=t.action,o=rm(rm({},am()),r.context);"request/GET_EDITS"===i?dm(r.html,o,e,n):"request/GET_COMPLETION"===i?function(t,e,n,r){var i={query:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.completePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{completion:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.query,o,e,n):"request/GET_SHORTCUT_SNIPPETS"===i&&Sapling.snippets?function(t,e){if(om)t({data:om,status:!0,success:!0});else if(h()===l.WEBSITE_HOSTNAME){var n=(new Date).getTimezoneOffset();um({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/snippets/shortcut_snippets?timeZoneOffset=").concat(n),contentType:"application/json",xhrFields:{withCredentials:!0},success:function(e){om=e.snippets,t({data:om,status:!0,success:!0})},error:function(t){e(t.responseJSON)}})}else e({})}(e,n):"request/GET_STATISTICS"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key};um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.statisticsPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{statistics:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_EDIT"===i?function(t,e,n){if("accept"===e||"reject"===e){var r={context:n,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,key:Sapling.key,freemium:Sapling.freemium},i=lm();um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/edits/").concat(t,"/").concat(e),contentType:"application/json",dataType:"json",data:JSON.stringify(r),xhrFields:{withCredentials:i}})}}(r.editHash,r.action,o):"request/GET_AI_DETECTION_SCORES"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.aiDetectPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{aidetect:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/GET_TONE"===i?function(t,e,n,r){var i={text:t,context:e,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.tonePathname),contentType:"application/json",dataType:"json",data:JSON.stringify(i),success:function(t){n({data:{tone:t},status:!0,success:!0})},error:function(t){r(t.responseJSON)}})}(r.html,o,e,n):"request/POST_TONE_FEEDBACK"===i?function(t,e,n,r,i,o,a){var s={html:t,text_type:n,tone_percentage:parseInt(100*e[0]),tone_name:e[1],score:r,context:i,session_id:Sapling.sessionId,user_id:Sapling.userId,is_anon_user:Sapling.isAnonUser,lang:"en",key:Sapling.key};um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix).concat(Sapling.toneFeedbackPathname),contentType:"application/json",dataType:"json",data:JSON.stringify(s),success:function(t){o({data:{tone:t},status:!0,success:!0})},error:function(t){a(t.responseJSON)}})}(r.html,r.toneData,r.textType,r.score,o,e,n):"request/GET_USER"===i?function(){var t=h();if(t===l.WEBSITE_HOSTNAME||Sapling.freemium){var e=lm(t);um({type:"get",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/users/me"),contentType:"application/json",xhrFields:{withCredentials:e},success:function(t){Me(t),Sapling.userPropertiesLoaded=!0},error:function(t){}})}}():"request/POST_DICTIONARY"===i&&function(t){var e={entry:t,case_sensitive:!1,key:Sapling.key},n=lm();um({type:"post",url:"".concat(Sapling.endpointHostname).concat(Sapling.saplingPathPrefix,"/api/v1/dictionary"),contentType:"application/json",dataType:"json",data:JSON.stringify(e),xhrFields:{withCredentials:n}})}(r.entry)}else chrome.runtime.sendMessage(t,function(t){chrome.runtime.lastError?n&&n({message:chrome.runtime.lastError.message}):e&&e(t)})}function wm(t){return new Promise(function(e,n){Dm(t,function(t){e(t)},function(t){n(t)})})}function xm(t,e){localStorage.setItem(t,e);var n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="".concat(t,"=").concat(e,"; expires=").concat(n.toUTCString())}function Am(t){var e=document.cookie.split("; ").find(function(e){return e.trim().startsWith(t)});if(e){var n=e.split("=")[1];if(n&&n.trim().length>0)return n}var r=localStorage.getItem(t);return r&&r.trim().length>0?r:null}var Em=n(216);function Sm(t){return Sm="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},Sm(t)}function _m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Cm(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cm(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Cm(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}var km={addToDictionary:!1,advancedEdits:{advanced_edits:!1},aiDetectPathname:"/api/v1/aidetect",annotationsEnabled:!1,autocomplete:!1,autoShowAdvancedEdits:!1,autoShowAnnotations:!1,checkButton:!1,completePathname:"/api/v1/complete",editActionPathname:"",editPathname:"/api/v1/edits",endpointHostname:"https://api.sapling.ai",edits:!0,ignoreText:"Ignore",isAnonUser:!1,lang:"en",lightningCompat:!1,lightningCompatLeft:0,lightningCompatTop:0,medical:null,mode:"prod",neuralSpellcheck:null,minLength:null,operations:[],saplingPathPrefix:"",shadowRoot:!0,snippets:!1,statisticsPathname:"/api/v1/statistics",statusBadge:!0,toneEnabled:!1,toneFeedbackEnabled:!1,toneFeedbackPathname:"/api/v1/tone/feedback",tonePathname:"/api/v1/tone",userData:null,userId:"",userToggle:!1,userToggleEnabled:null,variety:null,telemetryEndpoint:null,freemium:!1,freemiumUseCookies:!1,customStyles:{badgeTooltipLeft:!1},appearance:{compact:!0,variables:{acceptText:"Accept",ignoreText:"Ignore",badgeSize:null,badgeMargin:null,badgeColor:null,badgeErrorColor:null},customCSS:""}};function Om(t,e){for(var n={},r=0,i=Object.entries(t);r<i.length;r++){var o=_m(i[r],2),a=o[0],s=o[1];a in e?"object"===Sm(s)&&"object"===Sm(e[a])?n[a]=Om(s,e[a]):n[a]=e[a]:n[a]=s}return n}function Tm(t){var e=t.createElement("style");e.textContent="@font-face {\n font-family: 'icomoon';\n src: url(data:application/font-woff;base64,d09GRgABAAAAAAYkAAsAAAAABdgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIM5GNtYXAAAAFoAAAAXAAAAFzwrfDAZ2FzcAAAAcQAAAAIAAAACAAAABBnbHlmAAABzAAAAggAAAIIgIUPmmhlYWQAAAPUAAAANgAAADYbiHinaGhlYQAABAwAAAAkAAAAJAe0A8hobXR4AAAEMAAAABwAAAAcESUAkmxvY2EAAARMAAAAEAAAABAA4AF0bWF4cAAABFwAAAAgAAAAIAAMAD9uYW1lAAAEfAAAAYYAAAGGmUoJ+3Bvc3QAAAYEAAAAIAAAACAAAwAAAAMDSQGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8HEDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAEAAAAAMAAgAAgAEAAEAIPAN8HH//f//AAAAAAAg8Azwcf/9//8AAf/jD/gPlQADAAEAAAAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAEUAUQO7AvgAJAAAARQGBwEOASMiJicBLgE1NDY/AT4BMzIWHwEBPgEzMhYfAR4BFQO7CAj+FAcVCgsVB/7jCAgICE4IFAsKFQioAXYIFQoLFAhOCAgCcwoVB/4UCAgICAEdBxULChUHTggICAioAXcICAgITgcVCwAAAQA/AD8C5gLmADwAACUUBg8BDgEjIiYvAQcOASMiJi8BLgE1NDY/AScuATU0Nj8BPgEzMhYfATc+ATMyFh8BHgEVFAYPARceARUC5gkHTggUCwsUCKioBxULChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwnDChUHTggICAioqAgICAhOBxUKCxUHqKgIFAsLFAhOBwkJB6ioBwkJB04IFAsLFAioqAcVCwAAAAQADv/AA/IDwAADABUAIQAvAAAJASEBNSIGBwEGFjMhMjYnMQEuASMxExQGIyImNTQ2MzIWJyImPQE0NjMyFh0BFAYCAAGt/KYBrREfDf5LGSUzA2YzJRn+Sw0fEUAlGxslJRsbJUAbJSUbGyUlA2P8qQNXXRYX/JksQEAsA2cXFvzAGyUlGxslJWUlG8AbJSUbwBslAAAAAQAAAAEAAKB25qVfDzz1AAsEAAAAAADcO5oVAAAAANw7mhUAAP/AA/IDwAAAAAgAAgAAAAAAAAABAAADwP/AAAAEAAAAAAAD8gABAAAAAAAAAAAAAAAAAAAABwQAAAAAAAAAAAAAAAIAAAAEAABFAyUAPwQAAA4AAAAAAAoAFAAeAFwAuAEEAAEAAAAHAD0ABAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAHAAAAAQAAAAAAAgAHAGAAAQAAAAAAAwAHADYAAQAAAAAABAAHAHUAAQAAAAAABQALABUAAQAAAAAABgAHAEsAAQAAAAAACgAaAIoAAwABBAkAAQAOAAcAAwABBAkAAgAOAGcAAwABBAkAAwAOAD0AAwABBAkABAAOAHwAAwABBAkABQAWACAAAwABBAkABgAOAFIAAwABBAkACgA0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA);\n font-weight: normal;\n font-style: normal;\n}\n\n/* need icon-sapling- because sites like trello use icomoon too */\n[class^=\"icon-sapling-\"], [class*=\" icon-sapling-\"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'icomoon' !important;\n speak: none;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.icon-sapling-accept:before {\n font-family: 'icomoon' !important;\n content: \"\\f00c\";\n}\n.icon-sapling-close:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-remove:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n.icon-sapling-reject:before {\n font-family: 'icomoon' !important;\n content: \"\\f00d\";\n}\n",t.head.appendChild(e)}function Im(t){Sapling.userToggleEnabled=t,xm("sapling-sdk-user-toggle-enabled",t),t?function(){for(var t=0,e=Object.entries(gv);t<e.length;t++){var n=fv(e[t],2);yv({saplingId:n[0],editable:n[1],useVisibleText:!1})}for(var r=0,i=Object.entries(vv);r<i.length;r++){var o=fv(i[r],2);Bd(o[0],o[1].value)}}():function(){for(var t=0,e=Object.entries(ql);t<e.length;t++){for(var n=Rl(e[t],2),r=(n[0],n[1]),i=0,o=Object.entries(r.edits);i<o.length;i++){var a,s=Rl(o[i],2),u=(s[0],Bl(s[1].domElements));try{for(u.s();!(a=u.n()).done;)a.value.remove()}catch(t){u.e(t)}finally{u.f()}}r.edits={}}}()}var jm={};window&&void 0===window.Sapling&&(jm.init=function(t){for(var e,n,r=Om(km,t),i=0,o=Object.entries(r);i<o.length;i++){var a=_m(o[i],2),s=a[0],c=a[1];Sapling[s]=c}if(t.userId||(Sapling.userId=function(){var t="sapling-sdk-anon-user-id",e=Am(t);return e&&"null"!=e||(e="anon-".concat(u())),xm(t,e),e}(),Sapling.isAnonUser=!0),Sapling.saplingPathPrefix.length&&!Sapling.saplingPathPrefix.startsWith("/")&&(Sapling.saplingPathPrefix="/".concat(Sapling.saplingPathPrefix)),bn(t.lang),"key"in t&&("dev"===Sapling.mode||t.key&&t.key.includes("."))&&(Sapling.key=t.key),Sapling.sessionId=u(),e=window.location.href,n=new d(e),f=n.hostname||window.location.hostname,p=n.pathname||window.location.pathname,e||window.location.href,Sapling.freemium&&Re(!0),Jv(),cm("sdk-init"),"headers"in t&&Em.ajaxSetup({beforeSend:function(e){for(var n=0,r=Object.entries(t.headers);n<r.length;n++){var i=_m(r[n],2),o=i[0],a=i[1];e.setRequestHeader(o,a)}}}),Sapling.autoShowAnnotations&&(Sapling.autoShowAdvancedEdits=!0),Sapling.annotationsEnabled&&(Sapling.advancedEdits.advanced_edits=!0),Sapling.userToggle){if(null===Sapling.userToggleEnabled){var l=Am("sapling-sdk-user-toggle-enabled");if(null!==l){var h="true"===String(l).toLowerCase();Sapling.userToggleEnabled=h}}}else Sapling.userToggleEnabled=!0;Sapling.setUserToggleEnabled=Im,Sapling.injectCSS=Tm,Tm(document),gm()},jm.observe=function(t){if(!t)throw new Error("Sapling.observe must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())qv(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.observe must be called on input of type="text".');qv(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,qv(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.observe must be called on textarea, contenteditable, or input.");Bv(t)}},jm.unobserve=function(t){if(!t)throw new Error("Sapling.unobserve must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())Iv(t,!0);else if("input"===t.nodeName.toLowerCase())Iv(t,!0);else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Iv(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.unobserve must be called on textarea, contenteditable, or input.");Iv(t,!1)}},jm.checkOnce=function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{aiDetect:!1}).aiDetect;if(!t)throw new Error("Sapling.checkOnce must be called on a DOM element.");if("textarea"===t.nodeName.toLowerCase())Zv(t);else if("input"===t.nodeName.toLowerCase()){if("text"!==t.type)throw new Error('Sapling.checkOnce must be called on input of type="text".');Zv(t)}else if("lightning-textarea"===t.nodeName.toLowerCase()||"lightning-input-field"===t.nodeName.toLowerCase())Sapling.lightningCompat=!0,Zv(t);else{if("true"!==t.getAttribute("contenteditable")&&""!==t.getAttribute("contenteditable")&&"plaintext-only"!==t.getAttribute("contenteditable"))throw new Error("Sapling.checkOnce must be called on textarea, contenteditable, or input.");Qv(t)}if(e){var n=function(t){var e=Y(t);if(e){var n=ql[e]||{edits:{}},r=n.shadowHost,i=n.badge;return n.aiDetectOverlay||(n.aiDetectOverlay=new gl(r,e,i),n.aiDetectOverlay.createUIElements()),{containerId:e,aiDetectOverlay:n.aiDetectOverlay}}}(t);if(!n)throw new Error("Sapling.checkOnce could not attach the AI detection overlay to this element.");var r=n.containerId,i=n.aiDetectOverlay;!function(t){var e=ql[t];e&&e.aiDetectOverlay&&e.aiDetectOverlay.queryAndUpdate()}(r),i.initForCheckOnce()}},window.Sapling=jm);var Fm=jm},216(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=n(e,!0):n(e)}("undefined"!=typeof window?window:this,function(r,i){"use strict";if(!r.document)throw new Error("jQuery requires a window with a document");var o=[],a=Object.getPrototypeOf,s=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},c=o.push,l=o.indexOf,d={},f=d.toString,p=d.hasOwnProperty,h=p.toString,g=h.call(Object),v={};function m(t){return null==t?t+"":"object"==typeof t?d[f.call(t)]||"object":typeof t}function y(t){return null!=t&&t===t.window}function b(t){var e=!!t&&t.length,n=m(t);return"function"!=typeof t&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}var D=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i=(n=n||D).createElement("script");for(r in i.text=t,w)e&&e[r]&&(i[r]=e[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var A="4.0.0",E=/HTML$/i,S=function(t,e){return new S.fn.init(t,e)};function _(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}S.fn=S.prototype={jquery:A,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=S.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return S.each(this,t)},map:function(t){return this.pushStack(S.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()}},S.extend=S.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"!=typeof a&&"function"!=typeof a&&(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(t=arguments[s]))for(e in t)r=t[e],"__proto__"!==e&&a!==r&&(c&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[e],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[e]=S.extend(c,o,r)):void 0!==r&&(a[e]=r));return a},S.extend({expando:"jQuery"+(A+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==f.call(t))&&(!(e=a(t))||"function"==typeof(n=p.call(e,"constructor")&&e.constructor)&&h.call(n)===g)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(b(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=S.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(b(Object(t))?S.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:l.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!E.test(e||n&&n.nodeName||"HTML")},contains:function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,a=!n;i<o;i++)!e(t[i],i)!==a&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,a=[];if(b(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&a.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&a.push(i);return u(a)},guid:1,support:v}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=o[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){d["[object "+e+"]"]=e.toLowerCase()});var C=o.pop,k="[\\x20\\t\\r\\n\\f]",O=D.documentMode,T=O&&new RegExp(":enabled|:disabled|\\["+k+"*name"+k+"*="+k+"*(?:''|\"\")"),I=new RegExp("^"+k+"+|((?:^|[^\\\\])(?:\\\\.)*)"+k+"+$","g"),j="(?:\\\\[\\da-fA-F]{1,6}"+k+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",F=new RegExp("^"+k+"*([>+~]|"+k+")"+k+"*"),N=new RegExp(k+"|>"),P=/[+~]/,R=D.documentElement,M=R.matches||R.msMatchesSelector;function B(){var t=[];return function e(n,r){return t.push(n+" ")>S.expr.cacheLength&&delete e[t.shift()],e[n+" "]=r}}function L(t){return t&&void 0!==t.getElementsByTagName&&t}var H="\\["+k+"*("+j+")(?:"+k+"*([*^$|!~]?=)"+k+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+j+"))|)"+k+"*\\]",q=":("+j+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",U={ID:new RegExp("^#("+j+")"),CLASS:new RegExp("^\\.("+j+")"),TAG:new RegExp("^("+j+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+k+"*(even|odd|(([+-]|)(\\d*)n|)"+k+"*(?:([+-]|)"+k+"*(\\d+)|))"+k+"*\\)|)","i")},z=new RegExp(q),W=new RegExp("\\\\[\\da-fA-F]{1,6}"+k+"?|\\\\([^\\r\\n\\f])","g"),G=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function $(t){return t.replace(W,G)}function Y(t){S.error("Syntax error, unrecognized expression: "+t)}var V=new RegExp("^"+k+"*,"+k+"*"),K=B();function X(t,e){var n,r,i,o,a,s,u,c=K[t+" "];if(c)return e?0:c.slice(0);for(a=t,s=[],u=S.expr.preFilter;a;){for(o in n&&!(r=V.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=F.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(I," ")}),a=a.slice(n.length)),U)!(r=S.expr.match[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Y(t):K(t,s).slice(0)}var J={ATTR:function(t){return t[1]=$(t[1]),t[3]=$(t[3]||t[4]||t[5]||""),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Y(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Y(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return U.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.test(n)&&(e=X(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}};function Q(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function Z(t,e,n,r,i,o,a){var s=0,u=t.length,c=null==n;if("object"===m(n))for(s in i=!0,n)Z(t,e,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,"function"!=typeof r&&(a=!0),c&&(a?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(S(t),n)})),e))for(;s<u;s++)e(t[s],n,a?r:r.call(t[s],s,e(t[s],n)));return i?t:c?e.call(t):u?e(t[0],n):o}var tt=/[^\x20\t\r\n\f]+/g;S.fn.extend({attr:function(t,e){return Z(this,S.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){S.removeAttr(this,t)})}}),S.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?S.prop(t,e,n):(1===o&&S.isXMLDoc(t)||(i=S.attrHooks[e.toLowerCase()]),void 0!==n?null===n||!1===n&&0!==e.toLowerCase().indexOf("aria-")?void S.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=t.getAttribute(e))??void 0)},attrHooks:{},removeAttr:function(t,e){var n,r=0,i=e&&e.match(tt);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),O&&(S.attrHooks.type={set:function(t,e){if("radio"===e&&_(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}});var et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function nt(t,e){return e?"\0"===t?"\ufffd":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}S.escapeSelector=function(t){return(t+"").replace(et,nt)};var rt,it=o.sort,ot=o.splice;function at(t,e){if(t===e)return rt=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)?t==D||t.ownerDocument==D&&S.contains(D,t)?-1:e==D||e.ownerDocument==D&&S.contains(D,e)?1:0:4&n?-1:1)}S.uniqueSort=function(t){var e,n=[],r=0,i=0;if(rt=!1,it.call(t,at),rt){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)ot.call(t,n[r],1)}return t},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(s.apply(this)))};var st,ut,ct,lt,dt,ft=0,pt=0,ht=B(),gt=B(),vt=B(),mt=new RegExp(k+"+","g"),yt=new RegExp("^"+j+"$"),bt=S.extend({needsContext:new RegExp("^"+k+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+k+"*((?:-\\d)?\\d*)"+k+"*\\)|)(?=[^-]|$)","i")},U),Dt=/^(?:input|select|textarea|button)$/i,wt=/^h\d$/i,xt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,At=function(){It()},Et=Ft(function(t){return!0===t.disabled&&_(t,"fieldset")},{dir:"parentNode",next:"legend"});function St(t,e,n,r){var i,o,a,s,u,l,d,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(It(e),e=e||ct,dt)){if(11!==p&&(u=xt.exec(t)))if(i=u[1]){if(9===p)return(a=e.getElementById(i))&&c.call(n,a),n;if(f&&(a=f.getElementById(i))&&S.contains(e,a))return c.call(n,a),n}else{if(u[2])return c.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return c.apply(n,e.getElementsByClassName(i)),n}if(!(vt[t+" "]||T&&T.test(t))){if(d=t,f=e,1===p&&(N.test(t)||F.test(t))){for(((f=P.test(t)&&L(e.parentNode)||e)!=e||O)&&((s=e.getAttribute("id"))?s=S.escapeSelector(s):e.setAttribute("id",s=S.expando)),o=(l=X(t)).length;o--;)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);d=l.join(",")}try{return c.apply(n,f.querySelectorAll(d)),n}catch(e){vt(t,!0)}finally{s===S.expando&&e.removeAttribute("id")}}}return Lt(t.replace(I,"$1"),e,n,r)}function _t(t){return t[S.expando]=!0,t}function Ct(t){return function(e){return _(e,"input")&&e.type===t}}function kt(t){return function(e){return(_(e,"input")||_(e,"button"))&&e.type===t}}function Ot(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Et(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function Tt(t){return _t(function(e){return e=+e,_t(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function It(t){var e,n=t?t.ownerDocument||t:D;n!=ct&&9===n.nodeType&&(lt=(ct=n).documentElement,dt=!S.isXMLDoc(ct),O&&D!=ct&&(e=ct.defaultView)&&e.top!==e&&e.addEventListener("unload",At))}for(st in St.matches=function(t,e){return St(t,null,null,e)},St.matchesSelector=function(t,e){if(It(t),dt&&!vt[e+" "]&&(!T||!T.test(e)))try{return M.call(t,e)}catch(t){vt(e,!0)}return St(e,ct,null,[t]).length>0},S.expr={cacheLength:50,createPseudo:_t,match:bt,find:{ID:function(t,e){if(void 0!==e.getElementById&&dt){var n=e.getElementById(t);return n?[n]:[]}},TAG:function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},CLASS:function(t,e){if(void 0!==e.getElementsByClassName&&dt)return e.getElementsByClassName(t)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:J,filter:{ID:function(t){var e=$(t);return function(t){return t.getAttribute("id")===e}},TAG:function(t){var e=$(t).toLowerCase();return"*"===t?function(){return!0}:function(t){return _(t,e)}},CLASS:function(t){var e=ht[t+" "];return e||(e=new RegExp("(^|"+k+")"+t+"("+k+"|$)"))&&ht(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=S.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(mt," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,d,f,p,h=o!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),m=!u&&!s,y=!1;if(g){if(o){for(;h;){for(d=e;d=d[h];)if(s?_(d,v):1===d.nodeType)return!1;p=h="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&m){for(y=(f=(c=(l=g[S.expando]||(g[S.expando]={}))[t]||[])[0]===ft&&c[1])&&c[2],d=f&&g.childNodes[f];d=++f&&d&&d[h]||(y=f=0)||p.pop();)if(1===d.nodeType&&++y&&d===e){l[t]=[ft,f,y];break}}else if(m&&(y=f=(c=(l=e[S.expando]||(e[S.expando]={}))[t]||[])[0]===ft&&c[1]),!1===y)for(;(d=++f&&d&&d[h]||(y=f=0)||p.pop())&&(!(s?_(d,v):1===d.nodeType)||!++y||(m&&((l=d[S.expando]||(d[S.expando]={}))[t]=[ft,y]),d!==e)););return(y-=i)===r||y%r===0&&y/r>=0}}},PSEUDO:function(t,e){var n=S.expr.pseudos[t]||S.expr.setFilters[t.toLowerCase()]||Y("unsupported pseudo: "+t);return n[S.expando]?n(e):n}},pseudos:{not:_t(function(t){var e=[],n=[],r=Bt(t.replace(I,"$1"));return r[S.expando]?_t(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:_t(function(t){return function(e){return St(t,e).length>0}}),contains:_t(function(t){return t=$(t),function(e){return(e.textContent||S.text(e)).indexOf(t)>-1}}),lang:_t(function(t){return yt.test(t||"")||Y("unsupported lang: "+t),t=$(t).toLowerCase(),function(e){var n;do{if(n=dt?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===lt},focus:function(t){return t===ct.activeElement&&ct.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:Ot(!1),disabled:Ot(!0),checked:function(t){return _(t,"input")&&!!t.checked||_(t,"option")&&!!t.selected},selected:function(t){return O&&t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!S.expr.pseudos.empty(t)},header:function(t){return wt.test(t.nodeName)},input:function(t){return Dt.test(t.nodeName)},button:function(t){return _(t,"input")&&"button"===t.type||_(t,"button")},text:function(t){return _(t,"input")&&"text"===t.type},first:Tt(function(){return[0]}),last:Tt(function(t,e){return[e-1]}),eq:Tt(function(t,e,n){return[n<0?n+e:n]}),even:Tt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:Tt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:Tt(function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t}),gt:Tt(function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t})}},S.expr.pseudos.nth=S.expr.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.expr.pseudos[st]=Ct(st);for(st in{submit:!0,reset:!0})S.expr.pseudos[st]=kt(st);function jt(){}function Ft(t,e,n){var r=e.dir,i=e.next,o=i||r,a=n&&"parentNode"===o,s=pt++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||a)return t(e,n,i);return!1}:function(e,n,u){var c,l,d=[ft,s];if(u){for(;e=e[r];)if((1===e.nodeType||a)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||a)if(l=e[S.expando]||(e[S.expando]={}),i&&_(e,i))e=e[r]||e;else{if((c=l[o])&&c[0]===ft&&c[1]===s)return d[2]=c[2];if(l[o]=d,d[2]=t(e,n,u))return!0}return!1}}function Nt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function Pt(t,e,n,r,i){for(var o,a=[],s=0,u=t.length,c=null!=e;s<u;s++)(o=t[s])&&(n&&!n(o,r,i)||(a.push(o),c&&e.push(s)));return a}function Rt(t,e,n,r,i,o){return r&&!r[S.expando]&&(r=Rt(r)),i&&!i[S.expando]&&(i=Rt(i,o)),_t(function(o,a,s,u){var d,f,p,h,g=[],v=[],m=a.length,y=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)St(t,e[r],n);return n}(e||"*",s.nodeType?[s]:s,[]),b=!t||!o&&e?y:Pt(y,g,t,s,u);if(n?n(b,h=i||(o?t:m||r)?[]:a,s,u):h=b,r)for(d=Pt(h,v),r(d,[],s,u),f=d.length;f--;)(p=d[f])&&(h[v[f]]=!(b[v[f]]=p));if(o){if(i||t){if(i){for(d=[],f=h.length;f--;)(p=h[f])&&d.push(b[f]=p);i(null,h=[],d,u)}for(f=h.length;f--;)(p=h[f])&&(d=i?l.call(o,p):g[f])>-1&&(o[d]=!(a[d]=p))}}else h=Pt(h===a?h.splice(m,h.length):h),i?i(null,a,h,u):c.apply(a,h)})}function Mt(t){for(var e,n,r,i=t.length,o=S.expr.relative[t[0].type],a=o||S.expr.relative[" "],s=o?1:0,u=Ft(function(t){return t===e},a,!0),c=Ft(function(t){return l.call(e,t)>-1},a,!0),d=[function(t,n,r){var i=!o&&(r||n!=ut)||((e=n).nodeType?u(t,n,r):c(t,n,r));return e=null,i}];s<i;s++)if(n=S.expr.relative[t[s].type])d=[Ft(Nt(d),n)];else{if((n=S.expr.filter[t[s].type].apply(null,t[s].matches))[S.expando]){for(r=++s;r<i&&!S.expr.relative[t[r].type];r++);return Rt(s>1&&Nt(d),s>1&&Q(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(I,"$1"),n,s<r&&Mt(t.slice(s,r)),r<i&&Mt(t=t.slice(r)),r<i&&Q(t))}d.push(n)}return Nt(d)}function Bt(t,e){var n,r=[],i=[],o=gt[t+" "];if(!o){for(e||(e=X(t)),n=e.length;n--;)(o=Mt(e[n]))[S.expando]?r.push(o):i.push(o);o=gt(t,function(t,e){var n=e.length>0,r=t.length>0,i=function(i,o,a,s,u){var l,d,f,p=0,h="0",g=i&&[],v=[],m=ut,y=i||r&&S.expr.find.TAG("*",u),b=ft+=null==m?1:Math.random()||.1;for(u&&(ut=o==ct||o||u);null!=(l=y[h]);h++){if(r&&l){for(d=0,o||l.ownerDocument==ct||(It(l),a=!dt);f=t[d++];)if(f(l,o||ct,a)){c.call(s,l);break}u&&(ft=b)}n&&((l=!f&&l)&&p--,i&&g.push(l))}if(p+=h,n&&h!==p){for(d=0;f=e[d++];)f(g,v,o,a);if(i){if(p>0)for(;h--;)g[h]||v[h]||(v[h]=C.call(s));v=Pt(v)}c.apply(s,v),u&&!i&&v.length>0&&p+e.length>1&&S.uniqueSort(s)}return u&&(ft=b,ut=m),g};return n?_t(i):i}(i,r)),o.selector=t}return o}function Lt(t,e,n,r){var i,o,a,s,u,l="function"==typeof t&&t,d=!r&&X(t=l.selector||t);if(n=n||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===e.nodeType&&dt&&S.expr.relative[o[1].type]){if(!(e=(S.expr.find.ID($(a.matches[0]),e)||[])[0]))return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=bt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!S.expr.relative[s=a.type]);)if((u=S.expr.find[s])&&(r=u($(a.matches[0]),P.test(o[0].type)&&L(e.parentNode)||e))){if(o.splice(i,1),!(t=r.length&&Q(o)))return c.apply(n,r),n;break}}return(l||Bt(t,d))(r,e,!dt,n,!e||P.test(t)&&L(e.parentNode)||e),n}function Ht(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&S(t).is(n))break;r.push(t)}return r}function qt(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}jt.prototype=S.expr.pseudos,S.expr.setFilters=new jt,It(),S.find=St,St.compile=Bt,St.select=Lt,St.setDocument=It,St.tokenize=X;var Ut=S.expr.match.needsContext,zt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Wt(t){return"<"===t[0]&&">"===t[t.length-1]&&t.length>=3}function Gt(t,e,n){return"function"==typeof e?S.grep(t,function(t,r){return!!e.call(t,r,t)!==n}):e.nodeType?S.grep(t,function(t){return t===e!==n}):"string"!=typeof e?S.grep(t,function(t){return l.call(e,t)>-1!==n}):S.filter(e,t,n)}S.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?S.find.matchesSelector(r,t)?[r]:[]:S.find.matches(t,S.grep(e,function(t){return 1===t.nodeType}))},S.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(S(t).filter(function(){for(e=0;e<r;e++)if(S.contains(i[e],this))return!0}));for(n=this.pushStack([]),e=0;e<r;e++)S.find(t,i[e],n);return r>1?S.uniqueSort(n):n},filter:function(t){return this.pushStack(Gt(this,t||[],!1))},not:function(t){return this.pushStack(Gt(this,t||[],!0))},is:function(t){return!!Gt(this,"string"==typeof t&&Ut.test(t)?S(t):t||[],!1).length}});var $t,Yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(t,e){var n,r;if(!t)return this;if(t.nodeType)return this[0]=t,this.length=1,this;if("function"==typeof t)return void 0!==$t.ready?$t.ready(t):t(S);if(Wt(n=t+""))n=[null,t,null];else{if("string"!=typeof t)return S.makeArray(t,this);n=Yt.exec(t)}if(!n||!n[1]&&e)return!e||e.jquery?(e||$t).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof S?e[0]:e,S.merge(this,S.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:D,!0)),zt.test(n[1])&&S.isPlainObject(e))for(n in e)"function"==typeof this[n]?this[n](e[n]):this.attr(n,e[n]);return this}return(r=D.getElementById(n[2]))&&(this[0]=r,this.length=1),this}).prototype=S.fn,$t=S(D);var Vt=/^(?:parents|prev(?:Until|All))/,Kt={children:!0,contents:!0,next:!0,prev:!0};function Xt(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function Jt(t){return t}function Qt(t){throw t}function Zt(t,e,n,r){var i;try{t&&"function"==typeof(i=t.promise)?i.call(t).done(e).fail(n):t&&"function"==typeof(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n(t)}}S.fn.extend({has:function(t){var e=S(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(S.contains(this,e[t]))return!0})},closest:function(t,e){var n,r=0,i=this.length,o=[],a="string"!=typeof t&&S(t);if(!Ut.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&S.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(S(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),S.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Ht(t,"parentNode")},parentsUntil:function(t,e,n){return Ht(t,"parentNode",n)},next:function(t){return Xt(t,"nextSibling")},prev:function(t){return Xt(t,"previousSibling")},nextAll:function(t){return Ht(t,"nextSibling")},prevAll:function(t){return Ht(t,"previousSibling")},nextUntil:function(t,e,n){return Ht(t,"nextSibling",n)},prevUntil:function(t,e,n){return Ht(t,"previousSibling",n)},siblings:function(t){return qt((t.parentNode||{}).firstChild,t)},children:function(t){return qt(t.firstChild)},contents:function(t){return null!=t.contentDocument&&a(t.contentDocument)?t.contentDocument:(_(t,"template")&&(t=t.content||t),S.merge([],t.childNodes))}},function(t,e){S.fn[t]=function(n,r){var i=S.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=S.filter(r,i)),this.length>1&&(Kt[t]||S.uniqueSort(i),Vt.test(t)&&i.reverse()),this.pushStack(i)}}),S.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return S.each(t.match(tt)||[],function(t,n){e[n]=!0}),e}(t):S.extend({},t);var e,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||t.once,r=e=!0;a.length;s=-1)for(n=a.shift();++s<o.length;)!1===o[s].apply(n[0],n[1])&&t.stopOnFalse&&(s=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},c={add:function(){return o&&(n&&!e&&(s=o.length-1,a.push(n)),function e(n){S.each(n,function(n,r){"function"==typeof r?t.unique&&c.has(r)||o.push(r):r&&r.length&&"string"!==m(r)&&e(r)})}(arguments),n&&!e&&u()),this},remove:function(){return S.each(arguments,function(t,e){for(var n;(n=S.inArray(e,o,n))>-1;)o.splice(n,1),n<=s&&s--}),this},has:function(t){return t?S.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},S.extend({Deferred:function(t){var e=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return S.Deferred(function(n){S.each(e,function(e,r){var i="function"==typeof t[r[4]]&&t[r[4]];o[r[1]](function(){var t=i&&i.apply(this,arguments);t&&"function"==typeof t.promise?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)})}),t=null}).promise()},then:function(t,n,i){var o=0;function a(t,e,n,i){return function(){var s=this,u=arguments,c=function(){var r,c;if(!(t<o)){if((r=n.apply(s,u))===e.promise())throw new TypeError("Thenable self-resolution");"function"==typeof(c=r&&("object"==typeof r||"function"==typeof r)&&r.then)?i?c.call(r,a(o,e,Jt,i),a(o,e,Qt,i)):(o++,c.call(r,a(o,e,Jt,i),a(o,e,Qt,i),a(o,e,Jt,e.notifyWith))):(n!==Jt&&(s=void 0,u=[r]),(i||e.resolveWith)(s,u))}},l=i?c:function(){try{c()}catch(r){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(r,l.error),t+1>=o&&(n!==Qt&&(s=void 0,u=[r]),e.rejectWith(s,u))}};t?l():(S.Deferred.getErrorHook&&(l.error=S.Deferred.getErrorHook()),r.setTimeout(l))}}return S.Deferred(function(r){e[0][3].add(a(0,r,"function"==typeof i?i:Jt,r.notifyWith)),e[1][3].add(a(0,r,"function"==typeof t?t:Jt)),e[2][3].add(a(0,r,"function"==typeof n?n:Qt))}).promise()},promise:function(t){return null!=t?S.extend(t,i):i}},o={};return S.each(e,function(t,r){var a=r[2],s=r[5];i[r[1]]=a.add,s&&a.add(function(){n=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=s.call(arguments),o=S.Deferred(),a=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?s.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&(Zt(t,o.done(a(n)).resolve,o.reject,!e),"pending"===o.state()||"function"==typeof(i[n]&&i[n].then)))return o.then();for(;n--;)Zt(i[n],a(n),o.reject);return o.promise()}});var te=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,e){t&&te.test(t.name)&&r.console.warn("jQuery.Deferred exception",t,e)},S.readyException=function(t){r.setTimeout(function(){throw t})};var ee=S.Deferred();function ne(){D.removeEventListener("DOMContentLoaded",ne),r.removeEventListener("load",ne),S.ready()}S.fn.ready=function(t){return ee.then(t).catch(function(t){S.readyException(t)}),this},S.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==t&&--S.readyWait>0||ee.resolveWith(D,[S]))}}),S.ready.then=ee.then,"loading"!==D.readyState?r.setTimeout(S.ready):(D.addEventListener("DOMContentLoaded",ne),r.addEventListener("load",ne));var re=/-([a-z])/g;function ie(t,e){return e.toUpperCase()}function oe(t){return t.replace(re,ie)}function ae(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function se(){this.expando=S.expando+se.uid++}se.uid=1,se.prototype={cache:function(t){var e=t[this.expando];return e||(e=Object.create(null),ae(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[oe(e)]=n;else for(r in e)i[oe(r)]=e[r];return n},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][oe(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(oe):(e=oe(e))in r?[e]:e.match(tt)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||S.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!S.isEmptyObject(e)}};var ue=new se,ce=new se,le=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,de=/[A-Z]/g;function fe(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(de,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:le.test(t)?JSON.parse(t):t)}(n)}catch(t){}ce.set(t,e,n)}else n=void 0;return n}S.extend({hasData:function(t){return ce.hasData(t)||ue.hasData(t)},data:function(t,e,n){return ce.access(t,e,n)},removeData:function(t,e){ce.remove(t,e)},_data:function(t,e,n){return ue.access(t,e,n)},_removeData:function(t,e){ue.remove(t,e)}}),S.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=ce.get(o),1===o.nodeType&&!ue.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=oe(r.slice(5)),fe(o,r,i[r]));ue.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each(function(){ce.set(this,t)}):Z(this,function(e){var n;if(o&&void 0===e)return void 0!==(n=ce.get(o,t))||void 0!==(n=fe(o,t))?n:void 0;this.each(function(){ce.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ce.remove(this,t)})}}),S.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=ue.get(t,e),n&&(!r||Array.isArray(n)?r=ue.set(t,e,S.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=S.queue(t,e),r=n.length,i=n.shift(),o=S._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,function(){S.dequeue(t,e)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ue.get(t,n)||ue.set(t,n,{empty:S.Callbacks("once memory").add(function(){ue.remove(t,[e+"queue",n])})})}}),S.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?S.queue(this[0],t):void 0===e?this:this.each(function(){var n=S.queue(this,t,e);S._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&S.dequeue(this,t)})},dequeue:function(t){return this.each(function(){S.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=S.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)(n=ue.get(o[a],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(e)}});var pe=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,he=new RegExp("^(?:([+-])=|)("+pe+")([a-z%]*)$","i"),ge=["Top","Right","Bottom","Left"];function ve(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&"none"===S.css(t,"display")}var me=/^[a-z]/,ye=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function be(t){return me.test(t)&&ye.test(t[0].toUpperCase()+t.slice(1))}function De(t,e,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return S.css(t,e,"")},u=s(),c=n&&n[3]||(be(e)?"px":""),l=t.nodeType&&(!be(e)||"px"!==c&&+u)&&he.exec(S.css(t,e));if(l&&l[3]!==c){for(u/=2,c=c||l[3],l=+u||1;a--;)S.style(t,e,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;l*=2,S.style(t,e,l+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}var we=/^-ms-/;function xe(t){return oe(t.replace(we,"ms-"))}var Ae={};function Ee(t){var e,n=t.ownerDocument,r=t.nodeName,i=Ae[r];return i||(e=n.body.appendChild(n.createElement(r)),i=S.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),Ae[r]=i,i)}function Se(t,e){for(var n,r,i=[],o=0,a=t.length;o<a;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=ue.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ve(r)&&(i[o]=Ee(r))):"none"!==n&&(i[o]="none",ue.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}S.fn.extend({show:function(){return Se(this,!0)},hide:function(){return Se(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ve(this)?S(this).show():S(this).hide()})}});var _e=function(t){return S.contains(t.ownerDocument,t)||t.getRootNode(Ce)===t.ownerDocument},Ce={composed:!0};R.getRootNode||(_e=function(t){return S.contains(t.ownerDocument,t)});var ke=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Oe={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function Te(t,e){var n;return n=void 0!==t.getElementsByTagName?o.slice.call(t.getElementsByTagName(e||"*")):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&_(t,e)?S.merge([t],n):n}Oe.tbody=Oe.tfoot=Oe.colgroup=Oe.caption=Oe.thead,Oe.th=Oe.td;var Ie=/^$|^module$|\/(?:java|ecma)script/i;function je(t,e){for(var n=0,r=t.length;n<r;n++)ue.set(t[n],"globalEval",!e||ue.get(e[n],"globalEval"))}var Fe=/<|&#?\w+;/;function Ne(t,e,n,r,i){for(var a,s,u,c,l,d,f=e.createDocumentFragment(),p=[],h=0,g=t.length;h<g;h++)if((a=t[h])||0===a)if("object"===m(a)&&(a.nodeType||b(a)))S.merge(p,a.nodeType?[a]:a);else if(Fe.test(a)){for(s=s||f.appendChild(e.createElement("div")),u=(ke.exec(a)||["",""])[1].toLowerCase(),d=(c=Oe[u]||o).length;--d>-1;)s=s.appendChild(e.createElement(c[d]));s.innerHTML=S.htmlPrefilter(a),S.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(e.createTextNode(a));for(f.textContent="",h=0;a=p[h++];)if(r&&S.inArray(a,r)>-1)i&&i.push(a);else if(l=_e(a),s=Te(f.appendChild(a),"script"),l&&je(s),n)for(d=0;a=s[d++];)Ie.test(a.type||"")&&n.push(a);return f}function Pe(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Re(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Me(t,e,n,r){e=u(e);var i,o,a,s,c,l,d=0,f=t.length,p=f-1,h=e[0];if("function"==typeof h)return t.each(function(i){var o=t.eq(i);e[0]=h.call(this,i,o.html()),Me(o,e,n,r)});if(f&&(o=(i=Ne(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=S.map(Te(i,"script"),Pe)).length;d<f;d++)c=i,d!==p&&(c=S.clone(c,!0,!0),s&&S.merge(a,Te(c,"script"))),n.call(t[d],c,d);if(s)for(l=a[a.length-1].ownerDocument,S.map(a,Re),d=0;d<s;d++)c=a[d],Ie.test(c.type||"")&&!ue.get(c,"globalEval")&&S.contains(l,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?S._evalUrl&&!c.noModule&&S._evalUrl(c.src,{nonce:c.nonce,crossOrigin:c.crossOrigin},l):x(c.textContent,c,l))}return t}var Be=/^(?:checkbox|radio)$/i,Le=/^([^.]*)(?:\.(.+)|)/;function He(){return!0}function qe(){return!1}function Ue(t,e,n,r,i,o){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(r=r||n,n=void 0),e)Ue(t,s,n,r,e[s],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return t;return 1===o&&(a=i,i=function(t){return S().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=S.guid++)),t.each(function(){S.event.add(this,e,i,r,n)})}function ze(t,e,n){n?(ue.set(t,e,!1),S.event.add(t,e,{namespace:!1,handler:function(t){var n,r=ue.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(S.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=s.call(arguments),ue.set(this,e,r),this[e](),n=ue.get(this,e),ue.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n&&n.value}else r.length&&(ue.set(this,e,{value:S.event.trigger(r[0],r.slice(1),this)}),t.stopPropagation(),t.isImmediatePropagationStopped=He)}})):void 0===ue.get(t,e)&&S.event.add(t,e,He)}S.event={add:function(t,e,n,r,i){var o,a,s,u,c,l,d,f,p,h,g,v=ue.get(t);if(ae(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&S.find.matchesSelector(R,i),n.guid||(n.guid=S.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return void 0!==S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(tt)||[""]).length;c--;)p=g=(s=Le.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),p&&(d=S.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,d=S.event.special[p]||{},l=S.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&S.expr.match.needsContext.test(i),namespace:h.join(".")},o),(f=u[p])||((f=u[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),d.add&&(d.add.call(t,l),l.handler.guid||(l.handler.guid=n.guid)),i?f.splice(f.delegateCount++,0,l):f.push(l))},remove:function(t,e,n,r,i){var o,a,s,u,c,l,d,f,p,h,g,v=ue.hasData(t)&&ue.get(t);if(v&&(u=v.events)){for(c=(e=(e||"").match(tt)||[""]).length;c--;)if(p=g=(s=Le.exec(e[c])||[])[1],h=(s[2]||"").split(".").sort(),p){for(d=S.event.special[p]||{},f=u[p=(r?d.delegateType:d.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)l=f[o],!i&&g!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(f.splice(o,1),l.selector&&f.delegateCount--,d.remove&&d.remove.call(t,l));a&&!f.length&&(d.teardown&&!1!==d.teardown.call(t,h,v.handle)||S.removeEvent(t,p,v.handle),delete u[p])}else for(p in u)S.event.remove(t,p+e[c],n,r,!0);S.isEmptyObject(u)&&ue.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,a,s=new Array(arguments.length),u=S.event.fix(t),c=(ue.get(this,"events")||Object.create(null))[u.type]||[],l=S.event.special[u.type]||{};for(s[0]=u,e=1;e<arguments.length;e++)s[e]=arguments[e];if(u.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,u)){for(a=S.event.handlers.call(this,u,c),e=0;(i=a[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((S.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,o,a,s=[],u=e.delegateCount,c=t.target;if(u&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=e[n]).selector+" "]&&(a[i]=r.needsContext?S(i,this).index(c)>-1:S.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<e.length&&s.push({elem:c,handlers:e.slice(u)}),s},addProp:function(t,e){Object.defineProperty(S.Event.prototype,t,{enumerable:!0,configurable:!0,get:"function"==typeof e?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[S.expando]?t:new S.Event(t)},special:S.extend(Object.create(null),{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Be.test(e.type)&&e.click&&_(e,"input")&&ze(e,"click",!0),!1},trigger:function(t){var e=this||t;return Be.test(e.type)&&e.click&&_(e,"input")&&ze(e,"click"),!0},_default:function(t){var e=t.target;return Be.test(e.type)&&e.click&&_(e,"input")&&ue.get(e,"click")||_(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.preventDefault()}}})},S.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},S.Event=function(t,e){if(!(this instanceof S.Event))return new S.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented?He:qe,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&S.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=He,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=He,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=He,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(t,e){function n(t){var e=S.event.fix(t);e.type="focusin"===t.type?"focus":"blur",e.isSimulated=!0,e.target===e.currentTarget&&ue.get(this,"handle")(e)}S.event.special[t]={setup:function(){if(ze(this,t,!0),!O)return!1;this.addEventListener(e,n)},trigger:function(){return ze(this,t),!0},teardown:function(){if(!O)return!1;this.removeEventListener(e,n)},_default:function(e){return ue.get(e.target,t)},delegateType:e}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){S.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||S.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}}),S.fn.extend({on:function(t,e,n,r){return Ue(this,t,e,n,r)},one:function(t,e,n,r){return Ue(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,S(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=qe),this.each(function(){S.event.remove(this,t,n,e)})}});var We=/<script|<style|<link/i;function Ge(t,e){return _(t,"table")&&_(11!==e.nodeType?e:e.firstChild,"tr")&&S(t).children("tbody")[0]||t}function $e(t,e){var n,r,i,o=ue.get(t,"events");if(1===e.nodeType){if(o)for(n in ue.remove(e,"handle events"),o)for(r=0,i=o[n].length;r<i;r++)S.event.add(e,n,o[n][r]);ce.hasData(t)&&ce.set(e,S.extend({},ce.get(t)))}}function Ye(t,e,n){for(var r,i=e?S.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||S.cleanData(Te(r)),r.parentNode&&(n&&_e(r)&&je(Te(r,"script")),r.parentNode.removeChild(r));return t}S.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,a,s=t.cloneNode(!0),u=_e(t);if(O&&(1===t.nodeType||11===t.nodeType)&&!S.isXMLDoc(t))for(a=Te(s),r=0,i=(o=Te(t)).length;r<i;r++)_(a[r],"textarea")&&(a[r].defaultValue=o[r].defaultValue);if(e)if(n)for(o=o||Te(t),a=a||Te(s),r=0,i=o.length;r<i;r++)$e(o[r],a[r]);else $e(t,s);return(a=Te(s,"script")).length>0&&je(a,!u&&Te(t,"script")),s},cleanData:function(t){for(var e,n,r,i=S.event.special,o=0;void 0!==(n=t[o]);o++)if(ae(n)){if(e=n[ue.expando]){if(e.events)for(r in e.events)i[r]?S.event.remove(n,r):S.removeEvent(n,r,e.handle);n[ue.expando]=void 0}n[ce.expando]&&(n[ce.expando]=void 0)}}}),S.fn.extend({detach:function(t){return Ye(this,t,!0)},remove:function(t){return Ye(this,t)},text:function(t){return Z(this,function(t){return void 0===t?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Me(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ge(this,t).appendChild(t)})},prepend:function(){return Me(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ge(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Me(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Me(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(S.cleanData(Te(t,!1)),t.textContent="");return this},clone:function(t,e){return t=t??!1,e=e??t,this.map(function(){return S.clone(this,t,e)})},html:function(t){return Z(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!We.test(t)&&!Oe[(ke.exec(t)||["",""])[1].toLowerCase()]){t=S.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(S.cleanData(Te(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Me(this,arguments,function(e){var n=this.parentNode;S.inArray(this,t)<0&&(S.cleanData(Te(this)),n&&n.replaceChild(e,this))},t)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){S.fn[t]=function(t){for(var n,r=[],i=S(t),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),S(i[a])[e](n),c.apply(r,n);return this.pushStack(r)}});var Ve=new RegExp("^("+pe+")(?!px)[a-z%]+$","i"),Ke=/^--/;function Xe(t){var e=t.ownerDocument.defaultView;return e||(e=r),e.getComputedStyle(t)}function Je(t,e,n){var r,i=Ke.test(e);return(n=n||Xe(t))&&(r=n.getPropertyValue(e)||n[e],i&&r&&(r=r.replace(I,"$1")||void 0),""!==r||_e(t)||(r=S.style(t,e))),void 0!==r?r+"":r}var Qe=["Webkit","Moz","ms"],Ze=D.createElement("div").style;function tn(t){return t in Ze?t:function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Qe.length;n--;)if((t=Qe[n]+e)in Ze)return t}(t)||t}var en,nn,rn=D.createElement("table");function on(){if(rn&&rn.style){var t,e=D.createElement("col"),n=D.createElement("tr"),i=D.createElement("td");rn.style.cssText="position:absolute;left:-11111px;border-collapse:separate;border-spacing:0",n.style.cssText="box-sizing:content-box;border:1px solid;height:1px",i.style.cssText="height:9px;width:9px;padding:0",e.span=2,R.appendChild(rn).appendChild(e).parentNode.appendChild(n).appendChild(i).parentNode.appendChild(i.cloneNode(!0)),0!==rn.offsetWidth?(t=r.getComputedStyle(n),nn=O||18===Math.round(parseFloat(r.getComputedStyle(e).width)),en=Math.round(parseFloat(t.height)+parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth))===n.offsetHeight,R.removeChild(rn),rn=null):R.removeChild(rn)}}S.extend(v,{reliableTrDimensions:function(){return on(),en},reliableColDimensions:function(){return on(),nn}});var an={position:"absolute",visibility:"hidden",display:"block"},sn={letterSpacing:"0",fontWeight:"400"};function un(t,e,n){var r=he.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function cn(t,e,n,r,i,o){var a="width"===e?1:0,s=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=S.css(t,n+ge[a],!0,i)),r?("content"===n&&(u-=S.css(t,"padding"+ge[a],!0,i)),"margin"!==n&&(u-=S.css(t,"border"+ge[a]+"Width",!0,i))):(u+=S.css(t,"padding"+ge[a],!0,i),"padding"!==n?u+=S.css(t,"border"+ge[a]+"Width",!0,i):s+=S.css(t,"border"+ge[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-u-s-.5))||0),u+c}function ln(t,e,n){var r=Xe(t),i=(O||n)&&"border-box"===S.css(t,"boxSizing",!1,r),o=i,a=Je(t,e,r),s="offset"+e[0].toUpperCase()+e.slice(1);if(Ve.test(a)){if(!n)return a;a="auto"}return("auto"===a||O&&i||!v.reliableColDimensions()&&_(t,"col")||!v.reliableTrDimensions()&&_(t,"tr"))&&t.getClientRects().length&&(i="border-box"===S.css(t,"boxSizing",!1,r),(o=s in t)&&(a=t[s])),(a=parseFloat(a)||0)+cn(t,e,n||(i?"border":"content"),o,r,a)+"px"}function dn(t,e,n,r,i){return new dn.prototype.init(t,e,n,r,i)}S.extend({cssHooks:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,s=xe(e),u=Ke.test(e),c=t.style;if(u||(e=tn(s)),a=S.cssHooks[e]||S.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:c[e];"string"===(o=typeof n)&&(i=he.exec(n))&&i[1]&&(n=De(t,e,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(be(s)?"px":"")),O&&""===n&&0===e.indexOf("background")&&(c[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,o,a,s=xe(e);return Ke.test(e)||(e=tn(s)),(a=S.cssHooks[e]||S.cssHooks[s])&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=Je(t,e,r)),"normal"===i&&e in sn&&(i=sn[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),S.each(["height","width"],function(t,e){S.cssHooks[e]={get:function(t,n,r){if(n)return"none"===S.css(t,"display")?function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r}(t,an,function(){return ln(t,e,r)}):ln(t,e,r)},set:function(t,n,r){var i,o=Xe(t),a=r&&"border-box"===S.css(t,"boxSizing",!1,o),s=r?cn(t,e,r,a,o):0;return s&&(i=he.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=S.css(t,e)),un(0,n,s)}}}),S.each({margin:"",padding:"",border:"Width"},function(t,e){S.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+ge[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(S.cssHooks[t+e].set=un)}),S.fn.extend({css:function(t,e){return Z(this,function(t,e,n){var r,i,o={},a=0;if(Array.isArray(e)){for(r=Xe(t),i=e.length;a<i;a++)o[e[a]]=S.css(t,e[a],!1,r);return o}return void 0!==n?S.style(t,e,n):S.css(t,e)},t,e,arguments.length>1)}}),S.Tween=dn,dn.prototype={constructor:dn,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||S.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(be(n)?"px":"")},cur:function(){var t=dn.propHooks[this.prop];return t&&t.get?t.get(this):dn.propHooks._default.get(this)},run:function(t){var e,n=dn.propHooks[this.prop];return this.options.duration?this.pos=e=S.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):dn.propHooks._default.set(this),this}},dn.prototype.init.prototype=dn.prototype,dn.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=S.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){S.fx.step[t.prop]?S.fx.step[t.prop](t):1!==t.elem.nodeType||!S.cssHooks[t.prop]&&null==t.elem.style[tn(t.prop)]?t.elem[t.prop]=t.now:S.style(t.elem,t.prop,t.now+t.unit)}}},S.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},S.fx=dn.prototype.init,S.fx.step={};var fn,pn,hn=/^(?:toggle|show|hide)$/,gn=/queueHooks$/;function vn(){pn&&(!1===D.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(vn):r.setTimeout(vn,13),S.fx.tick())}function mn(){return r.setTimeout(function(){fn=void 0}),fn=Date.now()}function yn(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=ge[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function bn(t,e,n){for(var r,i=(Dn.tweeners[e]||[]).concat(Dn.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,e,t))return r}function Dn(t,e,n){var r,i,o=0,a=Dn.prefilters.length,s=S.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=fn||mn(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),o=0,a=c.tweens.length;o<a;o++)c.tweens[o].run(r);return s.notifyWith(t,[c,r,n]),r<1&&a?n:(a||s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c]),!1)},c=s.promise({elem:t,props:S.extend({},e),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},n),originalProperties:e,originalOptions:n,startTime:fn||mn(),duration:n.duration,tweens:[],createTween:function(e,n){var r=S.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(s.notifyWith(t,[c,1,0]),s.resolveWith(t,[c,e])):s.rejectWith(t,[c,e]),this}}),l=c.props;for(!function(t,e){var n,r,i,o,a;for(n in t)if(i=e[r=xe(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(a=S.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(l,c.opts.specialEasing);o<a;o++)if(r=Dn.prefilters[o].call(c,t,l,c.opts))return"function"==typeof r.stop&&(S._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return S.map(l,bn,c),"function"==typeof c.opts.start&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),S.fx.timer(S.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}S.Animation=S.extend(Dn,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return De(n.elem,t,he.exec(e),n),n}]},tweener:function(t,e){"function"==typeof t?(e=t,t=["*"]):t=t.match(tt);for(var n,r=0,i=t.length;r<i;r++)n=t[r],Dn.tweeners[n]=Dn.tweeners[n]||[],Dn.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,a,s,u,c,l,d="width"in e||"height"in e,f=this,p={},h=t.style,g=t.nodeType&&ve(t),v=ue.get(t,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,S.queue(t,"fx").length||a.empty.fire()})})),e)if(i=e[r],hn.test(i)){if(delete e[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}p[r]=v&&v[r]||S.style(t,r)}if((u=!S.isEmptyObject(e))||!S.isEmptyObject(p))for(r in d&&1===t.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(c=v&&v.display)&&(c=ue.get(t,"display")),"none"===(l=S.css(t,"display"))&&(c?l=c:(Se([t],!0),c=t.style.display||c,l=S.css(t,"display"),Se([t]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===S.css(t,"float")&&(u||(f.done(function(){h.display=c}),null==c&&(l=h.display,c="none"===l?"":l)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",f.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,p)u||(v?"hidden"in v&&(g=v.hidden):v=ue.set(t,"fxshow",{display:c}),o&&(v.hidden=!g),g&&Se([t],!0),f.done(function(){for(r in g||Se([t]),ue.remove(t,"fxshow"),p)S.style(t,r,p[r])})),u=bn(g?v[r]:0,r,f),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?Dn.prefilters.unshift(t):Dn.prefilters.push(t)}}),S.speed=function(t,e,n){var r=t&&"object"==typeof t?S.extend({},t):{complete:n||e||"function"==typeof t&&t,duration:t,easing:n&&e||e&&"function"!=typeof e&&e};return S.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in S.fx.speeds?r.duration=S.fx.speeds[r.duration]:r.duration=S.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){"function"==typeof r.old&&r.old.call(this),r.queue&&S.dequeue(this,r.queue)},r},S.fn.extend({fadeTo:function(t,e,n,r){return this.filter(ve).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=S.isEmptyObject(t),o=S.speed(e,n,r),a=function(){var e=Dn(this,S.extend({},t),o);(i||ue.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=S.timers,a=ue.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&gn.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||S.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=ue.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=S.timers,a=r?r.length:0;for(n.finish=!0,S.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<a;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),S.each(["toggle","show","hide"],function(t,e){var n=S.fn[e];S.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(yn(e,!0),t,r,i)}}),S.each({slideDown:yn("show"),slideUp:yn("hide"),slideToggle:yn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){S.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),S.timers=[],S.fx.tick=function(){var t,e=0,n=S.timers;for(fn=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||S.fx.stop(),fn=void 0},S.fx.timer=function(t){S.timers.push(t),S.fx.start()},S.fx.start=function(){pn||(pn=!0,vn())},S.fx.stop=function(){pn=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(t,e){return t=S.fx&&S.fx.speeds[t]||t,e=e||"fx",this.queue(e,function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}})};var wn=/^(?:input|select|textarea|button)$/i,xn=/^(?:a|area)$/i;function An(t){return(t.match(tt)||[]).join(" ")}function En(t){return t.getAttribute&&t.getAttribute("class")||""}function Sn(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(tt)||[]}S.fn.extend({prop:function(t,e){return Z(this,S.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[S.propFix[t]||t]})}}),S.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(t)||(e=S.propFix[e]||e,i=S.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=t.getAttribute("tabindex");return e?parseInt(e,10):wn.test(t.nodeName)||xn.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),O&&(S.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(t){var e,n,r,i,o,a;return"function"==typeof t?this.each(function(e){S(this).addClass(t.call(this,e,En(this)))}):(e=Sn(t)).length?this.each(function(){if(r=En(this),n=1===this.nodeType&&" "+An(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=An(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return"function"==typeof t?this.each(function(e){S(this).removeClass(t.call(this,e,En(this)))}):arguments.length?(e=Sn(t)).length?this.each(function(){if(r=En(this),n=1===this.nodeType&&" "+An(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");a=An(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o;return"function"==typeof t?this.each(function(n){S(this).toggleClass(t.call(this,n,En(this),e),e)}):"boolean"==typeof e?e?this.addClass(t):this.removeClass(t):(n=Sn(t)).length?this.each(function(){for(o=S(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r)}):this},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+An(En(n))+" ").indexOf(e)>-1)return!0;return!1}}),S.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r="function"==typeof t,this.each(function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,S(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=S.map(i,function(t){return null==t?"":t+""})),(e=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))})):i?(e=S.valHooks[i.type]||S.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value)??"":void 0}}),S.extend({valHooks:{select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,a="select-one"===t.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if((n=i[r]).selected&&!n.disabled&&(!n.parentNode.disabled||!_(n.parentNode,"optgroup"))){if(e=S(n).val(),a)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=S.makeArray(e),a=i.length;a--;)((r=i[a]).selected=S.inArray(S(r).val(),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),O&&(S.valHooks.option={get:function(t){var e=t.getAttribute("value");return null!=e?e:An(S.text(t))}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=S.inArray(S(t).val(),e)>-1}}});var _n=/^(?:focusinfocus|focusoutblur)$/,Cn=function(t){t.stopPropagation()};S.extend(S.event,{trigger:function(t,e,n,i){var o,a,s,u,c,l,d,f,h=[n||D],g=p.call(t,"type")?t.type:t,v=p.call(t,"namespace")?t.namespace.split("."):[];if(a=f=s=n=n||D,3!==n.nodeType&&8!==n.nodeType&&!_n.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(t=t[S.expando]?t:new S.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:S.makeArray(e,[t]),d=S.event.special[g]||{},i||!d.trigger||!1!==d.trigger.apply(n,e))){if(!i&&!d.noBubble&&!y(n)){for(u=d.delegateType||g,_n.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(n.ownerDocument||D)&&h.push(s.defaultView||s.parentWindow||r)}for(o=0;(a=h[o++])&&!t.isPropagationStopped();)f=a,t.type=o>1?u:d.bindType||g,(l=(ue.get(a,"events")||Object.create(null))[t.type]&&ue.get(a,"handle"))&&l.apply(a,e),(l=c&&a[c])&&l.apply&&ae(a)&&(t.result=l.apply(a,e),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(h.pop(),e)||!ae(n)||c&&"function"==typeof n[g]&&!y(n)&&((s=n[c])&&(n[c]=null),S.event.triggered=g,t.isPropagationStopped()&&f.addEventListener(g,Cn),n[g](),t.isPropagationStopped()&&f.removeEventListener(g,Cn),S.event.triggered=void 0,s&&(n[c]=s)),t.result}},simulate:function(t,e,n){var r=S.extend(new S.Event,n,{type:t,isSimulated:!0});S.event.trigger(r,null,e)}}),S.fn.extend({trigger:function(t,e){return this.each(function(){S.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return S.event.trigger(t,e,n,!0)}});var kn=r.location,On={guid:Date.now()},Tn=/\?/;S.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,function(t){return t.textContent}).join("\n"):t)),e};var In=/\[\]$/,jn=/\r?\n/g,Fn=/^(?:submit|button|image|reset|file)$/i,Nn=/^(?:input|select|textarea|keygen)/i;function Pn(t,e,n,r){var i;if(Array.isArray(e))S.each(e,function(e,i){n||In.test(t)?r(t,i):Pn(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==m(e))r(t,e);else for(i in e)Pn(t+"["+i+"]",e[i],n,r)}S.param=function(t,e){var n,r=[],i=function(t,e){var n="function"==typeof e?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(n??"")};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!S.isPlainObject(t))S.each(t,function(){i(this.name,this.value)});else for(n in t)Pn(n,t[n],e,i);return r.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=S.prop(this,"elements");return t?S.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!S(this).is(":disabled")&&Nn.test(this.nodeName)&&!Fn.test(t)&&(this.checked||!Be.test(t))}).map(function(t,e){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,function(t){return{name:e.name,value:t.replace(jn,"\r\n")}}):{name:e.name,value:n.replace(jn,"\r\n")}}).get()}});var Rn=/%20/g,Mn=/#.*$/,Bn=/([?&])_=[^&]*/,Ln=/^(.*?):[ \t]*([^\r\n]*)$/gm,Hn=/^(?:GET|HEAD)$/,qn=/^\/\//,Un={},zn={},Wn="*/".concat("*"),Gn=D.createElement("a");function $n(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(tt)||[];if("function"==typeof n)for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Yn(t,e,n,r){var i={},o=t===zn;function a(s){var u;return i[s]=!0,S.each(t[s]||[],function(t,s){var c=s(e,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(e.dataTypes.unshift(c),a(c),!1)}),u}return a(e.dataTypes[0])||!i["*"]&&a("*")}function Vn(t,e){var n,r,i=S.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&S.extend(!0,t,r),t}Gn.href=kn.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:kn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(kn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Vn(Vn(t,S.ajaxSettings),e):Vn(S.ajaxSettings,t)},ajaxPrefilter:$n(Un),ajaxTransport:$n(zn),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,o,a,s,u,c,l,d,f,p=S.ajaxSetup({},e),h=p.context||p,g=p.context&&(h.nodeType||h.jquery)?S(h):S.event,v=S.Deferred(),m=S.Callbacks("once memory"),y=p.statusCode||{},b={},w={},x="canceled",A={readyState:0,getResponseHeader:function(t){var e;if(c){if(!a)for(a={};e=Ln.exec(o);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)A.always(t[A.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(A),p.url=((t||p.url||kn.href)+"").replace(qn,kn.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(tt)||[""],null==p.crossDomain){u=D.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Gn.protocol+"//"+Gn.host!=u.protocol+"//"+u.host}catch(t){p.crossDomain=!0}}if(Yn(Un,p,e,A),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=S.param(p.data,p.traditional)),c)return A;for(d in(l=S.event&&p.global)&&0===S.active++&&S.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Hn.test(p.type),i=p.url.replace(Mn,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Rn,"+")):(f=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Tn.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Bn,"$1"),f=(Tn.test(i)?"&":"?")+"_="+On.guid+++f),p.url=i+f),p.ifModified&&(S.lastModified[i]&&A.setRequestHeader("If-Modified-Since",S.lastModified[i]),S.etag[i]&&A.setRequestHeader("If-None-Match",S.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Wn+"; q=0.01":""):p.accepts["*"]),p.headers)A.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(h,A,p)||c))return A.abort();if(x="abort",m.add(p.complete),A.done(p.success),A.fail(p.error),n=Yn(zn,p,e,A)){if(A.readyState=1,l&&g.trigger("ajaxSend",[A,p]),c)return A;p.async&&p.timeout>0&&(s=r.setTimeout(function(){A.abort("timeout")},p.timeout));try{c=!1,n.send(b,E)}catch(t){if(c)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,a,u){var d,f,b,D,w,x=e;c||(c=!0,s&&r.clearTimeout(s),n=void 0,o=u||"",A.readyState=t>0?4:0,d=t>=200&&t<300||304===t,a&&(D=function(t,e,n){for(var r,i,o,a,s=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,A,a)),!d&&S.inArray("script",p.dataTypes)>-1&&S.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),D=function(t,e,n,r){var i,o,a,s,u,c={},l=t.dataTypes.slice();if(l[1])for(a in t.converters)c[a.toLowerCase()]=t.converters[a];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(p,D,A,d),d?(p.ifModified&&((w=A.getResponseHeader("Last-Modified"))&&(S.lastModified[i]=w),(w=A.getResponseHeader("etag"))&&(S.etag[i]=w)),204===t||"HEAD"===p.type?x="nocontent":304===t?x="notmodified":(x=D.state,f=D.data,d=!(b=D.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),A.status=t,A.statusText=(e||x)+"",d?v.resolveWith(h,[f,x,A]):v.rejectWith(h,[A,x,b]),A.statusCode(y),y=void 0,l&&g.trigger(d?"ajaxSuccess":"ajaxError",[A,p,d?f:b]),m.fireWith(h,[A,x]),l&&(g.trigger("ajaxComplete",[A,p]),--S.active||S.event.trigger("ajaxStop")))}return A},getJSON:function(t,e,n){return S.get(t,e,n,"json")},getScript:function(t,e){return S.get(t,void 0,e,"script")}}),S.each(["get","post"],function(t,e){S[e]=function(t,n,r,i){return"function"!=typeof n&&null!==n||(i=i||r,r=n,n=void 0),S.ajax(S.extend({url:t,type:e,dataType:i,data:n,success:r},S.isPlainObject(t)&&t))}}),S.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),S._evalUrl=function(t,e,n){return S.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,scriptAttrs:e.crossOrigin?{crossOrigin:e.crossOrigin}:void 0,converters:{"text script":function(){}},dataFilter:function(t){S.globalEval(t,e,n)}})},S.fn.extend({wrapAll:function(t){var e;return this[0]&&("function"==typeof t&&(t=t.call(this[0])),e=S(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return"function"==typeof t?this.each(function(e){S(this).wrapInner(t.call(this,e))}):this.each(function(){var e=S(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e="function"==typeof t;return this.each(function(n){S(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){S(this).replaceWith(this.childNodes)}),this}}),S.expr.pseudos.hidden=function(t){return!S.expr.pseudos.visible(t)},S.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},S.ajaxSettings.xhr=function(){return new r.XMLHttpRequest};var Kn={0:200};function Xn(t){return t.scriptAttrs||!t.headers&&(t.crossDomain||t.async&&S.inArray("json",t.dataTypes)<0)}S.ajaxTransport(function(t){var e;return{send:function(n,r){var i,o=t.xhr();if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(i in t.xhrFields)o[i]=t.xhrFields[i];for(i in t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest"),n)o.setRequestHeader(i,n[i]);e=function(t){return function(){e&&(e=o.onload=o.onerror=o.onabort=o.ontimeout=null,"abort"===t?o.abort():"error"===t?r(o.status,o.statusText):r(Kn[o.status]||o.status,o.statusText,"text"===(o.responseType||"text")?{text:o.responseText}:{binary:o.response},o.getAllResponseHeaders()))}},o.onload=e(),o.onabort=o.onerror=o.ontimeout=e("error"),e=e("abort");try{o.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},converters:{"text script":function(t){return S.globalEval(t),t}}}),S.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),Xn(t)&&(t.type="GET")}),S.ajaxTransport("script",function(t){var e,n;if(Xn(t))return{send:function(r,i){e=S("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),D.head.appendChild(e[0])},abort:function(){n&&n()}}});var Jn=[],Qn=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Jn.pop()||S.expando+"_"+On.guid++;return this[t]=!0,t}}),S.ajaxPrefilter("jsonp",function(t,e,n){var i,o,a,s=!1!==t.jsonp&&(Qn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qn.test(t.data)&&"data");return i=t.jsonpCallback="function"==typeof t.jsonpCallback?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qn,"$1"+i):!1!==t.jsonp&&(t.url+=(Tn.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||S.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=r[i],r[i]=function(){a=arguments},n.always(function(){void 0===o?S(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Jn.push(i)),a&&"function"==typeof o&&o(a[0]),a=o=void 0}),"script"}),S.ajaxPrefilter(function(t,e){"string"==typeof t.data||S.isPlainObject(t.data)||Array.isArray(t.data)||"processData"in e||(t.processData=!1),t.data instanceof r.FormData&&(t.contentType=!1)}),S.parseHTML=function(t,e,n){return"string"==typeof t||Wt(t+"")?("boolean"==typeof e&&(n=e,e=!1),e||(e=(new r.DOMParser).parseFromString("","text/html")),o=!n&&[],(i=zt.exec(t))?[e.createElement(i[1])]:(i=Ne([t],e,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes))):[];var i,o},S.fn.load=function(t,e,n){var r,i,o,a=this,s=t.indexOf(" ");return s>-1&&(r=An(t.slice(s)),t=t.slice(0,s)),"function"==typeof e?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&S.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(r?S("<div>").append(S.parseHTML(t)).find(r):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(t,e,n){var r,i,o,a,s,u,c=S.css(t,"position"),l=S(t),d={};"static"===c&&(t.style.position="relative"),s=l.offset(),o=S.css(t,"top"),u=S.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1?(a=(r=l.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),"function"==typeof e&&(e=e.call(t,n,S.extend({},s))),null!=e.top&&(d.top=e.top-s.top+a),null!=e.left&&(d.left=e.left-s.left+i),"using"in e?e.using.call(t,d):l.css(d)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&t!==n.documentElement&&"static"===S.css(t,"position");)t=t.offsetParent||n.documentElement;t&&t!==r&&1===t.nodeType&&"static"!==S.css(t,"position")&&((i=S(t).offset()).top+=S.css(t,"borderTopWidth",!0),i.left+=S.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-S.css(r,"marginTop",!0),left:e.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===S.css(t,"position");)t=t.offsetParent;return t||R})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;S.fn[t]=function(r){return Z(this,function(t,r,i){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i},t,r,arguments.length)}}),S.each({Height:"height",Width:"width"},function(t,e){S.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){S.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return Z(this,function(e,n,i){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?S.css(e,n,s):S.style(e,n,i,s)},e,a?i:void 0,a)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){S.fn[e]=function(t){return this.on(e,t)}}),S.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){S.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),S.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),"function"==typeof t)return r=s.call(arguments,2),i=function(){return t.apply(e||this,r.concat(s.call(arguments)))},i.guid=t.guid=t.guid||S.guid++,i},S.holdReady=function(t){t?S.readyWait++:S.ready(!0)},S.expr[":"]=S.expr.filters=S.expr.pseudos,void 0===(n=function(){return S}.apply(e,[]))||(t.exports=n);var Zn=r.jQuery,tr=r.$;return S.noConflict=function(t){return r.$===S&&(r.$=tr),t&&r.jQuery===S&&(r.jQuery=Zn),S},void 0===i&&(r.jQuery=r.$=S),S})}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(239);var r=n(285);SaplingModule=r})();
2
2
  //# sourceMappingURL=main-bundle.js.map