WitStudioAppShowTrainTaggerHelper.react",["CompositeDraftDecorator","ContentState","DraftModifier","EditorState","Keys","Random","SelectionState","WitStudioEnums","WitStudioIntentRecord","WitStudioSampleTagRecord","findRangesImmutable","getDefaultKeyBinding","immutable","react","shallowArrayEqual"],(function(a,b,c,d,e,f,g){var h,i=h||d("react");a="ENTITY_STYLE";b="SUGGESTED_ENTITY_STYLE";var j=c("immutable").List();for(e=0;e<360;e+=30)j=j.push(e);j=j.sortBy(d("Random").random);var k=0,l=c("immutable").Map(),m=function(a,b){var c;if((c=l.get(a))!=null)return"hsla("+c+", 75%, "+b+"%, 0.6)";c=j.get(k);k=(k+1)%j.size;l=l.set(a,c);return"hsla("+c+", 75%, "+b+"%, 0.6)"},n=(f={},f[b]=function(a,b){return{style:{backgroundColor:m(b[0],85),padding:"2px 1px",border:"1px dotted "+m(b[0],20),borderRadius:1}}},f[a]=function(a){var b=a[0];a=a[1];b={backgroundColor:m(b,60)};a=a?{borderBottom:"3px solid "+m(a,30),padding:"2px 1px 0"}:{padding:"2px 1px"};return{style:babelHelpers["extends"]({borderRadius:1},b,a)}},f),o=function(a,b,c){a.findEntityRanges(function(a){a=a.getEntity();a=a==null?null:c.getEntity(a);return a!==null&&a.getType()==="TAG"},b)},p=function(a){var b=a.children,c=a.contentState,d=a.entityKey;a=a.offsetKey;c=c.getEntity(d).getData();d=c.style;var e=c.wispIds;c=c.suggWispIds;return i.jsx("span",babelHelpers["extends"]({"data-offset-key":a},n[d](e,c),{children:b}))};e=function(a){a=c("ContentState").createFromText(a);var b=a.getBlockMap().first().getKey();return c("EditorState").create({currentContent:a,decorator:new(c("CompositeDraftDecorator"))([{strategy:o,component:p}]),selection:c("SelectionState").createEmpty(b),allowUndo:!1})};var q=function(a,b,d,e,f,g,h){var i=[];c("findRangesImmutable")(d.slice(e,f),function(b,c){b=g(a,b);c=g(a,c);return b&&c&&b[h]===c[h]},function(c){c=g(a,c);return c&&c[h]===b},function(a,b){i.push([a,b]);return});return i.map(function(a){var b=a[0];a=a[1];return[e+b,e+a]})},r=function(a,b){return b.find(function(b){var c=b[0];b=b[1];return c===a.start&&b===a.end})},s=function(a,b,c,d,e,f,g){g===void 0&&(g=0);a=q(a,b.id,c,d,e,f,g);c=r(b,a);if(!c)return null;d=c[0];e=c[1];return b.set("start",d).set("end",e)};b=function(a,b){var d=b.getCurrentContent().getFirstBlock().getCharacterList();return a.sortBy(function(a){return a.start}).reduce(function(a,c){var e=a[0];a=a[1];c=s(b.getCurrentContent(),c,d,a,d.count(),c.autosuggested?u:t);return c?[e.push(c),c.end]:[e,a]},[c("immutable").List(),0])[0]};var t=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.wispIds)||[]},u=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.suggWispIds)||[]},v=function(a,b){a=a.getBlockMap().get(b.getAnchorKey());return a.getCharacterList().slice(b.getStartOffset(),b.getEndOffset())},w=function(a,b,d){var e=a.getCurrentContent();a=v(e,b);if(a.isEmpty())return!1;b=a.first();var f=t(e,b);b=d?1:0;return f.length>b?!1:a.rest().every(function(a){return c("shallowArrayEqual")(f,t(e,a))})},x=c("immutable").Record({style:"",wispIds:c("immutable").List(),suggWispIds:c("immutable").List()}),y=function(a){var b=a.wispIds.join("-"),c=a.suggWispIds.join("-");return b+"-"+c+"-"+a.style},z=function(a){try{var b=a.getLastCreatedEntityKey();a=b&&a.getEntity(b).data;return a&&y(a)}catch(a){return null}},A=function(a,b){var c=y(b);if(c===z(a))return{contentState:a,entityKey:a.getLastCreatedEntityKey()};c=a.createEntity("TAG","IMMUTABLE",b.toJS());a=c.getLastCreatedEntityKey();return{contentState:c,entityKey:a}},B=function(a){var b=a.getCurrentContent().getFirstBlock();b=c("SelectionState").createEmpty(b.getKey()).merge({anchorOffset:0,focusOffset:b.getText().length});return c("EditorState").push(a,d("DraftModifier").applyEntity(a.getCurrentContent(),b,null),"apply-entity")},C=function(a,b){return Number.isInteger(a)&&Number.isInteger(b)&&a=b.start&&a<=b.end};return c.filterNot(F).some(function(c){return b(a.start,c)||b(a.end,c)})};a=function(a){return F(a)?d.has(a.id):e(a)};return c.concat(b.filterNot(a))};var F=function(a){return a.start===-1},G=function(a){return a.getCurrentContent().getPlainText().length},H=function(a,b,c){var d=b.getCurrentContent(),e=a.getCurrentContent();return d!==e&&G(b)>c?a:b},I=function(a){return a.getCurrentContent().getPlainText()},J=function(a){var b=a.getCurrentContent().getFirstBlock();a=a.getSelection();return b.getText().slice(a.getStartOffset(),a.getEndOffset())},K=function(a,b){var d=a.getCurrentContent(),e=a.getSelection(),f=e.getStartKey(),g=e.getStartOffset(),h=e.getEndOffset();d=d.getBlockMap().get(f).getText().slice(g,h);if(e.isCollapsed())return new(c("WitStudioSampleTagRecord"))();return!d||!w(a,e,b)?null:new(c("WitStudioSampleTagRecord"))({start:g,end:h,value:d,id:"",role:"",body:d})},L=function(a){if(!a)return c("immutable").List();var b=function(b){return new(c("WitStudioSampleTagRecord"))({confidence:b.confidence,start:b.start,end:b.end,id:b.slot_id,role:b.slot_name,role_id:b.slot_id,value:b.value_name,body:a.text.slice(b.start,b.end),kind:d("WitStudioEnums").WitStudioRecord.SLOT,ui_soft:!0,name:b.entity_names!=null?b.entity_names.join(" and "):""})};return a.slots.map(function(a){return b(a).merge({subslots:c("immutable").List(a.subslots).map(b)})})},M=function(a){return a&&a.intent&&a.intent.id&&a.intent.confidence!==void 0?c("immutable").List([a.intent].map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.INTENT})})):c("immutable").List()},N=function(a){return a&&a.intent&&a.intent.id?c("immutable").List([a.intent].map(function(b){return new(c("WitStudioSampleTagRecord"))({id:b.id,value:b.value,name:b.value,kind:d("WitStudioEnums").WitStudioRecord.INTENT,isBuiltin:a.use_builtin})})):c("immutable").List()},O=function(a,b){return a!=null?(b=b.getValue())==null?void 0:b.get(((b=a.intent)==null?void 0:b.id)||"",new(c("WitStudioIntentRecord"))({id:(b=a.intent)==null?void 0:b.id,name:(b=a.intent)==null?void 0:b.value})):null},P=function(a){return((a==null?void 0:a.traits)||c("immutable").List()).map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.TRAIT})})},Q=function(a,b,c,d,e,f,g){return a==null?!1:a.text===d&&L(a).equals(c)&&(b==null?void 0:b.id)===(a==null?void 0:(d=a.intent)==null?void 0:d.id)&&e.contains(a.split)&&e.size===1&&a.priority===f&&a.language_tag===g},R=function(a){switch(a.keyCode){case c("Keys").HOME:case c("Keys").UP:case c("Keys").DOWN:case c("Keys").PAGE_UP:case c("Keys").PAGE_DOWN:case c("Keys").SPACE:a.stopPropagation();break}return c("getDefaultKeyBinding")(a)},S=function(a,b){return a.start<=b.start&&a.end>=b.end},T=function(a,b){var c=function(b){return Math.abs(a.start-b)},d=b.update("start",c).update("end",c);return a.update("subslots",function(a){return a.push(d)})},U=function(a,b){return a.map(function(a){return a.autosuggested?a:a.update("id",function(){return b.find(function(b){return b.legacy_id===a.id||b.id===a.id}).id})})};g.getColor=m;g.createTaggedEditorState=e;g.updateTags=b;g.wispsAt=t;g.canHighlight=w;g.applyEntities=a;g.mergeSoftTags=f;g.textLength=G;g.enforceValidEditorState=H;g.editorText=I;g.selectedText=J;g.tempTagFromEditorState=K;g.sampleToTags=L;g.sampleToPredictedIntentTags=M;g.sampleToAssistantPredictedIntentTags=N;g.getSelectedIntent=O;g.sampleToTraitTags=P;g.isSampleUnchanged=Q;g.editorKeyBindingFn=R;g.isParentTag=S;g.addSubslot=T;g.toTagWithFBID=U}),98);
-----
BlockTree",["findRangesImmutable","getOwnObjectValues","immutable"],(function(a,b,c,d,e,f){"use strict";var g=b("immutable").List,h=b("immutable").Repeat;a=b("immutable").Record;var i=function(){return!0};c={start:null,end:null};var j=a(c);d={start:null,end:null,decoratorKey:null,leaves:null};var k=a(d);f={generate:function(a,c,d){var e=c.getLength();if(!e)return g.of(new k({start:0,end:0,decoratorKey:null,leaves:g.of(new j({start:0,end:0}))}));var f=[],n=d?d.getDecorations(c,a):g(h(null,e)),o=c.getCharacterList();b("findRangesImmutable")(n,m,i,function(a,b){f.push(new k({start:a,end:b,decoratorKey:n.get(a),leaves:l(o.slice(a,b).toList(),a)}))});return g(f)},fromJS:function(a){var c=a.leaves;a=babelHelpers.objectWithoutPropertiesLoose(a,["leaves"]);return new k(babelHelpers["extends"]({},a,{leaves:c!=null?g(Array.isArray(c)?c:b("getOwnObjectValues")(c)).map(function(a){return j(a)}):null}))}};function l(a,c){var d=[];a=a.map(function(a){return a.getStyle()}).toList();b("findRangesImmutable")(a,m,i,function(a,b){d.push(new j({start:a+c,end:b+c}))});return g(d)}function m(a,b){return a===b}e.exports=f}),null);
-----
ContentBlock",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d();a={key:"",type:"unstyled",text:"",characterList:g(),depth:0,data:c()};d=f(a);var j=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};c=function(a){babelHelpers.inheritsLoose(c,a);function c(b){return a.call(this,j(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(d);function k(a,b){return a.getStyle()===b.getStyle()}function l(a,b){return a.getEntity()===b.getEntity()}e.exports=c}),null);
-----
ContentBlockNode",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d(),j={parent:null,characterList:g(),data:c(),depth:0,key:"",text:"",type:"unstyled",children:g(),prevSibling:null,nextSibling:null},k=function(a,b){return a.getStyle()===b.getStyle()},l=function(a,b){return a.getEntity()===b.getEntity()},m=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};a=function(a){babelHelpers.inheritsLoose(c,a);function c(b){b===void 0&&(b=j);return a.call(this,m(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.getChildKeys=function(){return this.get("children")};d.getParentKey=function(){return this.get("parent")};d.getPrevSiblingKey=function(){return this.get("prevSibling")};d.getNextSiblingKey=function(){return this.get("nextSibling")};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(f(j));e.exports=a}),null);
-----
findRangesImmutable",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){if(!a.size)return;var e=0;a.reduce(function(a,f,g){b(a,f)||(c(a)&&d(e,g),e=g);return f});c(a.last())&&d(e,a.count())}e.exports=a}),null);
-----
removeEntitiesAtEdges",["invariant","CharacterMetadata","findRangesImmutable"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){var c=a.getBlockMap(),d={},e=b.getStartKey(),f=b.getStartOffset(),g=c.get(e);f=i(a,g,f);f!==g&&(d[e]=f);g=b.getEndKey();var h=b.getEndOffset(),j=c.get(g);e===g&&(j=f);e=i(a,j,h);e!==j&&(d[g]=e);return!Object.keys(d).length?a.setSelectionAfter(b):a.merge({blockMap:c.merge(d),selectionAfter:b})}function h(a,c,d){var e;b("findRangesImmutable")(a,function(a,b){return a.getEntity()===b.getEntity()},function(a){return a.getEntity()===c},function(a,b){a<=d&&b>=d&&(e={start:a,end:b})});typeof e==="object"||g(0,6015);return e}function i(a,c,d){var e=c.getCharacterList(),f=d>0?e.get(d-1):void 0,g=d-----
encodeInlineStyleRanges",["UnicodeUtils","findRangesImmutable"],(function(a,b,c,d,e,f){"use strict";var g,h=function(a,b){return a===b},i=function(a){return!!a},j=[];function k(a,c,d){var e=[];c=c.map(function(a){return a.has(d)}).toList();b("findRangesImmutable")(c,h,i,function(c,f){var h=a.getText();e.push({offset:(g||(g=b("UnicodeUtils"))).strlen(h.slice(0,c)),length:g.strlen(h.slice(c,f)),style:d})});return e}function a(a){var b=a.getCharacterList().map(function(a){return a.getStyle()}).toList(),c=b.flatten().toSet().map(function(c){return k(a,b,c)});return Array.prototype.concat.apply(j,c.toJS())}e.exports=a}),null);
-----
WitStudioAppShowTrainTaggerHelper.react",["CompositeDraftDecorator","ContentState","DraftModifier","EditorState","Keys","Random","SelectionState","WitStudioEnums","WitStudioIntentRecord","WitStudioSampleTagRecord","findRangesImmutable","getDefaultKeyBinding","immutable","react","shallowArrayEqual"],(function(a,b,c,d,e,f,g){var h=d("react");a="ENTITY_STYLE";b="SUGGESTED_ENTITY_STYLE";var i=c("immutable").List();for(e=0;e<360;e+=30)i=i.push(e);i=i.sortBy(d("Random").random);var j=0,k=c("immutable").Map(),l=function(a,b){var c;if((c=k.get(a))!=null)return"hsla("+c+", 75%, "+b+"%, 0.6)";c=i.get(j);j=(j+1)%i.size;k=k.set(a,c);return"hsla("+c+", 75%, "+b+"%, 0.6)"},m=(f={},f[b]=function(a,b){return{style:{backgroundColor:l(b[0],85),padding:"2px 1px",border:"1px dotted "+l(b[0],20),borderRadius:1}}},f[a]=function(a){var b=a[0];a=a[1];b={backgroundColor:l(b,60)};a=a?{borderBottom:"3px solid "+l(a,30),padding:"2px 1px 0"}:{padding:"2px 1px"};return{style:babelHelpers["extends"]({borderRadius:1},b,a)}},f),n=function(a,b,c){a.findEntityRanges(function(a){a=a.getEntity();a=a==null?null:c.getEntity(a);return a!==null&&a.getType()==="TAG"},b)},o=function(a){var b=a.children,c=a.contentState,d=a.entityKey;a=a.offsetKey;c=c.getEntity(d).getData();d=c.style;var e=c.wispIds;c=c.suggWispIds;return h.jsx("span",babelHelpers["extends"]({"data-offset-key":a},m[d](e,c),{children:b}))};e=function(a){a=c("ContentState").createFromText(a);var b=a.getBlockMap().first().getKey();return c("EditorState").create({currentContent:a,decorator:new(c("CompositeDraftDecorator"))([{strategy:n,component:o}]),selection:c("SelectionState").createEmpty(b),allowUndo:!1})};var p=function(a,b,d,e,f,g,h){var i=[];c("findRangesImmutable")(d.slice(e,f),function(b,c){b=g(a,b);c=g(a,c);return b&&c&&b[h]===c[h]},function(c){c=g(a,c);return c&&c[h]===b},function(a,b){i.push([a,b]);return});return i.map(function(a){var b=a[0];a=a[1];return[e+b,e+a]})},q=function(a,b){return b.find(function(b){var c=b[0];b=b[1];return c===a.start&&b===a.end})},r=function(a,b,c,d,e,f,g){g===void 0&&(g=0);a=p(a,b.id,c,d,e,f,g);c=q(b,a);if(!c)return null;d=c[0];e=c[1];return b.set("start",d).set("end",e)};b=function(a,b){var d=b.getCurrentContent().getFirstBlock().getCharacterList();return a.sortBy(function(a){return a.start}).reduce(function(a,c){var e=a[0];a=a[1];c=r(b.getCurrentContent(),c,d,a,d.count(),c.autosuggested?t:s);return c?[e.push(c),c.end]:[e,a]},[c("immutable").List(),0])[0]};var s=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.wispIds)||[]},t=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.suggWispIds)||[]},u=function(a,b){a=a.getBlockMap().get(b.getAnchorKey());return a.getCharacterList().slice(b.getStartOffset(),b.getEndOffset())},v=function(a,b,d){var e=a.getCurrentContent();a=u(e,b);if(a.isEmpty())return!1;b=a.first();var f=s(e,b);b=d?1:0;return f.length>b?!1:a.rest().every(function(a){return c("shallowArrayEqual")(f,s(e,a))})},w=c("immutable").Record({style:"",wispIds:c("immutable").List(),suggWispIds:c("immutable").List()}),x=function(a){var b=a.wispIds.join("-"),c=a.suggWispIds.join("-");return b+"-"+c+"-"+a.style},y=function(a){try{var b=a.getLastCreatedEntityKey();a=b&&a.getEntity(b).data;return a&&x(a)}catch(a){return null}},z=function(a,b){var c=x(b);if(c===y(a))return{contentState:a,entityKey:a.getLastCreatedEntityKey()};c=a.createEntity("TAG","IMMUTABLE",b.toJS());a=c.getLastCreatedEntityKey();return{contentState:c,entityKey:a}},A=function(a){var b=a.getCurrentContent().getFirstBlock();b=c("SelectionState").createEmpty(b.getKey()).merge({anchorOffset:0,focusOffset:b.getText().length});return c("EditorState").push(a,d("DraftModifier").applyEntity(a.getCurrentContent(),b,null),"apply-entity")},B=function(a,b){return Number.isInteger(a)&&Number.isInteger(b)&&a=b.start&&a<=b.end};return c.filterNot(E).some(function(c){return b(a.start,c)||b(a.end,c)})};a=function(a){return E(a)?d.has(a.id):e(a)};return c.concat(b.filterNot(a))};var E=function(a){return a.start===-1},F=function(a){return a.getCurrentContent().getPlainText().length},G=function(a,b,c){var d=b.getCurrentContent(),e=a.getCurrentContent();return d!==e&&F(b)>c?a:b},H=function(a){return a.getCurrentContent().getPlainText()},I=function(a){var b=a.getCurrentContent().getFirstBlock();a=a.getSelection();return b.getText().slice(a.getStartOffset(),a.getEndOffset())},J=function(a,b){var d=a.getCurrentContent(),e=a.getSelection(),f=e.getStartKey(),g=e.getStartOffset(),h=e.getEndOffset();d=d.getBlockMap().get(f).getText().slice(g,h);if(e.isCollapsed())return new(c("WitStudioSampleTagRecord"))();return!d||!v(a,e,b)?null:new(c("WitStudioSampleTagRecord"))({start:g,end:h,value:d,id:"",role:"",body:d})},K=function(a){if(!a)return c("immutable").List();var b=function(b){return new(c("WitStudioSampleTagRecord"))({confidence:b.confidence,start:b.start,end:b.end,id:b.slot_id,role:b.slot_name,role_id:b.slot_id,value:b.value_name,body:a.text.slice(b.start,b.end),kind:d("WitStudioEnums").WitStudioRecord.SLOT,ui_soft:!0,name:b.entity_names!=null?b.entity_names.join(" and "):""})};return a.slots.map(function(a){return b(a).merge({subslots:c("immutable").List(a.subslots).map(b)})})},L=function(a){return a&&a.intent&&a.intent.id&&a.intent.confidence!==void 0?c("immutable").List([a.intent].map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.INTENT})})):c("immutable").List()},M=function(a){return a&&a.intent&&a.intent.id?c("immutable").List([a.intent].map(function(b){return new(c("WitStudioSampleTagRecord"))({id:b.id,value:b.value,name:b.value,kind:d("WitStudioEnums").WitStudioRecord.INTENT,isBuiltin:a.use_builtin})})):c("immutable").List()},N=function(a,b){return a!=null?(b=b.getValue())==null?void 0:b.get(((b=a.intent)==null?void 0:b.id)||"",new(c("WitStudioIntentRecord"))({id:(b=a.intent)==null?void 0:b.id,name:(b=a.intent)==null?void 0:b.value})):null},O=function(a){return((a==null?void 0:a.traits)||c("immutable").List()).map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.TRAIT})})},P=function(a,b,c,d,e,f,g){return a==null?!1:a.text===d&&K(a).equals(c)&&(b==null?void 0:b.id)===(a==null?void 0:(d=a.intent)==null?void 0:d.id)&&e.contains(a.split)&&e.size===1&&a.priority===f&&a.language_tag===g},Q=function(a){switch(a.keyCode){case c("Keys").HOME:case c("Keys").UP:case c("Keys").DOWN:case c("Keys").PAGE_UP:case c("Keys").PAGE_DOWN:case c("Keys").SPACE:a.stopPropagation();break}return c("getDefaultKeyBinding")(a)},R=function(a,b){return a.start<=b.start&&a.end>=b.end},S=function(a,b){var c=function(b){return Math.abs(a.start-b)},d=b.update("start",c).update("end",c);return a.update("subslots",function(a){return a.push(d)})},T=function(a,b){return a.map(function(a){return a.autosuggested?a:a.update("id",function(){return b.find(function(b){return b.legacy_id===a.id||b.id===a.id}).id})})};g.getColor=l;g.createTaggedEditorState=e;g.updateTags=b;g.wispsAt=s;g.canHighlight=v;g.applyEntities=a;g.mergeSoftTags=f;g.textLength=F;g.enforceValidEditorState=G;g.editorText=H;g.selectedText=I;g.tempTagFromEditorState=J;g.sampleToTags=K;g.sampleToPredictedIntentTags=L;g.sampleToAssistantPredictedIntentTags=M;g.getSelectedIntent=N;g.sampleToTraitTags=O;g.isSampleUnchanged=P;g.editorKeyBindingFn=Q;g.isParentTag=R;g.addSubslot=S;g.toTagWithFBID=T}),98);
-----
removeEntitiesAtEdges",["invariant","CharacterMetadata","findRangesImmutable"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){var c=a.getBlockMap(),d={},e=b.getStartKey(),f=b.getStartOffset(),g=c.get(e);f=i(a,g,f);f!==g&&(d[e]=f);g=b.getEndKey();var h=b.getEndOffset(),j=c.get(g);e===g&&(j=f);e=i(a,j,h);e!==j&&(d[g]=e);return!Object.keys(d).length?a.setSelectionAfter(b):a.merge({blockMap:c.merge(d),selectionAfter:b})}function h(a,c,d){var e;b("findRangesImmutable")(a,function(a,b){return a.getEntity()===b.getEntity()},function(a){return a.getEntity()===c},function(a,b){a<=d&&b>=d&&(e={start:a,end:b})});typeof e==="object"||g(0,6015);return e}function i(a,c,d){var e=c.getCharacterList(),f=d>0?e.get(d-1):void 0,g=d-----
BlockTree",["findRangesImmutable","getOwnObjectValues","immutable"],(function(a,b,c,d,e,f){"use strict";var g=b("immutable").List,h=b("immutable").Repeat;a=b("immutable").Record;var i=function(){return!0};c={start:null,end:null};var j=a(c);d={start:null,end:null,decoratorKey:null,leaves:null};var k=a(d);f={generate:function(a,c,d){var e=c.getLength();if(!e)return g.of(new k({start:0,end:0,decoratorKey:null,leaves:g.of(new j({start:0,end:0}))}));var f=[],n=d?d.getDecorations(c,a):g(h(null,e)),o=c.getCharacterList();b("findRangesImmutable")(n,m,i,function(a,b){f.push(new k({start:a,end:b,decoratorKey:n.get(a),leaves:l(o.slice(a,b).toList(),a)}))});return g(f)},fromJS:function(a){var c=a.leaves;a=babelHelpers.objectWithoutPropertiesLoose(a,["leaves"]);return new k(babelHelpers["extends"]({},a,{leaves:c!=null?g(Array.isArray(c)?c:b("getOwnObjectValues")(c)).map(function(a){return j(a)}):null}))}};function l(a,c){var d=[];a=a.map(function(a){return a.getStyle()}).toList();b("findRangesImmutable")(a,m,i,function(a,b){d.push(new j({start:a+c,end:b+c}))});return g(d)}function m(a,b){return a===b}e.exports=f}),null);
-----
ContentBlock",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d();a={key:"",type:"unstyled",text:"",characterList:g(),depth:0,data:c()};d=f(a);var j=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};c=function(a){babelHelpers.inheritsLoose(c,a);function c(b){return a.call(this,j(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(d);function k(a,b){return a.getStyle()===b.getStyle()}function l(a,b){return a.getEntity()===b.getEntity()}e.exports=c}),null);
-----
ContentBlockNode",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d(),j={parent:null,characterList:g(),data:c(),depth:0,key:"",text:"",type:"unstyled",children:g(),prevSibling:null,nextSibling:null},k=function(a,b){return a.getStyle()===b.getStyle()},l=function(a,b){return a.getEntity()===b.getEntity()},m=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};a=function(a){babelHelpers.inheritsLoose(c,a);function c(b){b===void 0&&(b=j);return a.call(this,m(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.getChildKeys=function(){return this.get("children")};d.getParentKey=function(){return this.get("parent")};d.getPrevSiblingKey=function(){return this.get("prevSibling")};d.getNextSiblingKey=function(){return this.get("nextSibling")};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(f(j));e.exports=a}),null);
-----
findRangesImmutable",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){if(!a.size)return;var e=0;a.reduce(function(a,f,g){b(a,f)||(c(a)&&d(e,g),e=g);return f});c(a.last())&&d(e,a.count())}e.exports=a}),null);
-----
encodeInlineStyleRanges",["UnicodeUtils","findRangesImmutable"],(function(a,b,c,d,e,f){"use strict";var g,h=function(a,b){return a===b},i=function(a){return!!a},j=[];function k(a,c,d){var e=[];c=c.map(function(a){return a.has(d)}).toList();b("findRangesImmutable")(c,h,i,function(c,f){var h=a.getText();e.push({offset:(g||(g=b("UnicodeUtils"))).strlen(h.slice(0,c)),length:g.strlen(h.slice(c,f)),style:d})});return e}function a(a){var b=a.getCharacterList().map(function(a){return a.getStyle()}).toList(),c=b.flatten().toSet().map(function(c){return k(a,b,c)});return Array.prototype.concat.apply(j,c.toJS())}e.exports=a}),null);
-----
-----
BlockTree",["findRangesImmutable","getOwnObjectValues","immutable"],(function(a,b,c,d,e,f){"use strict";var g=b("immutable").List,h=b("immutable").Repeat;a=b("immutable").Record;var i=function(){return!0};c={start:null,end:null};var j=a(c);d={start:null,end:null,decoratorKey:null,leaves:null};var k=a(d);f={generate:function(a,c,d){var e=c.getLength();if(!e)return g.of(new k({start:0,end:0,decoratorKey:null,leaves:g.of(new j({start:0,end:0}))}));var f=[],n=d?d.getDecorations(c,a):g(h(null,e)),o=c.getCharacterList();b("findRangesImmutable")(n,m,i,function(a,b){f.push(new k({start:a,end:b,decoratorKey:n.get(a),leaves:l(o.slice(a,b).toList(),a)}))});return g(f)},fromJS:function(a){var c=a.leaves;a=babelHelpers.objectWithoutPropertiesLoose(a,["leaves"]);return new k(babelHelpers["extends"]({},a,{leaves:c!=null?g(Array.isArray(c)?c:b("getOwnObjectValues")(c)).map(function(a){return j(a)}):null}))}};function l(a,c){var d=[];a=a.map(function(a){return a.getStyle()}).toList();b("findRangesImmutable")(a,m,i,function(a,b){d.push(new j({start:a+c,end:b+c}))});return g(d)}function m(a,b){return a===b}e.exports=f}),null);
-----
ContentBlock",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d();a={key:"",type:"unstyled",text:"",characterList:g(),depth:0,data:c()};d=f(a);var j=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};c=function(a){babelHelpers.inheritsLoose(c,a);function c(b){return a.call(this,j(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(d);function k(a,b){return a.getStyle()===b.getStyle()}function l(a,b){return a.getEntity()===b.getEntity()}e.exports=c}),null);
-----
ContentBlockNode",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d(),j={parent:null,characterList:g(),data:c(),depth:0,key:"",text:"",type:"unstyled",children:g(),prevSibling:null,nextSibling:null},k=function(a,b){return a.getStyle()===b.getStyle()},l=function(a,b){return a.getEntity()===b.getEntity()},m=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};a=function(a){babelHelpers.inheritsLoose(c,a);function c(b){b===void 0&&(b=j);return a.call(this,m(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.getChildKeys=function(){return this.get("children")};d.getParentKey=function(){return this.get("parent")};d.getPrevSiblingKey=function(){return this.get("prevSibling")};d.getNextSiblingKey=function(){return this.get("nextSibling")};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(f(j));e.exports=a}),null);
-----
findRangesImmutable",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){if(!a.size)return;var e=0;a.reduce(function(a,f,g){b(a,f)||(c(a)&&d(e,g),e=g);return f});c(a.last())&&d(e,a.count())}e.exports=a}),null);
-----
removeEntitiesAtEdges",["invariant","CharacterMetadata","findRangesImmutable"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){var c=a.getBlockMap(),d={},e=b.getStartKey(),f=b.getStartOffset(),g=c.get(e);f=i(a,g,f);f!==g&&(d[e]=f);g=b.getEndKey();var h=b.getEndOffset(),j=c.get(g);e===g&&(j=f);e=i(a,j,h);e!==j&&(d[g]=e);return!Object.keys(d).length?a.setSelectionAfter(b):a.merge({blockMap:c.merge(d),selectionAfter:b})}function h(a,c,d){var e;b("findRangesImmutable")(a,function(a,b){return a.getEntity()===b.getEntity()},function(a){return a.getEntity()===c},function(a,b){a<=d&&b>=d&&(e={start:a,end:b})});typeof e==="object"||g(0,6015);return e}function i(a,c,d){var e=c.getCharacterList(),f=d>0?e.get(d-1):void 0,g=d
encodeInlineStyleRanges",["UnicodeUtils","findRangesImmutable"],(function(a,b,c,d,e,f){"use strict";var g,h=function(a,b){return a===b},i=function(a){return!!a},j=[];function k(a,c,d){var e=[];c=c.map(function(a){return a.has(d)}).toList();b("findRangesImmutable")(c,h,i,function(c,f){var h=a.getText();e.push({offset:(g||(g=b("UnicodeUtils"))).strlen(h.slice(0,c)),length:g.strlen(h.slice(c,f)),style:d})});return e}function a(a){var b=a.getCharacterList().map(function(a){return a.getStyle()}).toList(),c=b.flatten().toSet().map(function(c){return k(a,b,c)});return Array.prototype.concat.apply(j,c.toJS())}e.exports=a}),null);
-----
WitStudioAppShowTrainTaggerHelper.react",["CompositeDraftDecorator","ContentState","DraftModifier","EditorState","Keys","Random","SelectionState","WitStudioEnums","WitStudioIntentRecord","WitStudioSampleTagRecord","findRangesImmutable","getDefaultKeyBinding","immutable","react","shallowArrayEqual"],(function(a,b,c,d,e,f,g){var h=d("react");a="ENTITY_STYLE";b="SUGGESTED_ENTITY_STYLE";var i=c("immutable").List();for(e=0;e<360;e+=30)i=i.push(e);i=i.sortBy(d("Random").random);var j=0,k=c("immutable").Map(),l=function(a,b){var c;if((c=k.get(a))!=null)return"hsla("+c+", 75%, "+b+"%, 0.6)";c=i.get(j);j=(j+1)%i.size;k=k.set(a,c);return"hsla("+c+", 75%, "+b+"%, 0.6)"},m=(f={},f[b]=function(a,b){return{style:{backgroundColor:l(b[0],85),padding:"2px 1px",border:"1px dotted "+l(b[0],20),borderRadius:1}}},f[a]=function(a){var b=a[0];a=a[1];b={backgroundColor:l(b,60)};a=a?{borderBottom:"3px solid "+l(a,30),padding:"2px 1px 0"}:{padding:"2px 1px"};return{style:babelHelpers["extends"]({borderRadius:1},b,a)}},f),n=function(a,b,c){a.findEntityRanges(function(a){a=a.getEntity();a=a==null?null:c.getEntity(a);return a!==null&&a.getType()==="TAG"},b)},o=function(a){var b=a.children,c=a.contentState,d=a.entityKey;a=a.offsetKey;c=c.getEntity(d).getData();d=c.style;var e=c.wispIds;c=c.suggWispIds;return h.jsx("span",babelHelpers["extends"]({"data-offset-key":a},m[d](e,c),{children:b}))};e=function(a){a=c("ContentState").createFromText(a);var b=a.getBlockMap().first().getKey();return c("EditorState").create({currentContent:a,decorator:new(c("CompositeDraftDecorator"))([{strategy:n,component:o}]),selection:c("SelectionState").createEmpty(b),allowUndo:!1})};var p=function(a,b,d,e,f,g,h){var i=[];c("findRangesImmutable")(d.slice(e,f),function(b,c){b=g(a,b);c=g(a,c);return b&&c&&b[h]===c[h]},function(c){c=g(a,c);return c&&c[h]===b},function(a,b){i.push([a,b]);return});return i.map(function(a){var b=a[0];a=a[1];return[e+b,e+a]})},q=function(a,b){return b.find(function(b){var c=b[0];b=b[1];return c===a.start&&b===a.end})},r=function(a,b,c,d,e,f,g){g===void 0&&(g=0);a=p(a,b.id,c,d,e,f,g);c=q(b,a);if(!c)return null;d=c[0];e=c[1];return b.set("start",d).set("end",e)};b=function(a,b){var d=b.getCurrentContent().getFirstBlock().getCharacterList();return a.sortBy(function(a){return a.start}).reduce(function(a,c){var e=a[0];a=a[1];c=r(b.getCurrentContent(),c,d,a,d.count(),c.autosuggested?t:s);return c?[e.push(c),c.end]:[e,a]},[c("immutable").List(),0])[0]};var s=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.wispIds)||[]},t=function(a,b){b=b.getEntity();a=b!=null?a.getEntity(b):null;return(a==null?void 0:a.data.suggWispIds)||[]},u=function(a,b){a=a.getBlockMap().get(b.getAnchorKey());return a.getCharacterList().slice(b.getStartOffset(),b.getEndOffset())},v=function(a,b,d){var e=a.getCurrentContent();a=u(e,b);if(a.isEmpty())return!1;b=a.first();var f=s(e,b);b=d?1:0;return f.length>b?!1:a.rest().every(function(a){return c("shallowArrayEqual")(f,s(e,a))})},w=c("immutable").Record({style:"",wispIds:c("immutable").List(),suggWispIds:c("immutable").List()}),x=function(a){var b=a.wispIds.join("-"),c=a.suggWispIds.join("-");return b+"-"+c+"-"+a.style},y=function(a){try{var b=a.getLastCreatedEntityKey();a=b&&a.getEntity(b).data;return a&&x(a)}catch(a){return null}},z=function(a,b){var c=x(b);if(c===y(a))return{contentState:a,entityKey:a.getLastCreatedEntityKey()};c=a.createEntity("TAG","IMMUTABLE",b.toJS());a=c.getLastCreatedEntityKey();return{contentState:c,entityKey:a}},A=function(a){var b=a.getCurrentContent().getFirstBlock();b=c("SelectionState").createEmpty(b.getKey()).merge({anchorOffset:0,focusOffset:b.getText().length});return c("EditorState").push(a,d("DraftModifier").applyEntity(a.getCurrentContent(),b,null),"apply-entity")},B=function(a,b){return Number.isInteger(a)&&Number.isInteger(b)&&a=b.start&&a<=b.end};return c.filterNot(E).some(function(c){return b(a.start,c)||b(a.end,c)})};a=function(a){return E(a)?d.has(a.id):e(a)};return c.concat(b.filterNot(a))};var E=function(a){return a.start===-1},F=function(a){return a.getCurrentContent().getPlainText().length},G=function(a,b,c){var d=b.getCurrentContent(),e=a.getCurrentContent();return d!==e&&F(b)>c?a:b},H=function(a){return a.getCurrentContent().getPlainText()},I=function(a){var b=a.getCurrentContent().getFirstBlock();a=a.getSelection();return b.getText().slice(a.getStartOffset(),a.getEndOffset())},J=function(a,b){var d=a.getCurrentContent(),e=a.getSelection(),f=e.getStartKey(),g=e.getStartOffset(),h=e.getEndOffset();d=d.getBlockMap().get(f).getText().slice(g,h);if(e.isCollapsed())return new(c("WitStudioSampleTagRecord"))();return!d||!v(a,e,b)?null:new(c("WitStudioSampleTagRecord"))({start:g,end:h,value:d,id:"",role:"",body:d})},K=function(a){if(!a)return c("immutable").List();var b=function(b){return new(c("WitStudioSampleTagRecord"))({confidence:b.confidence,start:b.start,end:b.end,id:b.slot_id,role:b.slot_name,role_id:b.slot_id,value:b.value_name,body:a.text.slice(b.start,b.end),kind:d("WitStudioEnums").WitStudioRecord.SLOT,ui_soft:!0,name:b.entity_names!=null?b.entity_names.join(" and "):""})};return a.slots.map(function(a){return b(a).merge({subslots:c("immutable").List(a.subslots).map(b)})})},L=function(a){return a&&a.intent&&a.intent.id&&a.intent.confidence!==void 0?c("immutable").List([a.intent].map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.INTENT})})):c("immutable").List()},M=function(a){return a&&a.intent&&a.intent.id?c("immutable").List([a.intent].map(function(b){return new(c("WitStudioSampleTagRecord"))({id:b.id,value:b.value,name:b.value,kind:d("WitStudioEnums").WitStudioRecord.INTENT,isBuiltin:a.use_builtin})})):c("immutable").List()},N=function(a,b){return a!=null?(b=b.getValue())==null?void 0:b.get(((b=a.intent)==null?void 0:b.id)||"",new(c("WitStudioIntentRecord"))({id:(b=a.intent)==null?void 0:b.id,name:(b=a.intent)==null?void 0:b.value})):null},O=function(a){return((a==null?void 0:a.traits)||c("immutable").List()).map(function(a){return new(c("WitStudioSampleTagRecord"))({id:a.id,value:a.value,confidence:a.confidence,kind:d("WitStudioEnums").WitStudioRecord.TRAIT})})},P=function(a,b,c,d,e,f,g){return a==null?!1:a.text===d&&K(a).equals(c)&&(b==null?void 0:b.id)===(a==null?void 0:(d=a.intent)==null?void 0:d.id)&&e.contains(a.split)&&e.size===1&&a.priority===f&&a.language_tag===g},Q=function(a){switch(a.keyCode){case c("Keys").HOME:case c("Keys").UP:case c("Keys").DOWN:case c("Keys").PAGE_UP:case c("Keys").PAGE_DOWN:case c("Keys").SPACE:a.stopPropagation();break}return c("getDefaultKeyBinding")(a)},R=function(a,b){return a.start<=b.start&&a.end>=b.end},S=function(a,b){var c=function(b){return Math.abs(a.start-b)},d=b.update("start",c).update("end",c);return a.update("subslots",function(a){return a.push(d)})},T=function(a,b){return a.map(function(a){return a.autosuggested?a:a.update("id",function(){return b.find(function(b){return b.legacy_id===a.id||b.id===a.id}).id})})};g.getColor=l;g.createTaggedEditorState=e;g.updateTags=b;g.wispsAt=s;g.canHighlight=v;g.applyEntities=a;g.mergeSoftTags=f;g.textLength=F;g.enforceValidEditorState=G;g.editorText=H;g.selectedText=I;g.tempTagFromEditorState=J;g.sampleToTags=K;g.sampleToPredictedIntentTags=L;g.sampleToAssistantPredictedIntentTags=M;g.getSelectedIntent=N;g.sampleToTraitTags=O;g.isSampleUnchanged=P;g.editorKeyBindingFn=Q;g.isParentTag=R;g.addSubslot=S;g.toTagWithFBID=T}),98);
-----
removeEntitiesAtEdges",["invariant","CharacterMetadata","findRangesImmutable"],(function(a,b,c,d,e,f,g){"use strict";function a(a,b){var c=a.getBlockMap(),d={},e=b.getStartKey(),f=b.getStartOffset(),g=c.get(e);f=i(a,g,f);f!==g&&(d[e]=f);g=b.getEndKey();var h=b.getEndOffset(),j=c.get(g);e===g&&(j=f);e=i(a,j,h);e!==j&&(d[g]=e);return!Object.keys(d).length?a.setSelectionAfter(b):a.merge({blockMap:c.merge(d),selectionAfter:b})}function h(a,c,d){var e;b("findRangesImmutable")(a,function(a,b){return a.getEntity()===b.getEntity()},function(a){return a.getEntity()===c},function(a,b){a<=d&&b>=d&&(e={start:a,end:b})});typeof e==="object"||g(0,6015);return e}function i(a,c,d){var e=c.getCharacterList(),f=d>0?e.get(d-1):void 0,g=d
BlockTree",["findRangesImmutable","getOwnObjectValues","immutable"],(function(a,b,c,d,e,f){"use strict";var g=b("immutable").List,h=b("immutable").Repeat;a=b("immutable").Record;var i=function(){return!0};c={start:null,end:null};var j=a(c);d={start:null,end:null,decoratorKey:null,leaves:null};var k=a(d);f={generate:function(a,c,d){var e=c.getLength();if(!e)return g.of(new k({start:0,end:0,decoratorKey:null,leaves:g.of(new j({start:0,end:0}))}));var f=[],n=d?d.getDecorations(c,a):g(h(null,e)),o=c.getCharacterList();b("findRangesImmutable")(n,m,i,function(a,b){f.push(new k({start:a,end:b,decoratorKey:n.get(a),leaves:l(o.slice(a,b).toList(),a)}))});return g(f)},fromJS:function(a){var c=a.leaves;a=babelHelpers.objectWithoutPropertiesLoose(a,["leaves"]);return new k(babelHelpers["extends"]({},a,{leaves:c!=null?g(Array.isArray(c)?c:b("getOwnObjectValues")(c)).map(function(a){return j(a)}):null}))}};function l(a,c){var d=[];a=a.map(function(a){return a.getStyle()}).toList();b("findRangesImmutable")(a,m,i,function(a,b){d.push(new j({start:a+c,end:b+c}))});return g(d)}function m(a,b){return a===b}e.exports=f}),null);
-----
ContentBlock",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d();a={key:"",type:"unstyled",text:"",characterList:g(),depth:0,data:c()};d=f(a);var j=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};c=function(a){babelHelpers.inheritsLoose(c,a);function c(b){return a.call(this,j(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(d);function k(a,b){return a.getStyle()===b.getStyle()}function l(a,b){return a.getEntity()===b.getEntity()}e.exports=c}),null);
-----
ContentBlockNode",["CharacterMetadata","findRangesImmutable","immutable"],(function(a,b,c,d,e,f){"use strict";var g=(a=b("immutable")).List;c=a.Map;d=a.OrderedSet;f=a.Record;var h=a.Repeat,i=d(),j={parent:null,characterList:g(),data:c(),depth:0,key:"",text:"",type:"unstyled",children:g(),prevSibling:null,nextSibling:null},k=function(a,b){return a.getStyle()===b.getStyle()},l=function(a,b){return a.getEntity()===b.getEntity()},m=function(a){if(!a)return a;var c=a.characterList,d=a.text;d&&!c&&(a.characterList=g(h(b("CharacterMetadata").EMPTY,d.length)));return a};a=function(a){babelHelpers.inheritsLoose(c,a);function c(b){b===void 0&&(b=j);return a.call(this,m(b))||this}var d=c.prototype;d.getKey=function(){return this.get("key")};d.getType=function(){return this.get("type")};d.getText=function(){return this.get("text")};d.getCharacterList=function(){return this.get("characterList")};d.getLength=function(){return this.getText().length};d.getDepth=function(){return this.get("depth")};d.getData=function(){return this.get("data")};d.getInlineStyleAt=function(a){a=this.getCharacterList().get(a);return a?a.getStyle():i};d.getEntityAt=function(a){a=this.getCharacterList().get(a);return a?a.getEntity():null};d.getChildKeys=function(){return this.get("children")};d.getParentKey=function(){return this.get("parent")};d.getPrevSiblingKey=function(){return this.get("prevSibling")};d.getNextSiblingKey=function(){return this.get("nextSibling")};d.findStyleRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),k,a,c)};d.findEntityRanges=function(a,c){b("findRangesImmutable")(this.getCharacterList(),l,a,c)};return c}(f(j));e.exports=a}),null);
-----
findRangesImmutable",[],(function(a,b,c,d,e,f){"use strict";function a(a,b,c,d){if(!a.size)return;var e=0;a.reduce(function(a,f,g){b(a,f)||(c(a)&&d(e,g),e=g);return f});c(a.last())&&d(e,a.count())}e.exports=a}),null);
-----
encodeInlineStyleRanges",["UnicodeUtils","findRangesImmutable"],(function(a,b,c,d,e,f){"use strict";var g,h=function(a,b){return a===b},i=function(a){return!!a},j=[];function k(a,c,d){var e=[];c=c.map(function(a){return a.has(d)}).toList();b("findRangesImmutable")(c,h,i,function(c,f){var h=a.getText();e.push({offset:(g||(g=b("UnicodeUtils"))).strlen(h.slice(0,c)),length:g.strlen(h.slice(c,f)),style:d})});return e}function a(a){var b=a.getCharacterList().map(function(a){return a.getStyle()}).toList(),c=b.flatten().toSet().map(function(c){return k(a,b,c)});return Array.prototype.concat.apply(j,c.toJS())}e.exports=a}),null);
-----